@asd14/eslint-config 10.3.0 → 11.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 (61) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +24 -177
  3. package/dist/types/eslint.config.d.ts +172 -0
  4. package/dist/types/src/configs/dev-files.d.ts +14 -0
  5. package/dist/types/src/configs/node-jest.d.ts +17 -0
  6. package/dist/types/src/configs/node.d.ts +248 -0
  7. package/dist/types/src/configs/react-jest.d.ts +20 -0
  8. package/dist/types/src/configs/react.d.ts +1519 -0
  9. package/dist/types/src/configs/ts-node.d.ts +290 -0
  10. package/dist/types/src/index.d.ts +6 -0
  11. package/dist/types/src/rules/base.d.ts +16 -0
  12. package/dist/types/src/rules/import-dev.d.ts +9 -0
  13. package/dist/types/src/rules/import.d.ts +44 -0
  14. package/dist/types/src/rules/jsdoc.d.ts +40 -0
  15. package/dist/types/src/rules/nx-dev.d.ts +13 -0
  16. package/dist/types/src/rules/nx.d.ts +45 -0
  17. package/dist/types/src/rules/react.d.ts +120 -0
  18. package/dist/types/src/rules/rtl.d.ts +13 -0
  19. package/dist/types/src/rules/typescript.d.ts +53 -0
  20. package/dist/types/src/rules/unicorn.d.ts +42 -0
  21. package/dist/types/src/utils/find-up-sync.d.ts +34 -0
  22. package/dist/types/tsconfig.tsbuildinfo +1 -0
  23. package/package.json +51 -67
  24. package/src/configs/dev-files.js +17 -0
  25. package/src/configs/node-jest.js +29 -0
  26. package/src/configs/node.js +68 -0
  27. package/src/configs/react-jest.js +16 -0
  28. package/src/configs/react.js +89 -0
  29. package/src/configs/ts-node.js +23 -0
  30. package/src/index.js +6 -0
  31. package/src/rules/base.js +24 -0
  32. package/src/rules/import-dev.js +31 -0
  33. package/src/rules/import.js +55 -0
  34. package/src/rules/jsdoc.js +49 -0
  35. package/src/rules/nx-dev.js +23 -0
  36. package/src/rules/nx.js +81 -0
  37. package/{rules → src/rules}/react.js +41 -27
  38. package/src/rules/rtl.js +6 -0
  39. package/src/rules/typescript.js +88 -0
  40. package/{rules → src/rules}/unicorn.js +19 -41
  41. package/src/utils/find-up-sync.js +56 -0
  42. package/rules/best-practices.js +0 -11
  43. package/rules/comments.js +0 -46
  44. package/rules/errors.js +0 -112
  45. package/rules/es6.js +0 -48
  46. package/rules/html.js +0 -59
  47. package/rules/import-ts.js +0 -41
  48. package/rules/import.js +0 -101
  49. package/rules/jsdoc-ts.js +0 -8
  50. package/rules/jsdoc.js +0 -103
  51. package/rules/json.js +0 -9
  52. package/rules/node.js +0 -56
  53. package/rules/prettier.js +0 -16
  54. package/rules/promise.js +0 -68
  55. package/rules/style.js +0 -252
  56. package/rules/variables.js +0 -70
  57. package/targets/node-esm.js +0 -25
  58. package/targets/node-ts.js +0 -36
  59. package/targets/node.js +0 -36
  60. package/targets/react-ts.js +0 -94
  61. package/targets/react.js +0 -90
