@perfective/eslint-config 0.29.1 → 0.30.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 (77) hide show
  1. package/LICENSE +1 -1
  2. package/README.adoc +24 -19
  3. package/README.md +20 -17
  4. package/config/node.d.ts +7 -0
  5. package/config/node.js +7 -11
  6. package/config/plugin.d.ts +9 -0
  7. package/config/plugin.js +22 -26
  8. package/config.js +1 -6
  9. package/cypress.d.ts +5 -0
  10. package/cypress.js +31 -58
  11. package/index.d.ts +58 -26
  12. package/index.js +100 -145
  13. package/jest-dom.js +8 -11
  14. package/jest.d.ts +6 -0
  15. package/jest.js +29 -24
  16. package/package.json +18 -18
  17. package/rules/array-func/index.d.ts +1 -2
  18. package/rules/array-func/index.js +14 -50
  19. package/rules/cypress/index.d.ts +11 -3
  20. package/rules/cypress/index.js +23 -57
  21. package/rules/eslint/index.js +6 -9
  22. package/rules/eslint/layout-formatting.js +64 -67
  23. package/rules/eslint/possible-problems.js +96 -99
  24. package/rules/eslint/suggestions.js +181 -182
  25. package/rules/eslint-comments/best-practices.js +8 -11
  26. package/rules/eslint-comments/index.d.ts +1 -2
  27. package/rules/eslint-comments/index.js +9 -45
  28. package/rules/eslint-comments/stylistic-issues.js +9 -18
  29. package/rules/import/helpful-warnings.js +11 -14
  30. package/rules/import/index.js +11 -14
  31. package/rules/import/module-systems.js +10 -13
  32. package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
  33. package/rules/import/rules/no-extraneous-dependencies.js +20 -21
  34. package/rules/import/static-analysis.js +26 -29
  35. package/rules/import/style-guide.js +33 -36
  36. package/rules/jest/index.js +98 -72
  37. package/rules/jest/typescript-eslint.js +5 -8
  38. package/rules/jest-dom/index.js +19 -55
  39. package/rules/jsdoc/index.d.ts +1 -1
  40. package/rules/jsdoc/index.js +158 -344
  41. package/rules/n/index.d.ts +1 -1
  42. package/rules/n/index.js +64 -98
  43. package/rules/prefer-arrow/index.d.ts +1 -2
  44. package/rules/prefer-arrow/index.js +14 -50
  45. package/rules/promise/index.d.ts +1 -2
  46. package/rules/promise/index.js +35 -73
  47. package/rules/rxjs/index.d.ts +1 -1
  48. package/rules/rxjs/index.js +60 -96
  49. package/rules/security/index.d.ts +1 -2
  50. package/rules/security/index.js +22 -58
  51. package/rules/simple-import-sort/index.js +12 -48
  52. package/rules/simple-import-sort/rules/imports.d.ts +11 -0
  53. package/rules/simple-import-sort/rules/imports.js +18 -32
  54. package/rules/stylistic/js/index.d.ts +9 -2
  55. package/rules/stylistic/js/index.js +198 -236
  56. package/rules/stylistic/jsx/index.d.ts +8 -2
  57. package/rules/stylistic/jsx/index.js +81 -117
  58. package/rules/stylistic/plus/index.d.ts +6 -2
  59. package/rules/stylistic/plus/index.js +14 -50
  60. package/rules/stylistic/ts/index.d.ts +8 -2
  61. package/rules/stylistic/ts/index.js +135 -169
  62. package/rules/testing-library/index.js +41 -77
  63. package/rules/typescript-eslint/extension-rules.js +113 -116
  64. package/rules/typescript-eslint/index.d.ts +2 -0
  65. package/rules/typescript-eslint/index.js +9 -45
  66. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
  67. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
  68. package/rules/typescript-eslint/supported-rules.d.ts +2 -0
  69. package/rules/typescript-eslint/supported-rules.js +256 -319
  70. package/rules/unicorn/index.d.ts +7 -2
  71. package/rules/unicorn/index.js +178 -209
  72. package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
  73. package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
  74. package/rules.js +4 -14
  75. package/rxjs.d.ts +5 -0
  76. package/rxjs.js +21 -57
  77. package/testing-library.js +8 -11
