eslint-config-arklint 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,16 +16,29 @@ module.exports = {
16
16
  "jsdoc/require-hyphen-before-param-description": ["warn", "always", {
17
17
  tags: {
18
18
  property: "always",
19
+ template: "always",
19
20
  return: "never"
20
21
  }
21
22
  }],
22
23
  "jsdoc/check-line-alignment": ["warn", "never"],
23
24
  "jsdoc/match-name": ["warn", {
24
- match: [{
25
- allowName: "/^([A-Z][a-z]+)+$/",
26
- message: "The name should be written in PascalCase.",
27
- tags: ["callback", "typedef"]
28
- }]
25
+ match: [
26
+ {
27
+ allowName: "/^_?([A-Z][a-z]+)+$/",
28
+ message: "The name should be written in PascalCase.",
29
+ tags: ["typedef"]
30
+ },
31
+ {
32
+ allowName: "/^([A-Z][a-z]+)+$/",
33
+ message: "The name should be written in PascalCase.",
34
+ tags: ["callback"]
35
+ },
36
+ {
37
+ allowName: "/^[A-Z]{1}$/",
38
+ message: "The name should be a single capital letter.",
39
+ tags: ["template"]
40
+ }
41
+ ]
29
42
  }],
30
43
  "jsdoc/match-description": ["warn", {
31
44
  contexts: ["any"],
@@ -46,6 +59,10 @@ module.exports = {
46
59
  returns: {
47
60
  message: "@returns description should begin with a capital letter and not end with a period.",
48
61
  match: true
62
+ },
63
+ template: {
64
+ message: "@template description should begin with a capital letter and not end with a period.",
65
+ match: true
49
66
  }
50
67
  }
51
68
  }]
@@ -55,10 +72,10 @@ module.exports = {
55
72
  maxLines: 2,
56
73
  mode: "typescript",
57
74
  preferredTypes: {
58
- "object.<>": false,
59
- "Object.<>": "Record.<>",
75
+ "object<>": false,
76
+ "Object<>": "Record<>",
60
77
  "Object": "object",
61
- "<>": ".<>",
78
+ ".<>": "<>",
62
79
  "*": "any"
63
80
  }
64
81
  }
@@ -19,32 +19,9 @@ module.exports = {
19
19
  "plugin:react/jsx-runtime"
20
20
  ],
21
21
  rules: {
22
- "react/no-typos": "error",
23
- "react/prop-types": ["warn", { ignore: ["t"] }],
24
22
  "react/display-name": "warn",
25
- "react/jsx-fragments": ["warn", "element"],
26
- "react/jsx-key": "warn",
27
- "react/jsx-first-prop-new-line": ["warn", "multiline"],
28
- "react/jsx-max-props-per-line": ["warn", { maximum: { single: 3, multi: 1 } }],
29
- "react/jsx-wrap-multilines": "warn",
30
23
  "react/jsx-boolean-value": ["warn", "never"],
31
24
  "react/jsx-closing-bracket-location": "warn",
32
- "react/jsx-no-duplicate-props": "warn",
33
- "react/jsx-curly-brace-presence": "warn",
34
- "react/jsx-uses-vars": "warn",
35
- "react/jsx-uses-react": "warn",
36
- "react/forbid-foreign-prop-types": ["warn", { allowInPropTypes: true }],
37
- "react/jsx-no-comment-textnodes": "warn",
38
- "react-hooks/exhaustive-deps": "warn",
39
- "react/jsx-no-target-blank": "warn",
40
- "react/jsx-no-undef": "error",
41
- "react/jsx-pascal-case": "warn",
42
- "react/no-danger-with-children": "warn",
43
- "react/no-direct-mutation-state": "warn",
44
- "react/no-is-mounted": "warn",
45
- "react/require-render-return": "error",
46
- "react-hooks/rules-of-hooks": "error",
47
- "react/style-prop-object": "warn",
48
25
  "jsx-a11y/alt-text": "warn",
49
26
  "jsx-a11y/anchor-has-content": "warn",
50
27
  "jsx-a11y/anchor-is-valid": ["warn", {
@@ -63,6 +40,33 @@ module.exports = {
63
40
  "jsx-a11y/no-redundant-roles": "warn",
64
41
  "jsx-a11y/role-has-required-aria-props": "warn",
65
42
  "jsx-a11y/role-supports-aria-props": "warn",
66
- "jsx-a11y/scope": "warn"
43
+ "jsx-a11y/scope": "warn",
44
+ "react-hooks/exhaustive-deps": "warn",
45
+ "react-hooks/rules-of-hooks": "error",
46
+ "react/jsx-curly-brace-presence": "warn",
47
+ "react/jsx-first-prop-new-line": ["warn", "multiline"],
48
+ "react/jsx-fragments": ["warn", "element"],
49
+ "react/jsx-key": "warn",
50
+ "react/jsx-max-props-per-line": ["warn", { maximum: { single: 3, multi: 1 } }],
51
+ "react/jsx-no-comment-textnodes": "warn",
52
+ "react/jsx-no-duplicate-props": "warn",
53
+ "react/jsx-no-target-blank": "warn",
54
+ "react/jsx-no-undef": "error",
55
+ "react/jsx-pascal-case": "warn",
56
+ "react/jsx-tag-spacing": ["warn", {
57
+ closingSlash: "never",
58
+ beforeSelfClosing: "always",
59
+ afterOpening: "never",
60
+ beforeClosing: "never"
61
+ }],
62
+ "react/jsx-uses-react": "warn",
63
+ "react/jsx-uses-vars": "warn",
64
+ "react/jsx-wrap-multilines": "warn",
65
+ "react/no-danger-with-children": "warn",
66
+ "react/no-direct-mutation-state": "warn",
67
+ "react/no-is-mounted": "warn",
68
+ "react/prop-types": "off",
69
+ "react/require-render-return": "error",
70
+ "react/style-prop-object": "warn"
67
71
  }
68
72
  };
package/index.js CHANGED
@@ -19,34 +19,22 @@ module.exports = {
19
19
  "./extensions/jsdoc.js"
20
20
  ],
21
21
  rules: {
22
- "quotes": ["warn", "double"],
23
- "semi": "warn",
24
- "camelcase": "warn",
25
- "no-multi-spaces": "warn",
26
22
  "array-bracket-spacing": "warn",
27
- "object-curly-spacing": ["warn", "always"],
28
- "space-infix-ops": "warn",
29
- "space-in-parens": "warn",
30
- "spaced-comment": ["warn", "always"],
31
- "comma-spacing": "warn",
32
- "comma-dangle": ["warn", "never"],
33
- "prefer-arrow-callback": "warn",
34
- "quote-props": ["warn", "consistent-as-needed"],
35
- "nonblock-statement-body-position": "warn",
36
- "arrow-body-style": "warn",
37
- "dot-notation": "warn",
38
- "no-var": "warn",
39
- "indent": ["warn", "tab", { SwitchCase: 1, ignoreComments: true }],
40
- "no-duplicate-imports": "warn",
41
- "no-multiple-empty-lines": ["warn", { max: 2, maxBOF: 0, maxEOF: 0 }],
42
- "no-restricted-globals": ["error"].concat(restrictedGlobals),
43
23
  "array-callback-return": "warn",
24
+ "arrow-body-style": "warn",
25
+ "camelcase": "warn",
26
+ "comma-dangle": ["warn", "never"],
27
+ "comma-spacing": "warn",
44
28
  "default-case": ["warn", { commentPattern: "^no default$" }],
45
29
  "dot-location": ["warn", "property"],
46
- "eqeqeq": ["warn", "smart"],
30
+ "dot-notation": "warn",
47
31
  "eol-last": ["warn", "never"],
32
+ "eqeqeq": ["warn", "smart"],
33
+ "getter-return": "warn",
34
+ "indent": ["warn", "tab", { SwitchCase: 1, ignoreComments: true }],
48
35
  "new-parens": "warn",
49
36
  "no-array-constructor": "warn",
37
+ "no-async-promise-executor": "off",
50
38
  "no-caller": "warn",
51
39
  "no-case-declarations": "off",
52
40
  "no-cond-assign": ["warn", "except-parens"],
@@ -57,9 +45,9 @@ module.exports = {
57
45
  "no-dupe-class-members": "warn",
58
46
  "no-dupe-keys": "warn",
59
47
  "no-duplicate-case": "warn",
48
+ "no-duplicate-imports": "warn",
60
49
  "no-empty-character-class": "warn",
61
50
  "no-empty-pattern": "warn",
62
- "no-async-promise-executor": "off",
63
51
  "no-eval": "warn",
64
52
  "no-ex-assign": "warn",
65
53
  "no-extend-native": "warn",
@@ -68,6 +56,7 @@ module.exports = {
68
56
  "no-extra-semi": "off",
69
57
  "no-fallthrough": "warn",
70
58
  "no-func-assign": "warn",
59
+ "no-global-assign": "warn",
71
60
  "no-implied-eval": "warn",
72
61
  "no-invalid-regexp": "warn",
73
62
  "no-iterator": "warn",
@@ -76,18 +65,19 @@ module.exports = {
76
65
  "no-lone-blocks": "warn",
77
66
  "no-loop-func": "warn",
78
67
  "no-mixed-operators": "warn",
68
+ "no-multi-spaces": "warn",
79
69
  "no-multi-str": "warn",
80
- "no-global-assign": "warn",
81
- "no-unsafe-negation": "warn",
70
+ "no-multiple-empty-lines": ["warn", { max: 2, maxBOF: 0, maxEOF: 0 }],
82
71
  "no-new-func": "warn",
83
72
  "no-new-object": "warn",
84
73
  "no-new-symbol": "warn",
85
74
  "no-new-wrappers": "warn",
86
75
  "no-obj-calls": "warn",
87
- "no-octal": "warn",
88
76
  "no-octal-escape": "warn",
77
+ "no-octal": "warn",
89
78
  "no-redeclare": "warn",
90
79
  "no-regex-spaces": "warn",
80
+ "no-restricted-globals": ["error"].concat(restrictedGlobals),
91
81
  "no-restricted-syntax": ["warn", "WithStatement"],
92
82
  "no-script-url": "warn",
93
83
  "no-self-assign": "warn",
@@ -100,6 +90,7 @@ module.exports = {
100
90
  "no-throw-literal": "warn",
101
91
  "no-undef": "error",
102
92
  "no-unreachable": "warn",
93
+ "no-unsafe-negation": "warn",
103
94
  "no-unused-expressions": ["error", {
104
95
  allowShortCircuit: true,
105
96
  allowTernary: true,
@@ -115,24 +106,34 @@ module.exports = {
115
106
  classes: false,
116
107
  variables: false
117
108
  }],
109
+ "no-useless-escape": "warn",
118
110
  "no-useless-computed-key": "warn",
119
111
  "no-useless-concat": "warn",
120
112
  "no-useless-constructor": "warn",
121
- "no-useless-escape": "warn",
122
113
  "no-useless-rename": ["warn", {
123
114
  ignoreDestructuring: false,
124
115
  ignoreImport: false,
125
116
  ignoreExport: false
126
117
  }],
127
- "no-with": "warn",
118
+ "no-var": "warn",
128
119
  "no-whitespace-before-property": "warn",
120
+ "no-with": "warn",
121
+ "nonblock-statement-body-position": "warn",
122
+ "object-curly-spacing": ["warn", "always"],
123
+ "object-shorthand": ["warn", "always"],
124
+ "prefer-arrow-callback": "warn",
125
+ "quote-props": ["warn", "consistent-as-needed"],
126
+ "quotes": ["warn", "double"],
127
+ "require-await": "warn",
129
128
  "require-yield": "warn",
130
129
  "rest-spread-spacing": ["warn", "never"],
130
+ "semi": "warn",
131
+ "space-in-parens": "warn",
132
+ "space-infix-ops": "warn",
133
+ "spaced-comment": ["warn", "always"],
131
134
  "strict": ["warn", "never"],
132
135
  "unicode-bom": ["warn", "never"],
133
136
  "use-isnan": "warn",
134
- "valid-typeof": "warn",
135
- "require-await": "warn",
136
- "getter-return": "warn"
137
+ "valid-typeof": "warn"
137
138
  }
138
139
  };
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "eslint-config-arklint",
3
- "version": "1.5.0",
4
- "author": "Arkellys",
5
- "license": "MIT",
6
- "main": "index.js",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/Arkellys/eslint-config-arklint.git"
10
- },
11
- "homepage": "https://github.com/Arkellys/eslint-config-arklint#readme",
12
- "scripts": {
13
- "lint": "eslint ."
14
- },
15
- "dependencies": {
16
- "@rushstack/eslint-patch": "^1.10.1",
17
- "confusing-browser-globals": "^1.0.11",
18
- "eslint-plugin-import": "^2.29.1",
19
- "eslint-plugin-jsdoc": "^48.2.2",
20
- "eslint-plugin-jsx-a11y": "^6.8.0",
21
- "eslint-plugin-react": "^7.34.1",
22
- "eslint-plugin-react-hooks": "^4.6.0",
23
- "eslint-plugin-sort-imports-es6-autofix": "^0.6.0"
24
- },
25
- "devDependencies": {
26
- "eslint": "^8.57.0"
27
- },
28
- "peerDependencies": {
29
- "eslint": ">=8.0.0"
30
- },
31
- "eslintConfig": {
32
- "extends": "./index.js"
33
- },
34
- "packageManager": "yarn@4.1.0"
1
+ {
2
+ "name": "eslint-config-arklint",
3
+ "version": "1.7.0",
4
+ "author": "Arkellys",
5
+ "license": "MIT",
6
+ "main": "index.js",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Arkellys/eslint-config-arklint.git"
10
+ },
11
+ "homepage": "https://github.com/Arkellys/eslint-config-arklint#readme",
12
+ "scripts": {
13
+ "lint": "eslint ."
14
+ },
15
+ "dependencies": {
16
+ "@rushstack/eslint-patch": "^1.10.3",
17
+ "confusing-browser-globals": "^1.0.11",
18
+ "eslint-plugin-import": "^2.29.1",
19
+ "eslint-plugin-jsdoc": "^48.2.6",
20
+ "eslint-plugin-jsx-a11y": "^6.8.0",
21
+ "eslint-plugin-react": "^7.34.2",
22
+ "eslint-plugin-react-hooks": "^4.6.2",
23
+ "eslint-plugin-sort-imports-es6-autofix": "^0.6.0"
24
+ },
25
+ "devDependencies": {
26
+ "eslint": "^8.57.0"
27
+ },
28
+ "peerDependencies": {
29
+ "eslint": ">=8.0.0"
30
+ },
31
+ "eslintConfig": {
32
+ "extends": "./index.js"
33
+ },
34
+ "packageManager": "yarn@4.1.0"
35
35
  }