forked from priyankarpal/projectshut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
66 lines (60 loc) · 1.93 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* eslint-disable max-len */
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["plugin:react/recommended", "standard"],
overrides: [
{
files: ["*.md"],
rules: {
"commit-convention/commit-convention": "on",
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react"],
rules: {
// Disallow unused variables
"no-unused-vars": "error",
// Enforce consistent indentation
indent: ["error", 2],
// Enforce the use of semicolons
semi: ["error", "always"],
// Require double quotes for strings
quotes: ["error", "double"],
// Require curly braces for all control statements
curly: ["error", "all"],
// Disallow the use of `var` to declare variables
"no-var": "error",
// Require conventional commit messages
"commit-convention/commit-convention": [
"error",
{
"type-enum": [
"feat", // A new feature
"fix", // A bug fix
"docs", // Documentation only changes
"style", // Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
"refactor", // A code change that neither fixes a bug nor adds a feature
"perf", // A code change that improves performance
"test", // Adding missing tests or correcting existing tests
"chore", // Changes to the build process or auxiliary tools and libraries such as documentation generation
"revert", // Revert to a commit
"build", // Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
],
"type-case": "lowerCase",
"type-empty": false,
"subject-empty": false,
"subject-full-stop": false,
"header-max-length": 72,
"body-max-line-length": 80,
"footer-max-line-length": 80,
},
],
},
}