@@ -1,48 +1,12 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.simpleImportSortConfig = void 0;
37
- const eslintPluginSimpleImportSort = __importStar(require("eslint-plugin-simple-import-sort"));
38
- const imports_1 = require("./rules/imports");
39
- exports.simpleImportSortConfig = {
40
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
41
- plugins: {
42
- 'simple-import-sort': eslintPluginSimpleImportSort,
43
- },
44
- rules: {
45
- 'simple-import-sort/exports': 'warn',
46
- 'simple-import-sort/imports': ['warn', (0, imports_1.simpleImportSortImports)()],
47
- },
48
- };
1
+ import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
2
+ import { simpleImportSortImports } from "./rules/imports.js";
3
+ export const simpleImportSortConfig = {
4
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
5
+ plugins: {
6
+ 'simple-import-sort': eslintPluginSimpleImportSort
7
+ },
8
+ rules: {
9
+ 'simple-import-sort/exports': 'warn',
10
+ 'simple-import-sort/imports': ['warn', simpleImportSortImports()]
11
+ }
12
+ };
@@ -3,6 +3,17 @@ export type Group = Match[];
3
3
  export interface SimpleImportSortImports {
4
4
  groups: Group[];
5
5
  }
6
+ /**
7
+ * Configuration for the "simple-import-sort/imports" ESLint rule.
8
+ *
9
+ * @param internal - A list of internal scopes. Each scope will sorted in its own group.
10
+ */
6
11
  export declare function simpleImportSortImports(internal?: string[]): SimpleImportSortImports;
12
+ /**
13
+ * @private
14
+ */
7
15
  export declare function scopedPackages(exclude: string[]): Group;
16
+ /**
17
+ * @private
18
+ */
8
19
  export declare function internalPackages(internal: string[]): Group[];
