@haltcase/style 1.0.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.
Files changed (39) hide show
  1. package/LICENSE.md +382 -0
  2. package/eslint/_base.js +52 -0
  3. package/eslint/browser.js +8 -0
  4. package/eslint/cjs.js +21 -0
  5. package/eslint/constants.js +13 -0
  6. package/eslint/jest.js +28 -0
  7. package/eslint/next.js +27 -0
  8. package/eslint/node.js +8 -0
  9. package/eslint/playwright-test.js +8 -0
  10. package/eslint/react.js +18 -0
  11. package/eslint/rules/best-practice.js +239 -0
  12. package/eslint/rules/es2015.js +71 -0
  13. package/eslint/rules/import.js +85 -0
  14. package/eslint/rules/jest.js +28 -0
  15. package/eslint/rules/jsx-a11y.js +20 -0
  16. package/eslint/rules/playwright-test.js +28 -0
  17. package/eslint/rules/possible-errors.js +47 -0
  18. package/eslint/rules/react.js +117 -0
  19. package/eslint/rules/simple-import-sort.js +23 -0
  20. package/eslint/rules/stylistic.js +86 -0
  21. package/eslint/rules/tsdoc.js +17 -0
  22. package/eslint/rules/typescript/extension.js +45 -0
  23. package/eslint/rules/typescript/import.js +22 -0
  24. package/eslint/rules/typescript/index.js +89 -0
  25. package/eslint/rules/typescript/strict.js +18 -0
  26. package/eslint/rules/unicorn.js +677 -0
  27. package/eslint/rules/variables.js +36 -0
  28. package/eslint/typescript.js +26 -0
  29. package/eslint/utils/require-package.js +44 -0
  30. package/package.json +100 -0
  31. package/prettier/index.js +21 -0
  32. package/readme.md +228 -0
  33. package/typescript/tsconfig.base.json +13 -0
  34. package/typescript/tsconfig.bundler.json +13 -0
  35. package/typescript/tsconfig.next.json +26 -0
  36. package/typescript/tsconfig.node.json +4 -0
  37. package/typescript/tsconfig.node18.json +13 -0
  38. package/typescript/tsconfig.node20.json +13 -0
  39. package/typescript/tsconfig.web.json +8 -0
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { warn, error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ rules: {
9
+ /**
10
+ * Require return statements in array methods callbacks.
11
+ *
12
+ * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
13
+ */
14
+ "array-callback-return": [error, { allowImplicit: true }],
15
+ /**
16
+ * Treat `var` statements as if they were block scoped.
17
+ *
18
+ * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
19
+ */
20
+ "block-scoped-var": error,
21
+ /**
22
+ * Require curly braces for multiline blocks.
23
+ *
24
+ * 🔧 Fixable - https://eslint.org/docs/rules/curly
25
+ */
26
+ curly: [warn, "multi-line"],
27
+ /**
28
+ * Require default clauses in switch statements to be last (if used).
29
+ *
30
+ * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
31
+ */
32
+ "default-case-last": error,
33
+ /**
34
+ * Require triple equals (`===` and `!==`).
35
+ *
36
+ * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
37
+ */
38
+ eqeqeq: [error, "always", { null: "ignore" }],
39
+ /**
40
+ * Require grouped accessor pairs in object literals and classes.
41
+ *
42
+ * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
43
+ */
44
+ "grouped-accessor-pairs": error,
45
+ /**
46
+ * Disallow use of `alert()`.
47
+ *
48
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
49
+ */
50
+ "no-alert": error,
51
+ /**
52
+ * Disallow use of `caller`/`callee`.
53
+ *
54
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
55
+ */
56
+ "no-caller": error,
57
+ /**
58
+ * Disallow returning value in constructor.
59
+ *
60
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
61
+ */
62
+ "no-constructor-return": error,
63
+ /**
64
+ * Disallow using an `else` if the `if` block contains a return.
65
+ *
66
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
67
+ */
68
+ "no-else-return": warn,
69
+ /**
70
+ * Disallow `eval()`.
71
+ *
72
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
73
+ */
74
+ "no-eval": error,
75
+ /**
76
+ * Disallow extending native objects.
77
+ *
78
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
79
+ */
80
+ "no-extend-native": error,
81
+ /**
82
+ * Disallow unnecessary function binding.
83
+ *
84
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
85
+ */
86
+ "no-extra-bind": error,
87
+ /**
88
+ * Disallow unnecessary labels.
89
+ *
90
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
91
+ */
92
+ "no-extra-label": error,
93
+ /**
94
+ * Disallow floating decimals.
95
+ *
96
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
97
+ */
98
+ "no-floating-decimal": error,
99
+ /**
100
+ * Require converting types explicitly, e.g., `Boolean(foo)` instead of `!!foo`.
101
+ *
102
+ * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
103
+ */
104
+ "no-implicit-coercion": error,
105
+ /**
106
+ * Disallow use of `eval()`-like methods.
107
+ *
108
+ * https://eslint.org/docs/rules/no-implied-eval
109
+ */
110
+ "no-implied-eval": error,
111
+ /**
112
+ * Disallow usage of `__iterator__` property.
113
+ *
114
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
115
+ */
116
+ "no-iterator": error,
117
+ /**
118
+ * Disallow use of labels.
119
+ *
120
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
121
+ */
122
+ "no-labels": error,
123
+ /**
124
+ * Disallow unnecessary nested blocks.
125
+ *
126
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
127
+ */
128
+ "no-lone-blocks": error,
129
+ /**
130
+ * Disallow `new` for side effects.
131
+ *
132
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
133
+ */
134
+ "no-new": error,
135
+ /**
136
+ * Disallow function constructors.
137
+ *
138
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
139
+ */
140
+ "no-new-func": error,
141
+ /**
142
+ * Disallow primitive wrapper instances, such as `new String('foo')`.
143
+ *
144
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
145
+ */
146
+ "no-new-wrappers": error,
147
+ /**
148
+ * Disallow use of octal escape sequences in string literals.
149
+ *
150
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
151
+ */
152
+ "no-octal-escape": error,
153
+ /**
154
+ * Disallow reassignment of function parameters.
155
+ *
156
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
157
+ */
158
+ "no-param-reassign": error,
159
+ /**
160
+ * Disallow usage of the deprecated `__proto__` property.
161
+ *
162
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
163
+ */
164
+ "no-proto": error,
165
+ /**
166
+ * Disallow assignment in `return` statement.
167
+ *
168
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
169
+ */
170
+ "no-return-assign": error,
171
+ /**
172
+ * Disallow unnecessary `return await`.
173
+ *
174
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
175
+ */
176
+ "no-return-await": error,
177
+ /**
178
+ * Disallow use of `javascript:` urls.
179
+ *
180
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
181
+ */
182
+ "no-script-url": error,
183
+ /**
184
+ * Disallow comparisons where both sides are exactly the same.
185
+ *
186
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
187
+ */
188
+ "no-self-compare": error,
189
+ /**
190
+ * Disallow use of comma operator.
191
+ *
192
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
193
+ */
194
+ "no-sequences": error,
195
+ /**
196
+ * Disallow unnecessary `.call()` and `.apply()`.
197
+ *
198
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
199
+ */
200
+ "no-useless-call": error,
201
+ /**
202
+ * Disallow unnecessary concatenation of strings.
203
+ *
204
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
205
+ */
206
+ "no-useless-concat": error,
207
+ /**
208
+ * Disallow redundant return statements.
209
+ *
210
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
211
+ */
212
+ "no-useless-return": warn,
213
+ /**
214
+ * Require using named capture groups in regular expressions.
215
+ *
216
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
217
+ */
218
+ "prefer-named-capture-group": error,
219
+ /**
220
+ * Require using Error objects as Promise rejection reasons.
221
+ *
222
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
223
+ */
224
+ "prefer-promise-reject-errors": [error, { allowEmptyReject: true }],
225
+ /**
226
+ * Disallow use of the RegExp constructor in favor of regular expression
227
+ * literals.
228
+ *
229
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
230
+ */
231
+ "prefer-regex-literals": error,
232
+ /**
233
+ * Disallow "Yoda conditions".
234
+ *
235
+ * 🔧 Fixable - https://eslint.org/docs/rules/yoda
236
+ */
237
+ yoda: error
238
+ }
239
+ };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { warn, error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ rules: {
9
+ /**
10
+ * Disallow useless computed property keys.
11
+ *
12
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-computed-key
13
+ */
14
+ "no-useless-computed-key": warn,
15
+ /**
16
+ * Disallow renaming import, export, and destructured assignments to the
17
+ * same name.
18
+ *
19
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-rename
20
+ */
21
+ "no-useless-rename": warn,
22
+ /**
23
+ * Require `let` or `const` instead of `var`.
24
+ *
25
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-var
26
+ */
27
+ "no-var": error,
28
+ /**
29
+ * Require object literal shorthand syntax.
30
+ *
31
+ * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand
32
+ */
33
+ "object-shorthand": warn,
34
+ /**
35
+ * Require default to `const` instead of `let`.
36
+ *
37
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const
38
+ */
39
+ "prefer-const": warn,
40
+ /**
41
+ * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.
42
+ *
43
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals
44
+ */
45
+ "prefer-numeric-literals": error,
46
+ /**
47
+ * Require using rest parameters instead of `arguments`.
48
+ *
49
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params
50
+ */
51
+ "prefer-rest-params": error,
52
+ /**
53
+ * Require using spread syntax instead of `.apply()`.
54
+ *
55
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread
56
+ */
57
+ "prefer-spread": error,
58
+ /**
59
+ * Require using template literals instead of string concatenation.
60
+ *
61
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template
62
+ */
63
+ "prefer-template": warn,
64
+ /**
65
+ * Require a `Symbol` description.
66
+ *
67
+ * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description
68
+ */
69
+ "symbol-description": error
70
+ }
71
+ };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { off, warn, error }
5
+ } = require("../constants");
6
+
7
+ const disabledRules = {
8
+ /**
9
+ * Enforce a module import order convention.
10
+ * This is disabled as it is covered by `eslint-plugin-simple-import-sort`.
11
+ *
12
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
13
+ */
14
+ "import/order": off
15
+ };
16
+
17
+ module.exports = {
18
+ rules: {
19
+ ...disabledRules,
20
+ /**
21
+ * Disallow non-import statements appearing before import statements.
22
+ *
23
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
24
+ */
25
+ "import/first": error,
26
+ /**
27
+ * Require a newline after the last import/require.
28
+ *
29
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
30
+ */
31
+ "import/newline-after-import": warn,
32
+ /**
33
+ * Disallow import of modules using absolute paths.
34
+ *
35
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
36
+ */
37
+ "import/no-absolute-path": error,
38
+ /**
39
+ * Disallow cyclical dependencies between modules.
40
+ *
41
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
42
+ */
43
+ "import/no-cycle": error,
44
+ /**
45
+ * Disallow default exports.
46
+ *
47
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
48
+ */
49
+ "import/no-default-export": error,
50
+ /**
51
+ * Disallow the use of extraneous packages.
52
+ *
53
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
54
+ */
55
+ "import/no-extraneous-dependencies": [
56
+ error
57
+ // TODO: Enable this line after the next release of `eslint-plugin-import` (v2.27+)
58
+ // { includeInternal: true, includeTypes: true },
59
+ ],
60
+ /**
61
+ * Disallow mutable exports.
62
+ *
63
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
64
+ */
65
+ "import/no-mutable-exports": error,
66
+ /**
67
+ * Disallow importing packages through relative paths.
68
+ *
69
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
70
+ */
71
+ "import/no-relative-packages": warn,
72
+ /**
73
+ * Disallow a module from importing itself.
74
+ *
75
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
76
+ */
77
+ "import/no-self-import": error,
78
+ /**
79
+ * Ensures that there are no useless path segments.
80
+ *
81
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
82
+ */
83
+ "import/no-useless-path-segments": [error]
84
+ }
85
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { warn, error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ rules: {
9
+ /**
10
+ * Disallow duplicate setup and teardown hooks.
11
+ *
12
+ * 🚫 Not fixable - https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-duplicate-hooks.md
13
+ */
14
+ "jest/no-duplicate-hooks": error,
15
+ /**
16
+ * Require lowercase test names.
17
+ *
18
+ * 🔧 Fixable - https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-lowercase-title.md
19
+ */
20
+ "jest/prefer-lowercase-title": warn,
21
+ /**
22
+ * Require test cases and hooks to be inside a `describe` block.
23
+ *
24
+ * 🚫 Not fixable - https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/require-top-level-describe.md
25
+ */
26
+ "jest/require-top-level-describe": error
27
+ }
28
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { off }
5
+ } = require("../constants");
6
+
7
+ /**
8
+ * These are enabled by `jsx-a11y/recommended`, but we've made the decision to
9
+ * disable them.
10
+ */
11
+ const disabledRules = {
12
+ // This rule has been deprecated, but not yet removed.
13
+ "jsx-a11y/no-onchange": off
14
+ };
15
+
16
+ module.exports = {
17
+ rules: {
18
+ ...disabledRules
19
+ }
20
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { warn, error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ rules: {
9
+ /**
10
+ * Require lowercase test names.
11
+ *
12
+ * 🔧 Fixable - https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-lowercase-title.md
13
+ */
14
+ "playwright/prefer-lowercase-title": warn,
15
+ /**
16
+ * Require using `toHaveLength` over explicitly checking lengths.
17
+ *
18
+ * 🔧 Fixable - https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-lowercase-title.md
19
+ */
20
+ "playwright/prefer-to-have-length": warn,
21
+ /**
22
+ * Require test cases and hooks to be inside a `test.describe` block.
23
+ *
24
+ * 🚫 Not fixable - https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-lowercase-title.md
25
+ */
26
+ "playwright/require-top-level-describe": error
27
+ }
28
+ };
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ rules: {
9
+ /**
10
+ * Disallow await inside of loops.
11
+ *
12
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-await-in-loop
13
+ */
14
+ "no-await-in-loop": error,
15
+ /**
16
+ * Disallow the use of console.
17
+ *
18
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-console
19
+ */
20
+ "no-console": error,
21
+ /**
22
+ * Disallow expressions where the operation doesn't affect the value.
23
+ *
24
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-console
25
+ */
26
+ "no-constant-binary-expression": error,
27
+ /**
28
+ * Disallow returning values from Promise executor functions.
29
+ *
30
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return
31
+ */
32
+ "no-promise-executor-return": error,
33
+ /**
34
+ * Disallow template literal placeholder syntax in regular strings, as
35
+ * these are likely errors.
36
+ *
37
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string
38
+ */
39
+ "no-template-curly-in-string": error,
40
+ /**
41
+ * Disallow loops with a body that allows only one iteration.
42
+ *
43
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop
44
+ */
45
+ "no-unreachable-loop": error
46
+ }
47
+ };
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { off, warn, error }
5
+ } = require("../constants");
6
+
7
+ /**
8
+ * These are enabled by `react/recommended`, but we've made the decision to
9
+ * disable them.
10
+ */
11
+ const disabledRules = {
12
+ // This is better handled by TypeScript.
13
+ "react/no-unknown-property": off,
14
+ // This is better handled by TypeScript, and `prop-types` also bloats
15
+ // the project's build size.
16
+ "react/prop-types": off,
17
+ // Disable requiring React to be imported, as this is no longer required.
18
+ "react/react-in-jsx-scope": off
19
+ };
20
+
21
+ module.exports = {
22
+ rules: {
23
+ ...disabledRules,
24
+ /**
25
+ * Require an explicit type when using button elements.
26
+ *
27
+ * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
28
+ */
29
+ "react/button-has-type": warn,
30
+ /**
31
+ * Require consistent function type for function components.
32
+ *
33
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/function-component-definition.md
34
+ */
35
+ "react/function-component-definition": warn,
36
+ /**
37
+ * Require destructuring and symmetric naming of `useState` hook value and setter variables.
38
+ *
39
+ * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
40
+ */
41
+ "react/hook-use-state": warn,
42
+ /**
43
+ * Require consistent boolean attributes notation in JSX.
44
+ *
45
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
46
+ */
47
+ "react/jsx-boolean-value": warn,
48
+ /**
49
+ * Disallow unnecessary curly braces in JSX props and children.
50
+ *
51
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
52
+ */
53
+ "react/jsx-curly-brace-presence": warn,
54
+ /**
55
+ * Require using shorthand form for React fragments, unless required.
56
+ *
57
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
58
+ */
59
+ "react/jsx-fragments": warn,
60
+ /**
61
+ * Prevent problematic leaked values from being rendered.
62
+ *
63
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
64
+ */
65
+ "react/jsx-no-leaked-render": warn,
66
+ /**
67
+ * Prevents usage of unsafe `target='_blank'`.
68
+ *
69
+ * This rule is a part of `react/recommended`, but we've modified it to
70
+ * allow referrer.
71
+ *
72
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
73
+ */
74
+ "react/jsx-no-target-blank": [
75
+ error,
76
+ {
77
+ allowReferrer: true
78
+ }
79
+ ],
80
+ /**
81
+ * Disallow empty React fragments.
82
+ *
83
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
84
+ */
85
+ "react/jsx-no-useless-fragment": [warn, { allowExpressions: true }],
86
+ /**
87
+ * Require the use of PascalCase for user-defined JSX components.
88
+ *
89
+ * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
90
+ */
91
+ "react/jsx-pascal-case": warn,
92
+ /**
93
+ * Require props to be sorted alphabetically.
94
+ *
95
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
96
+ */
97
+ "react/jsx-sort-props": warn,
98
+ /**
99
+ * Disallow usage of Array index in keys.
100
+ *
101
+ * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
102
+ */
103
+ "react/no-array-index-key": warn,
104
+ /**
105
+ * Disallow creating unstable components inside components.
106
+ *
107
+ * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
108
+ */
109
+ "react/no-unstable-nested-components": error,
110
+ /**
111
+ * Disallow closing tags for components without children.
112
+ *
113
+ * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
114
+ */
115
+ "react/self-closing-comp": warn
116
+ }
117
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ const {
4
+ levels: { error }
5
+ } = require("../constants");
6
+
7
+ module.exports = {
8
+ plugins: ["simple-import-sort"],
9
+ rules: {
10
+ /**
11
+ * Enforce export sort order.
12
+ *
13
+ * 🔧 Fixable - https://github.com/lydell/eslint-plugin-simple-import-sort#exports
14
+ */
15
+ "simple-import-sort/exports": error,
16
+ /**
17
+ * Enforce import sort order.
18
+ *
19
+ * 🔧 Fixable - https://github.com/lydell/eslint-plugin-simple-import-sort#imports
20
+ */
21
+ "simple-import-sort/imports": error
22
+ }
23
+ };