@@ -0,0 +1,290 @@
1
+ export namespace tsNodeConfig {
2
+ let name: "ASD14 config for Typescript + Node.js source files";
3
+ let ignores: ["node_modules", "dist", "coverage", "build"];
4
+ let languageOptions: {
5
+ readonly parser: typeof import("@typescript-eslint/parser");
6
+ readonly ecmaVersion: "latest";
7
+ readonly sourceType: "module";
8
+ readonly parserOptions: {
9
+ readonly projectService: true;
10
+ readonly ecmaVersion: "latest";
11
+ };
12
+ readonly globals: {
13
+ readonly __dirname: false;
14
+ readonly __filename: false;
15
+ readonly AbortController: false;
16
+ readonly AbortSignal: false;
17
+ readonly AsyncDisposableStack: false;
18
+ readonly atob: false;
19
+ readonly Blob: false;
20
+ readonly BroadcastChannel: false;
21
+ readonly btoa: false;
22
+ readonly Buffer: false;
23
+ readonly ByteLengthQueuingStrategy: false;
24
+ readonly clearImmediate: false;
25
+ readonly clearInterval: false;
26
+ readonly clearTimeout: false;
27
+ readonly CloseEvent: false;
28
+ readonly CompressionStream: false;
29
+ readonly console: false;
30
+ readonly CountQueuingStrategy: false;
31
+ readonly crypto: false;
32
+ readonly Crypto: false;
33
+ readonly CryptoKey: false;
34
+ readonly CustomEvent: false;
35
+ readonly DecompressionStream: false;
36
+ readonly DisposableStack: false;
37
+ readonly DOMException: false;
38
+ readonly Event: false;
39
+ readonly EventTarget: false;
40
+ readonly exports: true;
41
+ readonly fetch: false;
42
+ readonly File: false;
43
+ readonly FormData: false;
44
+ readonly global: false;
45
+ readonly Headers: false;
46
+ readonly MessageChannel: false;
47
+ readonly MessageEvent: false;
48
+ readonly MessagePort: false;
49
+ readonly module: false;
50
+ readonly navigator: false;
51
+ readonly Navigator: false;
52
+ readonly performance: false;
53
+ readonly Performance: false;
54
+ readonly PerformanceEntry: false;
55
+ readonly PerformanceMark: false;
56
+ readonly PerformanceMeasure: false;
57
+ readonly PerformanceObserver: false;
58
+ readonly PerformanceObserverEntryList: false;
59
+ readonly PerformanceResourceTiming: false;
60
+ readonly process: false;
61
+ readonly queueMicrotask: false;
62
+ readonly ReadableByteStreamController: false;
63
+ readonly ReadableStream: false;
64
+ readonly ReadableStreamBYOBReader: false;
65
+ readonly ReadableStreamBYOBRequest: false;
66
+ readonly ReadableStreamDefaultController: false;
67
+ readonly ReadableStreamDefaultReader: false;
68
+ readonly Request: false;
69
+ readonly require: false;
70
+ readonly Response: false;
71
+ readonly setImmediate: false;
72
+ readonly setInterval: false;
73
+ readonly setTimeout: false;
74
+ readonly structuredClone: false;
75
+ readonly SubtleCrypto: false;
76
+ readonly SuppressedError: false;
77
+ readonly TextDecoder: false;
78
+ readonly TextDecoderStream: false;
79
+ readonly TextEncoder: false;
80
+ readonly TextEncoderStream: false;
81
+ readonly TransformStream: false;
82
+ readonly TransformStreamDefaultController: false;
83
+ readonly URL: false;
84
+ readonly URLPattern: false;
85
+ readonly URLSearchParams: false;
86
+ readonly WebAssembly: false;
87
+ readonly WebSocket: false;
88
+ readonly WritableStream: false;
89
+ readonly WritableStreamDefaultController: false;
90
+ readonly WritableStreamDefaultWriter: false;
91
+ };
92
+ };
93
+ let plugins: {
94
+ readonly "@nx": Plugin;
95
+ readonly jsdoc: import("eslint").ESLint.Plugin & {
96
+ configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
97
+ };
98
+ readonly "@typescript-eslint": any;
99
+ };
100
+ let rules: {
101
+ readonly "unicorn/prefer-node-protocol": "error";
102
+ readonly "unicorn/no-array-for-each": "off";
103
+ readonly "unicorn/consistent-function-scoping": "off";
104
+ readonly "unicorn/better-regex": "error";
105
+ readonly "unicorn/catch-error-name": "error";
106
+ readonly "unicorn/expiring-todo-comments": "warn";
107
+ readonly "unicorn/no-process-exit": "error";
108
+ readonly "unicorn/no-fn-reference-in-iterator": "off";
109
+ readonly "unicorn/no-array-callback-reference": "off";
110
+ readonly "unicorn/import-index": "off";
111
+ readonly "unicorn/prefer-spread": "error";
112
+ readonly "unicorn/prefer-add-event-listener": "error";
113
+ readonly "unicorn/prefer-string-slice": "error";
114
+ readonly "unicorn/prefer-string-trim-start-end": "error";
115
+ readonly "unicorn/filename-case": "off";
116
+ readonly "unicorn/explicit-length-check": ["error", {
117
+ readonly "non-zero": "not-equal";
118
+ }];
119
+ readonly "unicorn/throw-new-error": "error";
120
+ readonly "unicorn/escape-case": "error";
121
+ readonly "unicorn/no-instanceof-array": "error";
122
+ readonly "unicorn/no-new-buffer": "error";
123
+ readonly "unicorn/no-hex-escape": "error";
124
+ readonly "unicorn/custom-error-definition": "error";
125
+ readonly "unicorn/prefer-type-error": "error";
126
+ readonly "unicorn/no-useless-undefined": "off";
127
+ readonly "unicorn/new-for-builtins": "error";
128
+ readonly "unicorn/error-message": "error";
129
+ readonly "@nx/enforce-module-boundaries": ["error", {
130
+ readonly allow: readonly [];
131
+ readonly depConstraints: readonly [{
132
+ sourceTag: string;
133
+ onlyDependOnLibsWithTags: string[];
134
+ }, {
135
+ sourceTag: string;
136
+ onlyDependOnLibsWithTags: string[];
137
+ }, {
138
+ sourceTag: string;
139
+ onlyDependOnLibsWithTags: string[];
140
+ }, {
141
+ sourceTag: string;
142
+ onlyDependOnLibsWithTags: string[];
143
+ }, {
144
+ sourceTag: string;
145
+ onlyDependOnLibsWithTags: string[];
146
+ }, {
147
+ sourceTag: string;
148
+ onlyDependOnLibsWithTags: string[];
149
+ }, {
150
+ sourceTag: string;
151
+ onlyDependOnLibsWithTags: string[];
152
+ }, {
153
+ sourceTag: string;
154
+ onlyDependOnLibsWithTags: string[];
155
+ }, {
156
+ sourceTag: string;
157
+ onlyDependOnLibsWithTags: string[];
158
+ }, {
159
+ sourceTag: string;
160
+ onlyDependOnLibsWithTags: string[];
161
+ }, {
162
+ sourceTag: string;
163
+ bannedExternalImports: string[];
164
+ }];
165
+ }];
166
+ readonly "jsdoc/sort-tags": ["error", {
167
+ readonly reportIntraTagGroupSpacing: false;
168
+ readonly reportTagGroupSpacing: false;
169
+ }];
170
+ readonly "jsdoc/tag-lines": ["error", "always", {
171
+ readonly startLines: 1;
172
+ readonly endLines: 0;
173
+ readonly applyToEndTag: false;
174
+ readonly tags: {
175
+ readonly returns: {
176
+ readonly lines: "always";
177
+ };
178
+ readonly property: {
179
+ readonly lines: "any";
180
+ };
181
+ readonly param: {
182
+ readonly lines: "any";
183
+ };
184
+ readonly example: {
185
+ readonly lines: "always";
186
+ };
187
+ };
188
+ }];
189
+ readonly "jsdoc/check-indentation": "error";
190
+ readonly "jsdoc/check-alignment": "error";
191
+ readonly "jsdoc/no-bad-blocks": "error";
192
+ readonly "jsdoc/require-asterisk-prefix": ["error", "always"];
193
+ readonly "jsdoc/require-description": "off";
194
+ readonly "jsdoc/require-property-description": "off";
195
+ readonly "jsdoc/require-param-description": "off";
196
+ readonly "jsdoc/require-returns-description": "off";
197
+ readonly "import/no-extraneous-dependencies": ["error", {
198
+ readonly includeTypes: true;
199
+ }];
200
+ readonly "import/no-cycle": ["error", {
201
+ readonly maxDepth: number;
202
+ }];
203
+ readonly "import/no-self-import": "error";
204
+ readonly "import/no-absolute-path": "error";
205
+ readonly "import/default": "error";
206
+ readonly "import/export": "error";
207
+ readonly "import/prefer-default-export": "off";
208
+ readonly "import/namespace": ["error", {
209
+ readonly allowComputed: true;
210
+ }];
211
+ readonly "import/no-duplicates": "error";
212
+ readonly "import/no-named-as-default": "error";
213
+ readonly "import/no-named-as-default-member": "error";
214
+ readonly "import/unambiguous": "off";
215
+ readonly "import/exports-last": "error";
216
+ readonly "import/named": "off";
217
+ readonly "import/no-unresolved": "off";
218
+ readonly "import/extensions": ["error", "always", {
219
+ readonly ignorePackages: true;
220
+ }];
221
+ readonly "import/order": ["error", {
222
+ readonly groups: readonly ["builtin", "external", "internal", readonly ["index", "sibling", "parent"], "object", "unknown"];
223
+ readonly pathGroups: readonly [{
224
+ readonly pattern: "@self-ui/*";
225
+ readonly group: "external";
226
+ readonly position: "after";
227
+ }];
228
+ readonly pathGroupsExcludedImportTypes: readonly ["builtin"];
229
+ readonly alphabetize: {
230
+ readonly order: "asc";
231
+ readonly caseInsensitive: true;
232
+ };
233
+ }];
234
+ readonly "no-restricted-exports": ["error", {
235
+ readonly restrictDefaultExports: {
236
+ readonly named: false;
237
+ readonly namedFrom: false;
238
+ };
239
+ }];
240
+ readonly "no-underscore-dangle": ["error", {
241
+ readonly allow: readonly ["_dirname", "_testResult"];
242
+ readonly allowInArrayDestructuring: true;
243
+ readonly allowInObjectDestructuring: true;
244
+ }];
245
+ readonly "@typescript-eslint/no-unused-vars": ["error", {
246
+ readonly args: "all";
247
+ readonly argsIgnorePattern: "^_";
248
+ readonly caughtErrors: "all";
249
+ readonly caughtErrorsIgnorePattern: "^_";
250
+ readonly destructuredArrayIgnorePattern: "^_";
251
+ readonly varsIgnorePattern: "^_";
252
+ readonly ignoreRestSiblings: true;
253
+ }];
254
+ readonly "@typescript-eslint/require-await": "warn";
255
+ readonly "@typescript-eslint/dot-notation": "off";
256
+ readonly "@typescript-eslint/restrict-template-expressions": ["error", {
257
+ readonly allowBoolean: true;
258
+ readonly allowNumber: true;
259
+ }];
260
+ readonly "@typescript-eslint/no-var-requires": "off";
261
+ readonly "@typescript-eslint/no-use-before-define": "error";
262
+ readonly "@typescript-eslint/naming-convention": ["error", {
263
+ readonly selector: "default";
264
+ readonly leadingUnderscore: "allow";
265
+ readonly format: readonly ["camelCase", "PascalCase", "UPPER_CASE"];
266
+ }, {
267
+ readonly selector: "variable";
268
+ readonly types: readonly ["boolean"];
269
+ readonly format: readonly ["camelCase", "PascalCase"];
270
+ readonly prefix: readonly ["is", "has", "can", "does", "should", "will", "did", "was"];
271
+ }, {
272
+ readonly selector: "variable";
273
+ readonly types: readonly ["boolean", "number", "string", "array"];
274
+ readonly modifiers: readonly ["const", "global"];
275
+ readonly format: readonly ["UPPER_CASE"];
276
+ }, {
277
+ readonly selector: "typeAlias";
278
+ readonly format: readonly ["PascalCase"];
279
+ }, {
280
+ readonly selector: "typeParameter";
281
+ readonly format: readonly ["PascalCase"];
282
+ }, {
283
+ readonly selector: readonly ["classProperty", "objectLiteralProperty", "typeProperty", "classMethod", "objectLiteralMethod", "typeMethod", "accessor", "enumMember"];
284
+ readonly format: readonly [];
285
+ }];
286
+ };
287
+ let settings: {
288
+ readonly [x: string]: unknown;
289
+ };
290
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./configs/node.js";
2
+ export * from "./configs/ts-node.js";
3
+ export * from "./configs/node-jest.js";
4
+ export * from "./configs/react.js";
5
+ export * from "./configs/react-jest.js";
6
+ export * from "./configs/dev-files.js";
@@ -0,0 +1,16 @@
1
+ declare namespace _default {
2
+ let rules: {
3
+ readonly "no-restricted-exports": ["error", {
4
+ readonly restrictDefaultExports: {
5
+ readonly named: false;
6
+ readonly namedFrom: false;
7
+ };
8
+ }];
9
+ readonly "no-underscore-dangle": ["error", {
10
+ readonly allow: readonly ["_dirname", "_testResult"];
11
+ readonly allowInArrayDestructuring: true;
12
+ readonly allowInObjectDestructuring: true;
13
+ }];
14
+ };
15
+ }
16
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ let files: ["type-tests/**/*.{js,jsx,ts,tsx}", "*.tt.{js,jsx,ts,tsx}", "tests/**/*.{js,jsx,ts,tsx}", "*.test.{js,jsx,ts,tsx}", "stories/**/*.{js,jsx,ts,tsx}", "*.stories.{js,jsx,ts,tsx}", "eslint.config.js", "jest.setup.js", "jest.config.js"];
3
+ let rules: {
4
+ readonly "import/no-extraneous-dependencies": ["error", {
5
+ readonly packageDir: readonly ["./", string];
6
+ }];
7
+ };
8
+ }
9
+ export default _default;
@@ -0,0 +1,44 @@
1
+ declare namespace _default {
2
+ let plugins: Record<string, import("eslint").ESLint.Plugin> | undefined;
3
+ let rules: {
4
+ readonly "import/no-extraneous-dependencies": ["error", {
5
+ readonly includeTypes: true;
6
+ }];
7
+ readonly "import/no-cycle": ["error", {
8
+ readonly maxDepth: number;
9
+ }];
10
+ readonly "import/no-self-import": "error";
11
+ readonly "import/no-absolute-path": "error";
12
+ readonly "import/default": "error";
13
+ readonly "import/export": "error";
14
+ readonly "import/prefer-default-export": "off";
15
+ readonly "import/namespace": ["error", {
16
+ readonly allowComputed: true;
17
+ }];
18
+ readonly "import/no-duplicates": "error";
19
+ readonly "import/no-named-as-default": "error";
20
+ readonly "import/no-named-as-default-member": "error";
21
+ readonly "import/unambiguous": "off";
22
+ readonly "import/exports-last": "error";
23
+ readonly "import/named": "off";
24
+ readonly "import/no-unresolved": "off";
25
+ readonly "import/extensions": ["error", "always", {
26
+ readonly ignorePackages: true;
27
+ }];
28
+ readonly "import/order": ["error", {
29
+ readonly groups: readonly ["builtin", "external", "internal", readonly ["index", "sibling", "parent"], "object", "unknown"];
30
+ readonly pathGroups: readonly [{
31
+ readonly pattern: "@self-ui/*";
32
+ readonly group: "external";
33
+ readonly position: "after";
34
+ }];
35
+ readonly pathGroupsExcludedImportTypes: readonly ["builtin"];
36
+ readonly alphabetize: {
37
+ readonly order: "asc";
38
+ readonly caseInsensitive: true;
39
+ };
40
+ }];
41
+ };
42
+ let settings: Record<string, unknown> | undefined;
43
+ }
44
+ export default _default;
@@ -0,0 +1,40 @@
1
+ declare namespace _default {
2
+ namespace plugins {
3
+ export { jsdoc };
4
+ }
5
+ let rules: {
6
+ readonly "jsdoc/sort-tags": ["error", {
7
+ readonly reportIntraTagGroupSpacing: false;
8
+ readonly reportTagGroupSpacing: false;
9
+ }];
10
+ readonly "jsdoc/tag-lines": ["error", "always", {
11
+ readonly startLines: 1;
12
+ readonly endLines: 0;
13
+ readonly applyToEndTag: false;
14
+ readonly tags: {
15
+ readonly returns: {
16
+ readonly lines: "always";
17
+ };
18
+ readonly property: {
19
+ readonly lines: "any";
20
+ };
21
+ readonly param: {
22
+ readonly lines: "any";
23
+ };
24
+ readonly example: {
25
+ readonly lines: "always";
26
+ };
27
+ };
28
+ }];
29
+ readonly "jsdoc/check-indentation": "error";
30
+ readonly "jsdoc/check-alignment": "error";
31
+ readonly "jsdoc/no-bad-blocks": "error";
32
+ readonly "jsdoc/require-asterisk-prefix": ["error", "always"];
33
+ readonly "jsdoc/require-description": "off";
34
+ readonly "jsdoc/require-property-description": "off";
35
+ readonly "jsdoc/require-param-description": "off";
36
+ readonly "jsdoc/require-returns-description": "off";
37
+ };
38
+ }
39
+ export default _default;
40
+ import jsdoc from "eslint-plugin-jsdoc";
@@ -0,0 +1,13 @@
1
+ declare namespace _default {
2
+ let files: ["jest.setup.{ts,js}", "jest.config.{ts,js}", "eslint.config.js"];
3
+ let rules: {
4
+ readonly "@nx/enforce-module-boundaries": ["error", {
5
+ readonly allow: readonly [];
6
+ readonly depConstraints: readonly [{
7
+ readonly sourceTag: "*";
8
+ readonly onlyDependOnLibsWithTags: readonly ["type:lib"];
9
+ }];
10
+ }];
11
+ };
12
+ }
13
+ export default _default;
@@ -0,0 +1,45 @@
1
+ declare namespace _default {
2
+ let plugins: {
3
+ readonly "@nx": Plugin;
4
+ };
5
+ let rules: {
6
+ readonly "@nx/enforce-module-boundaries": ["error", {
7
+ readonly allow: readonly [];
8
+ readonly depConstraints: readonly [{
9
+ sourceTag: string;
10
+ onlyDependOnLibsWithTags: string[];
11
+ }, {
12
+ sourceTag: string;
13
+ onlyDependOnLibsWithTags: string[];
14
+ }, {
15
+ sourceTag: string;
16
+ onlyDependOnLibsWithTags: string[];
17
+ }, {
18
+ sourceTag: string;
19
+ onlyDependOnLibsWithTags: string[];
20
+ }, {
21
+ sourceTag: string;
22
+ onlyDependOnLibsWithTags: string[];
23
+ }, {
24
+ sourceTag: string;
25
+ onlyDependOnLibsWithTags: string[];
26
+ }, {
27
+ sourceTag: string;
28
+ onlyDependOnLibsWithTags: string[];
29
+ }, {
30
+ sourceTag: string;
31
+ onlyDependOnLibsWithTags: string[];
32
+ }, {
33
+ sourceTag: string;
34
+ onlyDependOnLibsWithTags: string[];
35
+ }, {
36
+ sourceTag: string;
37
+ onlyDependOnLibsWithTags: string[];
38
+ }, {
39
+ sourceTag: string;
40
+ bannedExternalImports: string[];
41
+ }];
42
+ }];
43
+ };
44
+ }
45
+ export default _default;
@@ -0,0 +1,120 @@
1
+ declare namespace _default {
2
+ let plugins: {
3
+ readonly "react-hooks": Plugin;
4
+ readonly "react-refresh": {
5
+ rules: Record<string, any>;
6
+ configs: {
7
+ recommended: {
8
+ plugins: {
9
+ "react-refresh": {
10
+ rules: Record<string, any>;
11
+ };
12
+ };
13
+ rules: Record<string, any>;
14
+ };
15
+ vite: {
16
+ plugins: {
17
+ "react-refresh": {
18
+ rules: Record<string, any>;
19
+ };
20
+ };
21
+ rules: Record<string, any>;
22
+ };
23
+ };
24
+ };
25
+ };
26
+ let rules: {
27
+ readonly "react-refresh/only-export-components": "error";
28
+ readonly "react-hooks/rules-of-hooks": "error";
29
+ readonly "react-hooks/exhaustive-deps": "error";
30
+ readonly "react/display-name": "off";
31
+ readonly "react/jsx-key": "error";
32
+ readonly "react/void-dom-elements-no-children": "error";
33
+ readonly "react/prefer-es6-class": "error";
34
+ readonly "react/no-unused-prop-types": "error";
35
+ readonly "react/no-unused-state": "error";
36
+ readonly "react/no-unsafe": "error";
37
+ readonly "react/no-will-update-set-state": "error";
38
+ readonly "react/forbid-dom-props": ["error", {
39
+ readonly forbid: readonly ["id"];
40
+ }];
41
+ readonly "react/forbid-prop-types": ["error", {
42
+ readonly forbid: readonly ["any", "array", "object"];
43
+ }];
44
+ readonly "react/jsx-max-depth": "off";
45
+ readonly "react/no-this-in-sfc": "error";
46
+ readonly "react/jsx-no-comment-textnodes": "warn";
47
+ readonly "react/jsx-no-duplicate-props": "error";
48
+ readonly "react/jsx-no-target-blank": "error";
49
+ readonly "react/jsx-no-undef": ["error", {
50
+ readonly allowGlobals: true;
51
+ }];
52
+ readonly "react/jsx-uses-react": "error";
53
+ readonly "react/jsx-uses-vars": "error";
54
+ readonly "react/jsx-boolean-value": ["error", "always"];
55
+ readonly "react/no-children-prop": "error";
56
+ readonly "react/no-danger-with-children": "error";
57
+ readonly "react/no-deprecated": "error";
58
+ readonly "react/no-direct-mutation-state": "error";
59
+ readonly "react/no-find-dom-node": "error";
60
+ readonly "react/no-is-mounted": "error";
61
+ readonly "react/no-render-return-value": "error";
62
+ readonly "react/no-string-refs": "error";
63
+ readonly "react/no-unescaped-entities": "error";
64
+ readonly "react/no-unknown-property": "error";
65
+ readonly "react/function-component-definition": ["error", {
66
+ readonly namedComponents: "arrow-function";
67
+ readonly unnamedComponents: "arrow-function";
68
+ }];
69
+ readonly "react/prop-types": "off";
70
+ readonly "react/react-in-jsx-scope": "off";
71
+ readonly "react/require-render-return": "error";
72
+ readonly "react/require-optimization": "off";
73
+ readonly "react/boolean-prop-naming": ["error", {
74
+ readonly rule: "^(is|has|can|should).+";
75
+ readonly message: "({{ propName }}) must start with (is|has|can|should)";
76
+ }];
77
+ readonly "react/no-typos": "error";
78
+ readonly "react/no-redundant-should-component-update": "error";
79
+ readonly "react/no-multi-comp": "off";
80
+ readonly "react/no-did-update-set-state": "error";
81
+ readonly "react/no-did-mount-set-state": "error";
82
+ readonly "react/jsx-pascal-case": "error";
83
+ readonly "react/jsx-handler-names": ["error", {
84
+ readonly eventHandlerPrefix: "_?handle";
85
+ readonly eventHandlerPropPrefix: "on";
86
+ }];
87
+ readonly "react/jsx-curly-brace-presence": ["error", {
88
+ readonly props: "never";
89
+ readonly children: "never";
90
+ }];
91
+ readonly "react/require-default-props": ["error", {
92
+ readonly functions: "defaultArguments";
93
+ readonly forbidDefaultForRequired: true;
94
+ }];
95
+ readonly "react/default-props-match-prop-types": "error";
96
+ readonly "react/self-closing-comp": ["error", {
97
+ readonly component: true;
98
+ readonly html: true;
99
+ }];
100
+ readonly "react/sort-comp": ["error", {
101
+ readonly order: readonly ["init", "lifecycle", "rendering", "/^(_?)handle.+$/", "/^on.+$/"];
102
+ readonly groups: {
103
+ readonly init: readonly ["displayName", "statics", "static-methods", "state", "contextTypes", "childContextTypes", "constructor", "getDerivedStateFromProps"];
104
+ readonly rendering: readonly ["render", "/^_?render.+$/"];
105
+ readonly lifecycle: readonly ["mixins", "getDefaultProps", "getInitialState", "getChildContext", "componentWillMount", "componentDidMount", "componentWillReceiveProps", "shouldComponentUpdate", "componentWillUpdate", "componentDidUpdate", "componentWillUnmount", "componentDidCatch"];
106
+ };
107
+ }];
108
+ readonly "react/jsx-no-bind": "off";
109
+ readonly "react/destructuring-assignment": ["error", "always"];
110
+ readonly "react/no-access-state-in-setstate": "error";
111
+ readonly "react/button-has-type": "error";
112
+ readonly "react/jsx-props-no-spreading": "off";
113
+ };
114
+ namespace settings {
115
+ namespace react {
116
+ let version: "detect";
117
+ }
118
+ }
119
+ }
120
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ readonly name?: string;
3
+ readonly files?: Array<string | string[]>;
4
+ readonly ignores?: string[];
5
+ readonly language?: string;
6
+ readonly languageOptions?: import("eslint").Linter.LanguageOptions;
7
+ readonly linterOptions?: import("eslint").Linter.LinterOptions;
8
+ readonly processor?: string | import("eslint").Linter.Processor;
9
+ readonly plugins?: Record<string, import("eslint").ESLint.Plugin>;
10
+ readonly rules?: Partial<import("eslint").Linter.RulesRecord> | undefined;
11
+ readonly settings?: Record<string, unknown>;
12
+ };
13
+ export default _default;
@@ -0,0 +1,53 @@
1
+ declare namespace _default {
2
+ namespace languageOptions {
3
+ export { tsParser as parser };
4
+ }
5
+ let plugins: {
6
+ readonly "@typescript-eslint": any;
7
+ };
8
+ let rules: {
9
+ readonly "@typescript-eslint/no-unused-vars": ["error", {
10
+ readonly args: "all";
11
+ readonly argsIgnorePattern: "^_";
12
+ readonly caughtErrors: "all";
13
+ readonly caughtErrorsIgnorePattern: "^_";
14
+ readonly destructuredArrayIgnorePattern: "^_";
15
+ readonly varsIgnorePattern: "^_";
16
+ readonly ignoreRestSiblings: true;
17
+ }];
18
+ readonly "@typescript-eslint/require-await": "warn";
19
+ readonly "@typescript-eslint/dot-notation": "off";
20
+ readonly "@typescript-eslint/restrict-template-expressions": ["error", {
21
+ readonly allowBoolean: true;
22
+ readonly allowNumber: true;
23
+ }];
24
+ readonly "@typescript-eslint/no-var-requires": "off";
25
+ readonly "@typescript-eslint/no-use-before-define": "error";
26
+ readonly "@typescript-eslint/naming-convention": ["error", {
27
+ readonly selector: "default";
28
+ readonly leadingUnderscore: "allow";
29
+ readonly format: readonly ["camelCase", "PascalCase", "UPPER_CASE"];
30
+ }, {
31
+ readonly selector: "variable";
32
+ readonly types: readonly ["boolean"];
33
+ readonly format: readonly ["camelCase", "PascalCase"];
34
+ readonly prefix: readonly ["is", "has", "can", "does", "should", "will", "did", "was"];
35
+ }, {
36
+ readonly selector: "variable";
37
+ readonly types: readonly ["boolean", "number", "string", "array"];
38
+ readonly modifiers: readonly ["const", "global"];
39
+ readonly format: readonly ["UPPER_CASE"];
40
+ }, {
41
+ readonly selector: "typeAlias";
42
+ readonly format: readonly ["PascalCase"];
43
+ }, {
44
+ readonly selector: "typeParameter";
45
+ readonly format: readonly ["PascalCase"];
46
+ }, {
47
+ readonly selector: readonly ["classProperty", "objectLiteralProperty", "typeProperty", "classMethod", "objectLiteralMethod", "typeMethod", "accessor", "enumMember"];
48
+ readonly format: readonly [];
49
+ }];
50
+ };
51
+ }
52
+ export default _default;
53
+ import tsParser from "@typescript-eslint/parser";