@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.
- package/LICENSE +1 -1
- package/README.adoc +24 -19
- package/README.md +20 -17
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -58
- package/index.d.ts +58 -26
- package/index.js +100 -145
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -18
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020-
|
|
3
|
+
Copyright (c) 2020-2025 Andrey Mikheychik (https://github.com/amikheychik)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.adoc
CHANGED
|
@@ -40,7 +40,6 @@ from issues that will be fixed automatically.
|
|
|
40
40
|
----
|
|
41
41
|
npm install --save-dev \
|
|
42
42
|
@perfective/eslint-config \
|
|
43
|
-
@babel/eslint-parser \
|
|
44
43
|
@stylistic/eslint-plugin \
|
|
45
44
|
@stylistic/eslint-plugin-js \
|
|
46
45
|
@stylistic/eslint-plugin-jsx \
|
|
@@ -91,21 +90,25 @@ npm install --save-dev \
|
|
|
91
90
|
+
|
|
92
91
|
[source,javascript]
|
|
93
92
|
----
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
93
|
+
import perfectiveEslintConfig from '@perfective/eslint-config';
|
|
94
|
+
|
|
95
|
+
// Optional dependencies.
|
|
96
|
+
import { cypressConfig } from '@perfective/eslint-config/cypress';
|
|
97
|
+
import { jestConfig } from '@perfective/eslint-config/jest';
|
|
98
|
+
import { jestDomConfig } from '@perfective/eslint-config/jest-dom';
|
|
99
|
+
import { rxjsConfig } from '@perfective/eslint-config/rxjs';
|
|
100
|
+
import { testingLibraryConfig } from '@perfective/eslint-config/testing-library';
|
|
101
|
+
|
|
102
|
+
const eslintConfig = [
|
|
103
|
+
...perfectiveEslintConfig,
|
|
104
|
+
cypressConfig(),
|
|
105
|
+
jestConfig(),
|
|
106
|
+
jestDomConfig(),
|
|
107
|
+
rxjsConfig(),
|
|
108
|
+
testingLibraryConfig(),
|
|
108
109
|
];
|
|
110
|
+
|
|
111
|
+
export default eslintConfig;
|
|
109
112
|
----
|
|
110
113
|
|
|
111
114
|
== Rules Configuration Extension Functions
|
|
@@ -123,11 +126,11 @@ you can use these functions in the `eslint.config.js` file:
|
|
|
123
126
|
|
|
124
127
|
[source,javascript]
|
|
125
128
|
----
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
import perfectiveEslintConfig from '@perfective/eslint-config';
|
|
130
|
+
import { simpleImportSortImports } from '@perfective/eslint-config/rules'; // <.>
|
|
128
131
|
|
|
129
|
-
|
|
130
|
-
...perfectiveEslintConfig
|
|
132
|
+
const eslintConfig = [
|
|
133
|
+
...perfectiveEslintConfig,
|
|
131
134
|
{
|
|
132
135
|
files: ['**/*.[jt]s?(x)'],
|
|
133
136
|
rules: {
|
|
@@ -137,6 +140,8 @@ module.exports = [
|
|
|
137
140
|
},
|
|
138
141
|
},
|
|
139
142
|
];
|
|
143
|
+
|
|
144
|
+
export default eslintConfig;
|
|
140
145
|
----
|
|
141
146
|
<1> Framework-specific packages, based on `@perfective/eslint-config`, re-export all the rules.
|
|
142
147
|
So rules should be required from those packages for correct `node_modules` resolution.
|
package/README.md
CHANGED
|
@@ -38,7 +38,6 @@ from issues that will be fixed automatically.
|
|
|
38
38
|
```bash
|
|
39
39
|
npm install --save-dev \
|
|
40
40
|
@perfective/eslint-config \
|
|
41
|
-
@babel/eslint-parser \
|
|
42
41
|
@stylistic/eslint-plugin \
|
|
43
42
|
@stylistic/eslint-plugin-js \
|
|
44
43
|
@stylistic/eslint-plugin-jsx \
|
|
@@ -62,9 +61,9 @@ from issues that will be fixed automatically.
|
|
|
62
61
|
2. Require the configuration in your root `eslint.config.js`.
|
|
63
62
|
|
|
64
63
|
```javascript
|
|
65
|
-
|
|
64
|
+
import perfectiveEslintConfig from '@perfective/eslint-config';
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
export default perfectiveEslintConfig;
|
|
68
67
|
```
|
|
69
68
|
|
|
70
69
|
3. Install optional peer dependencies that add linting rules for the tools you use.
|
|
@@ -84,19 +83,23 @@ from issues that will be fixed automatically.
|
|
|
84
83
|
4. Add optional configurations to your root `eslint.config.js`.
|
|
85
84
|
|
|
86
85
|
```javascript
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
86
|
+
import perfectiveEslintConfig from '@perfective/eslint-config';
|
|
87
|
+
|
|
88
|
+
// Optional dependencies.
|
|
89
|
+
import { cypressConfig } from '@perfective/eslint-config/cypress';
|
|
90
|
+
import { jestConfig } from '@perfective/eslint-config/jest';
|
|
91
|
+
import { jestDomConfig } from '@perfective/eslint-config/jest-dom';
|
|
92
|
+
import { rxjsConfig } from '@perfective/eslint-config/rxjs';
|
|
93
|
+
import { testingLibraryConfig } from '@perfective/eslint-config/testing-library';
|
|
94
|
+
|
|
95
|
+
const eslintConfig = [
|
|
96
|
+
...perfectiveEslintConfig,
|
|
97
|
+
cypressConfig(),
|
|
98
|
+
jestConfig(),
|
|
99
|
+
jestDomConfig(),
|
|
100
|
+
rxjsConfig(),
|
|
101
|
+
testingLibraryConfig(),
|
|
101
102
|
];
|
|
103
|
+
|
|
104
|
+
export default eslintConfig;
|
|
102
105
|
```
|
package/config/node.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if a given `module` can be resolved in node_modules.
|
|
3
|
+
*
|
|
4
|
+
* A module does not have to be required directly by the package.json.
|
|
5
|
+
* The function returns true,
|
|
6
|
+
* even if it is installed as a dependency of another dependency but can be loaded by NodeJS.
|
|
7
|
+
*/
|
|
1
8
|
export declare function hasNodeModule(module: string): boolean;
|
package/config/node.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
catch (_a) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
export function hasNodeModule(module) {
|
|
2
|
+
try {
|
|
3
|
+
return Boolean(require.resolve(module));
|
|
4
|
+
} catch (_a) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
}
|
package/config/plugin.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* If a given rule belongs to an installed ESLint plugin,
|
|
3
|
+
* returns an object with rule as a key and its config as a value.
|
|
4
|
+
*
|
|
5
|
+
* Otherwise, returns an empty object.
|
|
6
|
+
*/
|
|
1
7
|
export declare function optionalRule(rule: string, config: unknown): Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if a given ESLint plugin exists.
|
|
10
|
+
*/
|
|
2
11
|
export declare function hasEslintPlugin(plugin: string): boolean;
|
package/config/plugin.js
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const node_1 = require("./node");
|
|
6
|
-
function optionalRule(rule, config) {
|
|
7
|
-
const plugin = pluginOfRule(rule);
|
|
8
|
-
if (plugin === null) {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
if (hasEslintPlugin(plugin)) {
|
|
12
|
-
return {
|
|
13
|
-
[rule]: config,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
1
|
+
import { hasNodeModule } from "./node.js";
|
|
2
|
+
export function optionalRule(rule, config) {
|
|
3
|
+
const plugin = pluginOfRule(rule);
|
|
4
|
+
if (plugin === null) {
|
|
16
5
|
return {};
|
|
6
|
+
}
|
|
7
|
+
if (hasEslintPlugin(plugin)) {
|
|
8
|
+
return {
|
|
9
|
+
[rule]: config
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {};
|
|
17
13
|
}
|
|
18
|
-
function hasEslintPlugin(plugin) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
export function hasEslintPlugin(plugin) {
|
|
15
|
+
if (plugin.startsWith('@')) {
|
|
16
|
+
return hasNodeModule(`${plugin}/eslint-plugin`);
|
|
17
|
+
}
|
|
18
|
+
return hasNodeModule(`eslint-plugin-${plugin}`);
|
|
23
19
|
}
|
|
24
20
|
function pluginOfRule(rule) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
21
|
+
const parts = rule.split('/');
|
|
22
|
+
if (parts.length > 1) {
|
|
23
|
+
return parts[0];
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
package/config.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.optionalRule = exports.hasEslintPlugin = void 0;
|
|
4
|
-
var plugin_1 = require("./config/plugin");
|
|
5
|
-
Object.defineProperty(exports, "hasEslintPlugin", { enumerable: true, get: function () { return plugin_1.hasEslintPlugin; } });
|
|
6
|
-
Object.defineProperty(exports, "optionalRule", { enumerable: true, get: function () { return plugin_1.optionalRule; } });
|
|
1
|
+
export { hasEslintPlugin, optionalRule } from "./config/plugin.js";
|
package/cypress.d.ts
CHANGED
package/cypress.js
CHANGED
|
@@ -1,58 +1,31 @@
|
|
|
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
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.cypressConfig = cypressConfig;
|
|
37
|
-
const tsEslint = __importStar(require("typescript-eslint"));
|
|
38
|
-
const cypress_1 = require("./rules/cypress");
|
|
39
|
-
const no_extraneous_dependencies_1 = require("./rules/import/rules/no-extraneous-dependencies");
|
|
40
|
-
function cypressConfig(files = ['cypress/**/*.[jt]s']) {
|
|
41
|
-
return {
|
|
42
|
-
files,
|
|
43
|
-
languageOptions: Object.assign(Object.assign({}, cypress_1.cypressOptionalConfig.languageOptions), { parser: tsEslint.parser, parserOptions: {
|
|
44
|
-
ecmaVersion: 6,
|
|
45
|
-
ecmaFeatures: {
|
|
46
|
-
globalReturn: false,
|
|
47
|
-
impliedStrict: true,
|
|
48
|
-
},
|
|
49
|
-
sourceType: 'module',
|
|
50
|
-
project: './tsconfig.json',
|
|
51
|
-
warnOnUnsupportedTypeScriptVersion: true,
|
|
52
|
-
} }),
|
|
53
|
-
plugins: Object.assign({}, cypress_1.cypressOptionalConfig.plugins),
|
|
54
|
-
rules: Object.assign(Object.assign({}, cypress_1.cypressOptionalConfig.rules), { 'init-declarations': 'off', '@typescript-eslint/init-declarations': 'off', 'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.cypressImportNoExtraneousDependencies)()], 'max-nested-callbacks': ['error', 4], 'new-cap': ['error', {
|
|
55
|
-
capIsNewExceptions: ['Given', 'When', 'Then', 'And', 'But', 'Before', 'After'],
|
|
56
|
-
}] }),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
1
|
+
import { parser } from 'typescript-eslint';
|
|
2
|
+
import { cypressOptionalConfig } from "./rules/cypress/index.js";
|
|
3
|
+
import { cypressImportNoExtraneousDependencies } from "./rules/import/rules/no-extraneous-dependencies.js";
|
|
4
|
+
export function cypressConfig(files = ['cypress/**/*.[jt]s']) {
|
|
5
|
+
return {
|
|
6
|
+
files,
|
|
7
|
+
languageOptions: Object.assign({
|
|
8
|
+
sourceType: 'module',
|
|
9
|
+
ecmaVersion: 'latest',
|
|
10
|
+
parser,
|
|
11
|
+
parserOptions: {
|
|
12
|
+
ecmaFeatures: {
|
|
13
|
+
globalReturn: false,
|
|
14
|
+
impliedStrict: true
|
|
15
|
+
},
|
|
16
|
+
projectService: true,
|
|
17
|
+
warnOnUnsupportedTypeScriptVersion: true
|
|
18
|
+
}
|
|
19
|
+
}, cypressOptionalConfig.languageOptions),
|
|
20
|
+
plugins: Object.assign({}, cypressOptionalConfig.plugins),
|
|
21
|
+
rules: Object.assign(Object.assign({}, cypressOptionalConfig.rules), {
|
|
22
|
+
'init-declarations': 'off',
|
|
23
|
+
'@typescript-eslint/init-declarations': 'off',
|
|
24
|
+
'import/no-extraneous-dependencies': ['error', cypressImportNoExtraneousDependencies()],
|
|
25
|
+
'max-nested-callbacks': ['error', 4],
|
|
26
|
+
'new-cap': ['error', {
|
|
27
|
+
capIsNewExceptions: ['Given', 'When', 'Then', 'And', 'But', 'Before', 'After']
|
|
28
|
+
}]
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as babelParser from '@babel/eslint-parser';
|
|
2
1
|
declare const _default: ({
|
|
3
2
|
ignores: string[];
|
|
4
3
|
files?: undefined;
|
|
@@ -9,43 +8,56 @@ declare const _default: ({
|
|
|
9
8
|
} | {
|
|
10
9
|
files: string[];
|
|
11
10
|
languageOptions: {
|
|
11
|
+
sourceType: string;
|
|
12
|
+
ecmaVersion: string;
|
|
12
13
|
parser: import("@typescript-eslint/utils/dist/ts-eslint").Parser.LooseParserModule;
|
|
13
14
|
parserOptions: {
|
|
14
|
-
ecmaVersion: number;
|
|
15
15
|
ecmaFeatures: {
|
|
16
16
|
globalReturn: boolean;
|
|
17
17
|
impliedStrict: boolean;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
projectService: {
|
|
20
|
+
allowDefaultProject: string[];
|
|
21
|
+
};
|
|
21
22
|
warnOnUnsupportedTypeScriptVersion: boolean;
|
|
22
|
-
requireConfigFile?: undefined;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
plugins: {
|
|
26
26
|
unicorn: import("eslint").ESLint.Plugin & {
|
|
27
27
|
configs: {
|
|
28
|
-
recommended: import("eslint").Linter.
|
|
29
|
-
all: import("eslint").Linter.
|
|
28
|
+
recommended: import("eslint").Linter.FlatConfig;
|
|
29
|
+
all: import("eslint").Linter.FlatConfig;
|
|
30
30
|
"flat/all": import("eslint").Linter.FlatConfig;
|
|
31
31
|
"flat/recommended": import("eslint").Linter.FlatConfig;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
'@stylistic/plus':
|
|
35
|
-
|
|
34
|
+
'@stylistic/plus': {
|
|
35
|
+
rules: import("@stylistic/eslint-plugin-plus").Rules;
|
|
36
|
+
configs: {
|
|
37
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
'@stylistic/js': {
|
|
41
|
+
rules: import("@stylistic/eslint-plugin-js").Rules;
|
|
42
|
+
configs: {
|
|
43
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
44
|
+
"all": import("eslint").Linter.Config;
|
|
45
|
+
"all-flat": import("eslint").Linter.Config;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
36
48
|
'simple-import-sort': import("eslint").ESLint.Plugin;
|
|
37
|
-
security:
|
|
38
|
-
promise:
|
|
39
|
-
'prefer-arrow':
|
|
49
|
+
security: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
50
|
+
promise: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
51
|
+
'prefer-arrow': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
40
52
|
n: import("eslint").ESLint.Plugin & {
|
|
41
53
|
configs: import("eslint-plugin-n").Configs;
|
|
42
54
|
};
|
|
43
55
|
jsdoc: {
|
|
44
|
-
rules: Record<string, import("eslint").
|
|
56
|
+
rules: Record<string, import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>> | undefined;
|
|
45
57
|
};
|
|
46
58
|
import: Record<string, unknown>;
|
|
47
|
-
'eslint-comments':
|
|
48
|
-
'array-func':
|
|
59
|
+
'eslint-comments': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
60
|
+
'array-func': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
49
61
|
};
|
|
50
62
|
settings: {
|
|
51
63
|
jsdoc: {
|
|
@@ -75,6 +87,8 @@ declare const _default: ({
|
|
|
75
87
|
rules: {
|
|
76
88
|
'unicorn/better-regex': string;
|
|
77
89
|
'unicorn/catch-error-name': string;
|
|
90
|
+
'unicorn/consistent-assert': string;
|
|
91
|
+
'unicorn/consistent-date-clone': string;
|
|
78
92
|
'unicorn/consistent-destructuring': string;
|
|
79
93
|
'unicorn/consistent-empty-array-spread': string;
|
|
80
94
|
'unicorn/consistent-existence-index-check': string;
|
|
@@ -94,6 +108,7 @@ declare const _default: ({
|
|
|
94
108
|
'unicorn/import-style': string;
|
|
95
109
|
'unicorn/new-for-builtins': string;
|
|
96
110
|
'unicorn/no-abusive-eslint-disable': string;
|
|
111
|
+
'unicorn/no-accessor-recursion': string;
|
|
97
112
|
'unicorn/no-anonymous-default-export': string;
|
|
98
113
|
'unicorn/no-array-callback-reference': string;
|
|
99
114
|
'unicorn/no-array-for-each': string;
|
|
@@ -110,6 +125,7 @@ declare const _default: ({
|
|
|
110
125
|
'unicorn/no-for-loop': string;
|
|
111
126
|
'unicorn/no-hex-escape': string;
|
|
112
127
|
'unicorn/no-instanceof-array': string;
|
|
128
|
+
'unicorn/no-instanceof-builtins': string;
|
|
113
129
|
'unicorn/no-invalid-fetch-options': string;
|
|
114
130
|
'unicorn/no-invalid-remove-event-listener': string;
|
|
115
131
|
'unicorn/no-keyword-prefix': (string | {
|
|
@@ -120,6 +136,7 @@ declare const _default: ({
|
|
|
120
136
|
'unicorn/no-length-as-slice-end': string;
|
|
121
137
|
'unicorn/no-lonely-if': string;
|
|
122
138
|
'unicorn/no-magic-array-flat-depth': string;
|
|
139
|
+
'unicorn/no-named-default': string;
|
|
123
140
|
'unicorn/no-negated-condition': string;
|
|
124
141
|
'unicorn/no-negation-in-equality-check': string;
|
|
125
142
|
'unicorn/no-nested-ternary': string;
|
|
@@ -339,6 +356,7 @@ declare const _default: ({
|
|
|
339
356
|
'@stylistic/js/no-extra-parens': (string | {
|
|
340
357
|
ignoreJSX: string;
|
|
341
358
|
nestedBinaryExpressions: boolean;
|
|
359
|
+
nestedConditionalExpressions: boolean;
|
|
342
360
|
enforceForArrowConditionals: boolean;
|
|
343
361
|
ternaryOperandBinaryExpressions: boolean;
|
|
344
362
|
})[];
|
|
@@ -1072,18 +1090,17 @@ declare const _default: ({
|
|
|
1072
1090
|
} | {
|
|
1073
1091
|
files: string[];
|
|
1074
1092
|
languageOptions: {
|
|
1075
|
-
|
|
1093
|
+
sourceType: string;
|
|
1094
|
+
ecmaVersion: string;
|
|
1076
1095
|
parserOptions: {
|
|
1077
|
-
ecmaVersion: number;
|
|
1078
1096
|
ecmaFeatures: {
|
|
1079
1097
|
globalReturn: boolean;
|
|
1080
1098
|
impliedStrict: boolean;
|
|
1081
1099
|
};
|
|
1082
|
-
|
|
1083
|
-
requireConfigFile: boolean;
|
|
1084
|
-
project?: undefined;
|
|
1100
|
+
projectService?: undefined;
|
|
1085
1101
|
warnOnUnsupportedTypeScriptVersion?: undefined;
|
|
1086
1102
|
};
|
|
1103
|
+
parser?: undefined;
|
|
1087
1104
|
};
|
|
1088
1105
|
plugins: {};
|
|
1089
1106
|
settings: {
|
|
@@ -1107,21 +1124,27 @@ declare const _default: ({
|
|
|
1107
1124
|
} | {
|
|
1108
1125
|
files: string[];
|
|
1109
1126
|
languageOptions: {
|
|
1127
|
+
sourceType: string;
|
|
1128
|
+
ecmaVersion: string;
|
|
1110
1129
|
parser: import("@typescript-eslint/utils/dist/ts-eslint").Parser.LooseParserModule;
|
|
1111
1130
|
parserOptions: {
|
|
1112
|
-
ecmaVersion: number;
|
|
1113
1131
|
ecmaFeatures: {
|
|
1114
1132
|
globalReturn: boolean;
|
|
1115
1133
|
impliedStrict: boolean;
|
|
1116
1134
|
};
|
|
1117
|
-
|
|
1118
|
-
project: string;
|
|
1135
|
+
projectService: boolean;
|
|
1119
1136
|
warnOnUnsupportedTypeScriptVersion: boolean;
|
|
1120
|
-
requireConfigFile?: undefined;
|
|
1121
1137
|
};
|
|
1122
1138
|
};
|
|
1123
1139
|
plugins: {
|
|
1124
|
-
'@stylistic/ts':
|
|
1140
|
+
'@stylistic/ts': {
|
|
1141
|
+
rules: import("@stylistic/eslint-plugin-ts").Rules;
|
|
1142
|
+
configs: {
|
|
1143
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
1144
|
+
"all": import("eslint").Linter.Config;
|
|
1145
|
+
"all-flat": import("eslint").Linter.Config;
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1125
1148
|
'@typescript-eslint': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
|
|
1126
1149
|
};
|
|
1127
1150
|
settings: {
|
|
@@ -1390,6 +1413,7 @@ declare const _default: ({
|
|
|
1390
1413
|
'@typescript-eslint/consistent-indexed-object-style': string[];
|
|
1391
1414
|
'@typescript-eslint/consistent-type-assertions': (string | {
|
|
1392
1415
|
assertionStyle: string;
|
|
1416
|
+
arrayLiteralTypeAssertions: string;
|
|
1393
1417
|
objectLiteralTypeAssertions: string;
|
|
1394
1418
|
})[];
|
|
1395
1419
|
'@typescript-eslint/consistent-type-definitions': string[];
|
|
@@ -1471,6 +1495,7 @@ declare const _default: ({
|
|
|
1471
1495
|
checksConditionals: boolean;
|
|
1472
1496
|
checksVoidReturn: boolean;
|
|
1473
1497
|
})[];
|
|
1498
|
+
'@typescript-eslint/no-misused-spread': string;
|
|
1474
1499
|
'@typescript-eslint/no-mixed-enums': string;
|
|
1475
1500
|
'@typescript-eslint/no-namespace': string;
|
|
1476
1501
|
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': string;
|
|
@@ -1641,7 +1666,14 @@ declare const _default: ({
|
|
|
1641
1666
|
} | {
|
|
1642
1667
|
files: string[];
|
|
1643
1668
|
plugins: {
|
|
1644
|
-
'@stylistic/jsx':
|
|
1669
|
+
'@stylistic/jsx': {
|
|
1670
|
+
rules: import("@stylistic/eslint-plugin-jsx").Rules;
|
|
1671
|
+
configs: {
|
|
1672
|
+
"disable-legacy": import("eslint").Linter.Config;
|
|
1673
|
+
"all": import("eslint").Linter.Config;
|
|
1674
|
+
"all-flat": import("eslint").Linter.Config;
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1645
1677
|
};
|
|
1646
1678
|
rules: {
|
|
1647
1679
|
'@stylistic/jsx/jsx-child-element-spacing': string;
|