@@ -1,46 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.simpleImportSortImports = simpleImportSortImports;
4
- exports.scopedPackages = scopedPackages;
5
- exports.internalPackages = internalPackages;
6
- function simpleImportSortImports(internal = []) {
7
- return {
8
- groups: [
9
- sideEffects(),
10
- nodePrefixedModules(),
11
- unscopedPackages(),
12
- scopedPackages(internal),
13
- ...internalPackages(internal),
14
- parentImports(),
15
- relativeImports(),
16
- styleImports(),
17
- ].filter(group => group.length > 0),
18
- };
1
+ export function simpleImportSortImports(internal = []) {
2
+ return {
3
+ groups: [sideEffects(), nodePrefixedModules(), unscopedPackages(), scopedPackages(internal), ...internalPackages(internal), parentImports(), relativeImports(), styleImports()].filter(group => group.length > 0)
4
+ };
19
5
  }
20
6
  function sideEffects() {
21
- return ['^\\u0000'];
7
+ return ['^\\u0000'];
22
8
  }
23
9
  function nodePrefixedModules() {
24
- return ['^node:'];
10
+ return ['^node:'];
25
11
  }
26
12
  function unscopedPackages() {
27
- return ['^[a-zA-Z]'];
13
+ return ['^[a-zA-Z]'];
28
14
  }
29
- function scopedPackages(exclude) {
30
- if (exclude.length === 0) {
31
- return ['^@'];
32
- }
33
- return [`^(?!${exclude.join('|')})@`];
15
+ export function scopedPackages(exclude) {
16
+ if (exclude.length === 0) {
17
+ return ['^@'];
18
+ }
19
+ return [`^(?!${exclude.join('|')})@`];
34
20
  }
35
- function internalPackages(internal) {
36
- return internal.map(scope => [`^${scope}`]);
21
+ export function internalPackages(internal) {
22
+ return internal.map(scope => [`^${scope}`]);
37
23
  }
38
24
  function parentImports() {
39
- return ['^\\.\\.(?!/?$)', '^\\.\\./?$'];
25
+ return ['^\\.\\.(?!/?$)', '^\\.\\./?$'];
40
26
  }
41
27
  function relativeImports() {
42
- return ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'];
28
+ return ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'];
43
29
  }
44
30
  function styleImports() {
45
- return ['^.+\\.s?css$'];
46
- }
31
+ return ['^.+\\.s?css$'];
32
+ }
@@ -1,7 +1,13 @@
1
- import * as eslintPluginStylisticJs from '@stylistic/eslint-plugin-js';
2
1
  export declare const stylisticJsConfig: {
3
2
  plugins: {
4
- '@stylistic/js': typeof eslintPluginStylisticJs;
3
+ '@stylistic/js': {
4
+ rules: import("@stylistic/eslint-plugin-js").Rules;
5
+ configs: {
6
+ "disable-legacy": import("eslint").Linter.Config;
7
+ "all": import("eslint").Linter.Config;
8
+ "all-flat": import("eslint").Linter.Config;
9
+ };
10
+ };
5
11
  };
6
12
  rules: {
7
13
  '@stylistic/js/array-bracket-newline': string[];
@@ -100,6 +106,7 @@ export declare const stylisticJsConfig: {
100
106
  '@stylistic/js/no-extra-parens': (string | {
101
107
  ignoreJSX: string;
102
108
  nestedBinaryExpressions: boolean;
109
+ nestedConditionalExpressions: boolean;
103
110
  enforceForArrowConditionals: boolean;
104
111
  ternaryOperandBinaryExpressions: boolean;
105
112
  })[];
@@ -1,236 +1,198 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.stylisticJsConfig = void 0;
37
- const eslintPluginStylisticJs = __importStar(require("@stylistic/eslint-plugin-js"));
38
- exports.stylisticJsConfig = {
39
- plugins: {
40
- '@stylistic/js': eslintPluginStylisticJs,
41
- },
42
- rules: {
43
- '@stylistic/js/array-bracket-newline': ['warn', 'consistent'],
44
- '@stylistic/js/array-bracket-spacing': ['warn', 'never'],
45
- '@stylistic/js/array-element-newline': ['warn', 'consistent'],
46
- '@stylistic/js/arrow-parens': ['warn', 'as-needed'],
47
- '@stylistic/js/arrow-spacing': ['warn', {
48
- before: true,
49
- after: true,
50
- }],
51
- '@stylistic/js/block-spacing': ['warn', 'always'],
52
- '@stylistic/js/brace-style': ['warn', 'stroustrup', {
53
- allowSingleLine: false,
54
- }],
55
- '@stylistic/js/comma-dangle': ['warn', {
56
- arrays: 'always-multiline',
57
- objects: 'always-multiline',
58
- imports: 'always-multiline',
59
- exports: 'always-multiline',
60
- functions: 'always-multiline',
61
- }],
62
- '@stylistic/js/comma-spacing': ['warn', {
63
- before: false,
64
- after: true,
65
- }],
66
- '@stylistic/js/comma-style': ['warn', 'last'],
67
- '@stylistic/js/computed-property-spacing': ['warn', 'never'],
68
- '@stylistic/js/dot-location': ['warn', 'property'],
69
- '@stylistic/js/eol-last': ['warn', 'always'],
70
- '@stylistic/js/func-call-spacing': 'off',
71
- '@stylistic/js/function-call-argument-newline': ['warn', 'consistent'],
72
- '@stylistic/js/function-call-spacing': ['warn', 'never'],
73
- '@stylistic/js/function-paren-newline': ['warn', 'consistent'],
74
- '@stylistic/js/generator-star-spacing': ['warn', {
75
- before: true,
76
- after: false,
77
- }],
78
- '@stylistic/js/implicit-arrow-linebreak': ['warn', 'beside'],
79
- '@stylistic/js/indent': ['warn', 4, {
80
- SwitchCase: 1,
81
- }],
82
- '@stylistic/js/jsx-quotes': ['warn', 'prefer-double'],
83
- '@stylistic/js/key-spacing': ['warn', {
84
- beforeColon: false,
85
- afterColon: true,
86
- mode: 'strict',
87
- }],
88
- '@stylistic/js/keyword-spacing': ['warn', {
89
- before: true,
90
- after: true,
91
- }],
92
- '@stylistic/js/line-comment-position': ['error', {
93
- position: 'above',
94
- ignorePattern: '^ == .+',
95
- }],
96
- '@stylistic/js/linebreak-style': ['warn', 'unix'],
97
- '@stylistic/js/lines-around-comment': ['warn', {
98
- beforeBlockComment: true,
99
- afterBlockComment: false,
100
- beforeLineComment: false,
101
- afterLineComment: false,
102
- allowBlockStart: false,
103
- allowBlockEnd: false,
104
- allowObjectStart: false,
105
- allowObjectEnd: false,
106
- allowArrayStart: false,
107
- allowArrayEnd: false,
108
- allowClassStart: true,
109
- allowClassEnd: false,
110
- afterHashbangComment: true,
111
- }],
112
- '@stylistic/js/lines-between-class-members': ['warn', 'always', {
113
- exceptAfterSingleLine: true,
114
- }],
115
- '@stylistic/js/max-len': ['error', {
116
- code: 120,
117
- tabWidth: 4,
118
- ignoreRegExpLiterals: true,
119
- ignoreUrls: true,
120
- }],
121
- '@stylistic/js/max-statements-per-line': ['error', {
122
- max: 1,
123
- }],
124
- '@stylistic/js/multiline-comment-style': ['warn', 'separate-lines', {
125
- checkJSDoc: false,
126
- }],
127
- '@stylistic/js/multiline-ternary': ['warn', 'always-multiline'],
128
- '@stylistic/js/new-parens': 'warn',
129
- '@stylistic/js/newline-per-chained-call': ['off', {
130
- ignoreChainWithDepth: 3,
131
- }],
132
- '@stylistic/js/no-confusing-arrow': ['warn', {
133
- allowParens: true,
134
- onlyOneSimpleParam: false,
135
- }],
136
- '@stylistic/js/no-extra-parens': ['warn', 'all', {
137
- ignoreJSX: 'all',
138
- nestedBinaryExpressions: false,
139
- enforceForArrowConditionals: false,
140
- ternaryOperandBinaryExpressions: false,
141
- }],
142
- '@stylistic/js/no-extra-semi': 'warn',
143
- '@stylistic/js/no-floating-decimal': 'warn',
144
- '@stylistic/js/no-mixed-operators': ['error', {
145
- groups: [
146
- ['+', '-'],
147
- ['*', '/', '%', '**'],
148
- ['&', '|', '^', '~', '<<', '>>', '>>>'],
149
- ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
150
- ['&&', '||', '?:', '??'],
151
- ['in', 'instanceof'],
152
- ],
153
- allowSamePrecedence: true,
154
- }],
155
- '@stylistic/js/no-mixed-spaces-and-tabs': 'error',
156
- '@stylistic/js/no-multi-spaces': 'warn',
157
- '@stylistic/js/no-multiple-empty-lines': ['warn', {
158
- max: 1,
159
- maxEOF: 0,
160
- maxBOF: 0,
161
- }],
162
- '@stylistic/js/no-tabs': 'error',
163
- '@stylistic/js/no-trailing-spaces': 'warn',
164
- '@stylistic/js/no-whitespace-before-property': 'warn',
165
- '@stylistic/js/nonblock-statement-body-position': ['warn', 'below'],
166
- '@stylistic/js/object-curly-newline': ['warn', {
167
- ImportDeclaration: { multiline: true },
168
- ExportDeclaration: { multiline: true },
169
- }],
170
- '@stylistic/js/object-curly-spacing': ['warn', 'always', {
171
- arraysInObjects: true,
172
- objectsInObjects: true,
173
- }],
174
- '@stylistic/js/object-property-newline': ['warn', {
175
- allowAllPropertiesOnSameLine: true,
176
- }],
177
- '@stylistic/js/one-var-declaration-per-line': ['warn', 'always'],
178
- '@stylistic/js/operator-linebreak': ['warn', 'before', {
179
- overrides: {
180
- '=': 'none',
181
- '==': 'none',
182
- '!=': 'none',
183
- '>=': 'none',
184
- '<=': 'none',
185
- '===': 'none',
186
- '+=': 'none',
187
- },
188
- }],
189
- '@stylistic/js/padded-blocks': ['warn', 'never'],
190
- '@stylistic/js/padding-line-between-statements': 'off',
191
- '@stylistic/js/quote-props': ['warn', 'consistent-as-needed'],
192
- '@stylistic/js/quotes': ['warn', 'single', {
193
- avoidEscape: true,
194
- allowTemplateLiterals: true,
195
- ignoreStringLiterals: false,
196
- }],
197
- '@stylistic/js/rest-spread-spacing': ['warn', 'never'],
198
- '@stylistic/js/semi': ['warn', 'always'],
199
- '@stylistic/js/semi-spacing': ['warn', {
200
- before: false,
201
- after: true,
202
- }],
203
- '@stylistic/js/semi-style': ['warn', 'last'],
204
- '@stylistic/js/space-before-blocks': ['warn', 'always'],
205
- '@stylistic/js/space-before-function-paren': ['warn', {
206
- anonymous: 'always',
207
- named: 'never',
208
- asyncArrow: 'always',
209
- }],
210
- '@stylistic/js/space-in-parens': ['warn', 'never'],
211
- '@stylistic/js/space-infix-ops': ['warn', {
212
- int32Hint: false,
213
- }],
214
- '@stylistic/js/space-unary-ops': ['warn', {
215
- words: true,
216
- nonwords: false,
217
- }],
218
- '@stylistic/js/spaced-comment': ['warn', 'always', {
219
- line: {
220
- markers: ['/ <reference'],
221
- },
222
- }],
223
- '@stylistic/js/switch-colon-spacing': ['warn', {
224
- after: true,
225
- before: false,
226
- }],
227
- '@stylistic/js/template-curly-spacing': ['warn', 'never'],
228
- '@stylistic/js/template-tag-spacing': ['warn', 'never'],
229
- '@stylistic/js/wrap-iife': ['warn', 'outside'],
230
- '@stylistic/js/wrap-regex': 'warn',
231
- '@stylistic/js/yield-star-spacing': ['warn', {
232
- before: true,
233
- after: false,
234
- }],
235
- },
236
- };
1
+ import eslintPluginStylisticJs from '@stylistic/eslint-plugin-js';
2
+ export const stylisticJsConfig = {
3
+ plugins: {
4
+ '@stylistic/js': eslintPluginStylisticJs
5
+ },
6
+ rules: {
7
+ '@stylistic/js/array-bracket-newline': ['warn', 'consistent'],
8
+ '@stylistic/js/array-bracket-spacing': ['warn', 'never'],
9
+ '@stylistic/js/array-element-newline': ['warn', 'consistent'],
10
+ '@stylistic/js/arrow-parens': ['warn', 'as-needed'],
11
+ '@stylistic/js/arrow-spacing': ['warn', {
12
+ before: true,
13
+ after: true
14
+ }],
15
+ '@stylistic/js/block-spacing': ['warn', 'always'],
16
+ '@stylistic/js/brace-style': ['warn', 'stroustrup', {
17
+ allowSingleLine: false
18
+ }],
19
+ '@stylistic/js/comma-dangle': ['warn', {
20
+ arrays: 'always-multiline',
21
+ objects: 'always-multiline',
22
+ imports: 'always-multiline',
23
+ exports: 'always-multiline',
24
+ functions: 'always-multiline'
25
+ }],
26
+ '@stylistic/js/comma-spacing': ['warn', {
27
+ before: false,
28
+ after: true
29
+ }],
30
+ '@stylistic/js/comma-style': ['warn', 'last'],
31
+ '@stylistic/js/computed-property-spacing': ['warn', 'never'],
32
+ '@stylistic/js/dot-location': ['warn', 'property'],
33
+ '@stylistic/js/eol-last': ['warn', 'always'],
34
+ '@stylistic/js/func-call-spacing': 'off',
35
+ '@stylistic/js/function-call-argument-newline': ['warn', 'consistent'],
36
+ '@stylistic/js/function-call-spacing': ['warn', 'never'],
37
+ '@stylistic/js/function-paren-newline': ['warn', 'consistent'],
38
+ '@stylistic/js/generator-star-spacing': ['warn', {
39
+ before: true,
40
+ after: false
41
+ }],
42
+ '@stylistic/js/implicit-arrow-linebreak': ['warn', 'beside'],
43
+ '@stylistic/js/indent': ['warn', 4, {
44
+ SwitchCase: 1
45
+ }],
46
+ '@stylistic/js/jsx-quotes': ['warn', 'prefer-double'],
47
+ '@stylistic/js/key-spacing': ['warn', {
48
+ beforeColon: false,
49
+ afterColon: true,
50
+ mode: 'strict'
51
+ }],
52
+ '@stylistic/js/keyword-spacing': ['warn', {
53
+ before: true,
54
+ after: true
55
+ }],
56
+ '@stylistic/js/line-comment-position': ['error', {
57
+ position: 'above',
58
+ ignorePattern: '^ == .+'
59
+ }],
60
+ '@stylistic/js/linebreak-style': ['warn', 'unix'],
61
+ '@stylistic/js/lines-around-comment': ['warn', {
62
+ beforeBlockComment: true,
63
+ afterBlockComment: false,
64
+ beforeLineComment: false,
65
+ afterLineComment: false,
66
+ allowBlockStart: false,
67
+ allowBlockEnd: false,
68
+ allowObjectStart: false,
69
+ allowObjectEnd: false,
70
+ allowArrayStart: false,
71
+ allowArrayEnd: false,
72
+ allowClassStart: true,
73
+ allowClassEnd: false,
74
+ afterHashbangComment: true
75
+ }],
76
+ '@stylistic/js/lines-between-class-members': ['warn', 'always', {
77
+ exceptAfterSingleLine: true
78
+ }],
79
+ '@stylistic/js/max-len': ['error', {
80
+ code: 120,
81
+ tabWidth: 4,
82
+ ignoreRegExpLiterals: true,
83
+ ignoreUrls: true
84
+ }],
85
+ '@stylistic/js/max-statements-per-line': ['error', {
86
+ max: 1
87
+ }],
88
+ '@stylistic/js/multiline-comment-style': ['warn', 'separate-lines', {
89
+ checkJSDoc: false
90
+ }],
91
+ '@stylistic/js/multiline-ternary': ['warn', 'always-multiline'],
92
+ '@stylistic/js/new-parens': 'warn',
93
+ '@stylistic/js/newline-per-chained-call': ['off', {
94
+ ignoreChainWithDepth: 3
95
+ }],
96
+ '@stylistic/js/no-confusing-arrow': ['warn', {
97
+ allowParens: true,
98
+ onlyOneSimpleParam: false
99
+ }],
100
+ '@stylistic/js/no-extra-parens': ['warn', 'all', {
101
+ ignoreJSX: 'all',
102
+ nestedBinaryExpressions: false,
103
+ nestedConditionalExpressions: false,
104
+ enforceForArrowConditionals: false,
105
+ ternaryOperandBinaryExpressions: false
106
+ }],
107
+ '@stylistic/js/no-extra-semi': 'warn',
108
+ '@stylistic/js/no-floating-decimal': 'warn',
109
+ '@stylistic/js/no-mixed-operators': ['error', {
110
+ groups: [['+', '-'], ['*', '/', '%', '**'], ['&', '|', '^', '~', '<<', '>>', '>>>'], ['==', '!=', '===', '!==', '>', '>=', '<', '<='], ['&&', '||', '?:', '??'], ['in', 'instanceof']],
111
+ allowSamePrecedence: true
112
+ }],
113
+ '@stylistic/js/no-mixed-spaces-and-tabs': 'error',
114
+ '@stylistic/js/no-multi-spaces': 'warn',
115
+ '@stylistic/js/no-multiple-empty-lines': ['warn', {
116
+ max: 1,
117
+ maxEOF: 0,
118
+ maxBOF: 0
119
+ }],
120
+ '@stylistic/js/no-tabs': 'error',
121
+ '@stylistic/js/no-trailing-spaces': 'warn',
122
+ '@stylistic/js/no-whitespace-before-property': 'warn',
123
+ '@stylistic/js/nonblock-statement-body-position': ['warn', 'below'],
124
+ '@stylistic/js/object-curly-newline': ['warn', {
125
+ ImportDeclaration: {
126
+ multiline: true
127
+ },
128
+ ExportDeclaration: {
129
+ multiline: true
130
+ }
131
+ }],
132
+ '@stylistic/js/object-curly-spacing': ['warn', 'always', {
133
+ arraysInObjects: true,
134
+ objectsInObjects: true
135
+ }],
136
+ '@stylistic/js/object-property-newline': ['warn', {
137
+ allowAllPropertiesOnSameLine: true
138
+ }],
139
+ '@stylistic/js/one-var-declaration-per-line': ['warn', 'always'],
140
+ '@stylistic/js/operator-linebreak': ['warn', 'before', {
141
+ overrides: {
142
+ '=': 'none',
143
+ '==': 'none',
144
+ '!=': 'none',
145
+ '>=': 'none',
146
+ '<=': 'none',
147
+ '===': 'none',
148
+ '+=': 'none'
149
+ }
150
+ }],
151
+ '@stylistic/js/padded-blocks': ['warn', 'never'],
152
+ '@stylistic/js/padding-line-between-statements': 'off',
153
+ '@stylistic/js/quote-props': ['warn', 'consistent-as-needed'],
154
+ '@stylistic/js/quotes': ['warn', 'single', {
155
+ avoidEscape: true,
156
+ allowTemplateLiterals: true,
157
+ ignoreStringLiterals: false
158
+ }],
159
+ '@stylistic/js/rest-spread-spacing': ['warn', 'never'],
160
+ '@stylistic/js/semi': ['warn', 'always'],
161
+ '@stylistic/js/semi-spacing': ['warn', {
162
+ before: false,
163
+ after: true
164
+ }],
165
+ '@stylistic/js/semi-style': ['warn', 'last'],
166
+ '@stylistic/js/space-before-blocks': ['warn', 'always'],
167
+ '@stylistic/js/space-before-function-paren': ['warn', {
168
+ anonymous: 'always',
169
+ named: 'never',
170
+ asyncArrow: 'always'
171
+ }],
172
+ '@stylistic/js/space-in-parens': ['warn', 'never'],
173
+ '@stylistic/js/space-infix-ops': ['warn', {
174
+ int32Hint: false
175
+ }],
176
+ '@stylistic/js/space-unary-ops': ['warn', {
177
+ words: true,
178
+ nonwords: false
179
+ }],
180
+ '@stylistic/js/spaced-comment': ['warn', 'always', {
181
+ line: {
182
+ markers: ['/ <reference']
183
+ }
184
+ }],
185
+ '@stylistic/js/switch-colon-spacing': ['warn', {
186
+ after: true,
187
+ before: false
188
+ }],
189
+ '@stylistic/js/template-curly-spacing': ['warn', 'never'],
190
+ '@stylistic/js/template-tag-spacing': ['warn', 'never'],
191
+ '@stylistic/js/wrap-iife': ['warn', 'outside'],
192
+ '@stylistic/js/wrap-regex': 'warn',
193
+ '@stylistic/js/yield-star-spacing': ['warn', {
194
+ before: true,
195
+ after: false
196
+ }]
197
+ }
198
+ };
@@ -1,7 +1,13 @@
1
- import * as eslintPluginStylisticJsx from '@stylistic/eslint-plugin-jsx';
2
1
  export declare const stylisticJsxConfig: {
3
2
  plugins: {
4
- '@stylistic/jsx': typeof eslintPluginStylisticJsx;
3
+ '@stylistic/jsx': {
4
+ rules: import("@stylistic/eslint-plugin-jsx").Rules;
5
+ configs: {
6
+ "disable-legacy": import("eslint").Linter.Config;
7
+ "all": import("eslint").Linter.Config;
8
+ "all-flat": import("eslint").Linter.Config;
9
+ };
10
+ };
5
11
  };
6
12
  rules: {
7
13
  '@stylistic/jsx/jsx-child-element-spacing': string;