@rebilly/eslint-config 4.32.25 → 4.32.27
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/README.md +17 -17
- package/index.cjs +109 -109
- package/package.json +3 -3
- package/prettier.cjs +9 -9
- package/typescript.cjs +46 -46
- package/vue.cjs +122 -122
package/README.md
CHANGED
|
@@ -41,25 +41,25 @@ const globals = require('globals');
|
|
|
41
41
|
const vueConfig = require('@rebilly/eslint-config/vue');
|
|
42
42
|
|
|
43
43
|
module.exports = [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
...vueConfig,
|
|
45
|
+
{
|
|
46
|
+
languageOptions: {
|
|
47
|
+
globals: {
|
|
48
|
+
...globals.browser,
|
|
49
|
+
myGlobal: 'readonly',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
rules: {
|
|
53
|
+
'no-console': 'warn',
|
|
54
|
+
},
|
|
51
55
|
},
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
// Override for specific files
|
|
57
|
+
{
|
|
58
|
+
files: ['**/*.spec.ts'],
|
|
59
|
+
rules: {
|
|
60
|
+
'no-console': 'off',
|
|
61
|
+
},
|
|
54
62
|
},
|
|
55
|
-
},
|
|
56
|
-
// Override for specific files
|
|
57
|
-
{
|
|
58
|
-
files: ['**/*.spec.ts'],
|
|
59
|
-
rules: {
|
|
60
|
-
'no-console': 'off',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
63
|
];
|
|
64
64
|
```
|
|
65
65
|
|
package/index.cjs
CHANGED
|
@@ -9,119 +9,119 @@ const prettier = require('./prettier.cjs');
|
|
|
9
9
|
* Includes eslint:recommended, and Vitest support.
|
|
10
10
|
*/
|
|
11
11
|
module.exports = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
settings: {
|
|
19
|
-
'import/resolver': {
|
|
20
|
-
node: {
|
|
21
|
-
extensions: [
|
|
22
|
-
'.js',
|
|
23
|
-
'.cjs',
|
|
24
|
-
'.mjs',
|
|
25
|
-
'.jsx',
|
|
26
|
-
'.ts',
|
|
27
|
-
'.tsx',
|
|
28
|
-
'.mts',
|
|
29
|
-
'.cts',
|
|
30
|
-
'.vue',
|
|
31
|
-
'.json',
|
|
32
|
-
],
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
{
|
|
14
|
+
plugins: {
|
|
15
|
+
vitest,
|
|
16
|
+
import: importPlugin,
|
|
33
17
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
18
|
+
settings: {
|
|
19
|
+
'import/resolver': {
|
|
20
|
+
node: {
|
|
21
|
+
extensions: [
|
|
22
|
+
'.js',
|
|
23
|
+
'.cjs',
|
|
24
|
+
'.mjs',
|
|
25
|
+
'.jsx',
|
|
26
|
+
'.ts',
|
|
27
|
+
'.tsx',
|
|
28
|
+
'.mts',
|
|
29
|
+
'.cts',
|
|
30
|
+
'.vue',
|
|
31
|
+
'.json',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
languageOptions: {
|
|
37
|
+
ecmaVersion: 'latest',
|
|
38
|
+
sourceType: 'module',
|
|
39
|
+
globals: {
|
|
40
|
+
...globals.es2021,
|
|
41
|
+
...vitest.environments.env.globals,
|
|
42
|
+
},
|
|
53
43
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
44
|
+
rules: {
|
|
45
|
+
// Nx builds the project graph from package.json only
|
|
46
|
+
// (analyzeSourceFiles: false in nx.json), so imports must be declared.
|
|
47
|
+
'import/no-extraneous-dependencies': [
|
|
48
|
+
'error',
|
|
49
|
+
{
|
|
50
|
+
devDependencies: true,
|
|
51
|
+
optionalDependencies: true,
|
|
52
|
+
peerDependencies: true,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
'import/no-relative-packages': 'error',
|
|
56
|
+
'no-underscore-dangle': [
|
|
57
|
+
'error',
|
|
58
|
+
{ allow: ['_links', '_embedded', '_dev'] },
|
|
59
|
+
],
|
|
60
|
+
'no-lonely-if': 'error',
|
|
61
|
+
'no-implicit-coercion': 'error',
|
|
62
|
+
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
63
|
+
'prefer-const': 'off',
|
|
64
|
+
// Configure no-unused-vars to ignore caught errors (backward compatibility)
|
|
65
|
+
'no-unused-vars': [
|
|
66
|
+
'error',
|
|
67
|
+
{
|
|
68
|
+
varsIgnorePattern: '^_',
|
|
69
|
+
argsIgnorePattern: '^_',
|
|
70
|
+
caughtErrors: 'none',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
71
73
|
},
|
|
72
|
-
],
|
|
73
74
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
75
|
+
{
|
|
76
|
+
files: [
|
|
77
|
+
'**/.eslintrc.cjs',
|
|
78
|
+
'**/.eslintrc.js',
|
|
79
|
+
'**/.prettierrc.js',
|
|
80
|
+
'**/babel.config.js',
|
|
81
|
+
'**/vite.config.js',
|
|
82
|
+
'**/vite.config.ts',
|
|
83
|
+
'**/vite.config.mts',
|
|
84
|
+
'**/vitest.config.ts',
|
|
85
|
+
'**/eslint.config.cjs',
|
|
86
|
+
'**/eslint.config.js',
|
|
87
|
+
'**/postcss.config.js',
|
|
88
|
+
'**/jest.config.js',
|
|
89
|
+
'**/jest.config.cjs',
|
|
90
|
+
'**/tailwind.config.js',
|
|
91
|
+
'**/tailwind.config.cjs',
|
|
92
|
+
'**/rollup.config.js',
|
|
93
|
+
'**/rollup.config.ts',
|
|
94
|
+
'**/config/**/*.js',
|
|
95
|
+
],
|
|
96
|
+
languageOptions: {
|
|
97
|
+
globals: {
|
|
98
|
+
...globals.node,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
files: ['**/*.spec.js', '**/*.spec.ts'],
|
|
104
|
+
languageOptions: {
|
|
105
|
+
globals: {
|
|
106
|
+
// We configure vite with globals: true
|
|
107
|
+
global: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
100
110
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
{
|
|
112
|
+
ignores: [
|
|
113
|
+
'**/node_modules/',
|
|
114
|
+
'**/dist/',
|
|
115
|
+
'**/typings/',
|
|
116
|
+
'**/coverage/',
|
|
117
|
+
'**/public/static/',
|
|
118
|
+
'**/playwright-report/',
|
|
119
|
+
'**/test-results/',
|
|
120
|
+
'**/blob-report/',
|
|
121
|
+
'**/*.css',
|
|
122
|
+
'**/*.svg',
|
|
123
|
+
'**/*.min.js',
|
|
124
|
+
],
|
|
109
125
|
},
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
ignores: [
|
|
113
|
-
'**/node_modules/',
|
|
114
|
-
'**/dist/',
|
|
115
|
-
'**/typings/',
|
|
116
|
-
'**/coverage/',
|
|
117
|
-
'**/public/static/',
|
|
118
|
-
'**/playwright-report/',
|
|
119
|
-
'**/test-results/',
|
|
120
|
-
'**/blob-report/',
|
|
121
|
-
'**/*.css',
|
|
122
|
-
'**/*.svg',
|
|
123
|
-
'**/*.min.js',
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
prettier,
|
|
126
|
+
prettier,
|
|
127
127
|
];
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "git+https://github.com/Rebilly/rebilly.git"
|
|
8
8
|
},
|
|
9
9
|
"main": "index.cjs",
|
|
10
|
-
"version": "4.32.
|
|
10
|
+
"version": "4.32.27",
|
|
11
11
|
"files": [
|
|
12
12
|
"index.cjs",
|
|
13
13
|
"typescript.cjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"eslint-config-prettier": "^10.1.8",
|
|
29
29
|
"eslint-plugin-import": "^2.32.0",
|
|
30
30
|
"eslint-plugin-vitest": "^0.5.4",
|
|
31
|
-
"eslint-plugin-vue": "^10.
|
|
31
|
+
"eslint-plugin-vue": "^10.12.0",
|
|
32
32
|
"globals": "^17.13.0",
|
|
33
33
|
"typescript-eslint": "^8.72.1",
|
|
34
34
|
"vue-eslint-parser": "^10.2.0"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"eslint-config-prettier": "^10.1.8",
|
|
40
40
|
"eslint-plugin-import": "^2.32.0",
|
|
41
41
|
"eslint-plugin-vitest": "^0.5.4",
|
|
42
|
-
"eslint-plugin-vue": "^10.
|
|
42
|
+
"eslint-plugin-vue": "^10.12.0",
|
|
43
43
|
"globals": "^17.13.0",
|
|
44
44
|
"typescript-eslint": "^8.72.1",
|
|
45
45
|
"vue-eslint-parser": "^10.2.0"
|
package/prettier.cjs
CHANGED
|
@@ -5,13 +5,13 @@ const prettier = require('eslint-config-prettier');
|
|
|
5
5
|
* be enforced by ESLint even though Prettier also handles them.
|
|
6
6
|
*/
|
|
7
7
|
module.exports = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
...prettier,
|
|
9
|
+
rules: {
|
|
10
|
+
...prettier.rules,
|
|
11
|
+
quotes: [
|
|
12
|
+
'error',
|
|
13
|
+
'single',
|
|
14
|
+
{ avoidEscape: true, allowTemplateLiterals: true },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
17
|
};
|
package/typescript.cjs
CHANGED
|
@@ -7,54 +7,54 @@ const baseConfig = require('./index.cjs');
|
|
|
7
7
|
* Extends base config and adds TypeScript-specific rules.
|
|
8
8
|
*/
|
|
9
9
|
module.exports = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
// Apply TypeScript recommended rules only to TypeScript files
|
|
18
|
-
...tseslint.configs.recommended.map((config) => ({
|
|
19
|
-
...config,
|
|
20
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
21
|
-
})),
|
|
22
|
-
{
|
|
23
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
24
|
-
languageOptions: {
|
|
25
|
-
parser: tseslint.parser,
|
|
26
|
-
parserOptions: {
|
|
27
|
-
ecmaVersion: 2022,
|
|
28
|
-
sourceType: 'module',
|
|
29
|
-
},
|
|
10
|
+
...baseConfig,
|
|
11
|
+
// Register TypeScript plugin globally so rule names are recognized in eslint-disable comments
|
|
12
|
+
{
|
|
13
|
+
plugins: {
|
|
14
|
+
'@typescript-eslint': tseslint.plugin,
|
|
15
|
+
},
|
|
30
16
|
},
|
|
31
|
-
rules
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
// Apply TypeScript recommended rules only to TypeScript files
|
|
18
|
+
...tseslint.configs.recommended.map((config) => ({
|
|
19
|
+
...config,
|
|
20
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
21
|
+
})),
|
|
22
|
+
{
|
|
23
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
24
|
+
languageOptions: {
|
|
25
|
+
parser: tseslint.parser,
|
|
26
|
+
parserOptions: {
|
|
27
|
+
ecmaVersion: 2022,
|
|
28
|
+
sourceType: 'module',
|
|
29
|
+
},
|
|
40
30
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
rules: {
|
|
32
|
+
// TypeScript handles these checks
|
|
33
|
+
'no-undef': 'off',
|
|
34
|
+
'no-unused-vars': 'off',
|
|
35
|
+
'@typescript-eslint/no-unused-vars': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
argsIgnorePattern: '^_',
|
|
39
|
+
caughtErrors: 'none',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
43
|
+
'error',
|
|
44
|
+
{
|
|
45
|
+
'ts-ignore': true,
|
|
46
|
+
'ts-expect-error': 'allow-with-description',
|
|
47
|
+
'ts-nocheck': 'allow-with-description',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
51
|
+
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
52
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
53
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
54
|
+
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
55
|
+
'prefer-const': 'off',
|
|
48
56
|
},
|
|
49
|
-
],
|
|
50
|
-
'@typescript-eslint/consistent-type-imports': 'error',
|
|
51
|
-
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
52
|
-
'@typescript-eslint/no-empty-object-type': 'off',
|
|
53
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
54
|
-
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
55
|
-
'prefer-const': 'off',
|
|
56
57
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
prettier,
|
|
58
|
+
// Disable stylistic rules that conflict with Prettier (Prettier runs separately)
|
|
59
|
+
prettier,
|
|
60
60
|
];
|
package/vue.cjs
CHANGED
|
@@ -10,137 +10,137 @@ const baseConfig = require('./index.cjs');
|
|
|
10
10
|
* Extends base config and adds Vue and TypeScript-specific rules.
|
|
11
11
|
*/
|
|
12
12
|
module.exports = [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
// Apply TypeScript recommended rules only to TypeScript and Vue files
|
|
21
|
-
...tseslint.configs.recommended.map((config) => ({
|
|
22
|
-
...config,
|
|
23
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '**/*.vue'],
|
|
24
|
-
})),
|
|
25
|
-
...vue.configs['flat/recommended'],
|
|
26
|
-
{
|
|
27
|
-
files: ['**/*.vue'],
|
|
28
|
-
languageOptions: {
|
|
29
|
-
parser: vueParser,
|
|
30
|
-
parserOptions: {
|
|
31
|
-
parser: tseslint.parser,
|
|
32
|
-
ecmaVersion: 2022,
|
|
33
|
-
sourceType: 'module',
|
|
34
|
-
},
|
|
35
|
-
globals: {
|
|
36
|
-
...globals.browser,
|
|
37
|
-
},
|
|
13
|
+
...baseConfig,
|
|
14
|
+
// Register TypeScript plugin globally so rule names are recognized in eslint-disable comments
|
|
15
|
+
{
|
|
16
|
+
plugins: {
|
|
17
|
+
'@typescript-eslint': tseslint.plugin,
|
|
18
|
+
},
|
|
38
19
|
},
|
|
39
|
-
rules
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
// Apply TypeScript recommended rules only to TypeScript and Vue files
|
|
21
|
+
...tseslint.configs.recommended.map((config) => ({
|
|
22
|
+
...config,
|
|
23
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '**/*.vue'],
|
|
24
|
+
})),
|
|
25
|
+
...vue.configs['flat/recommended'],
|
|
26
|
+
{
|
|
27
|
+
files: ['**/*.vue'],
|
|
28
|
+
languageOptions: {
|
|
29
|
+
parser: vueParser,
|
|
30
|
+
parserOptions: {
|
|
31
|
+
parser: tseslint.parser,
|
|
32
|
+
ecmaVersion: 2022,
|
|
33
|
+
sourceType: 'module',
|
|
34
|
+
},
|
|
35
|
+
globals: {
|
|
36
|
+
...globals.browser,
|
|
37
|
+
},
|
|
48
38
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
rules: {
|
|
40
|
+
// TypeScript handles this check
|
|
41
|
+
'no-undef': 'off',
|
|
42
|
+
'no-unused-vars': 'off',
|
|
43
|
+
'@typescript-eslint/no-unused-vars': [
|
|
44
|
+
'error',
|
|
45
|
+
{
|
|
46
|
+
argsIgnorePattern: '^_',
|
|
47
|
+
caughtErrors: 'none',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
51
|
+
'error',
|
|
52
|
+
{
|
|
53
|
+
'ts-ignore': true,
|
|
54
|
+
'ts-expect-error': 'allow-with-description',
|
|
55
|
+
'ts-nocheck': 'allow-with-description',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
59
|
+
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
60
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
61
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
62
|
+
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
63
|
+
'prefer-const': 'off',
|
|
56
64
|
},
|
|
57
|
-
],
|
|
58
|
-
'@typescript-eslint/consistent-type-imports': 'error',
|
|
59
|
-
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
60
|
-
'@typescript-eslint/no-empty-object-type': 'off',
|
|
61
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
62
|
-
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
63
|
-
'prefer-const': 'off',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
68
|
-
languageOptions: {
|
|
69
|
-
parser: tseslint.parser,
|
|
70
|
-
parserOptions: {
|
|
71
|
-
ecmaVersion: 2022,
|
|
72
|
-
sourceType: 'module',
|
|
73
|
-
},
|
|
74
65
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
caughtErrors: 'none',
|
|
66
|
+
{
|
|
67
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
68
|
+
languageOptions: {
|
|
69
|
+
parser: tseslint.parser,
|
|
70
|
+
parserOptions: {
|
|
71
|
+
ecmaVersion: 2022,
|
|
72
|
+
sourceType: 'module',
|
|
73
|
+
},
|
|
84
74
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
rules: {
|
|
76
|
+
// TypeScript handles these checks
|
|
77
|
+
'no-undef': 'off',
|
|
78
|
+
'no-unused-vars': 'off',
|
|
79
|
+
'@typescript-eslint/no-unused-vars': [
|
|
80
|
+
'error',
|
|
81
|
+
{
|
|
82
|
+
argsIgnorePattern: '^_',
|
|
83
|
+
caughtErrors: 'none',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
87
|
+
'error',
|
|
88
|
+
{
|
|
89
|
+
'ts-ignore': true,
|
|
90
|
+
'ts-expect-error': 'allow-with-description',
|
|
91
|
+
'ts-nocheck': 'allow-with-description',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
'@typescript-eslint/consistent-type-imports': 'error',
|
|
95
|
+
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
96
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
97
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
98
|
+
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
99
|
+
'prefer-const': 'off',
|
|
92
100
|
},
|
|
93
|
-
],
|
|
94
|
-
'@typescript-eslint/consistent-type-imports': 'error',
|
|
95
|
-
// Disable new rules in typescript-eslint v8 that weren't in the original config
|
|
96
|
-
'@typescript-eslint/no-empty-object-type': 'off',
|
|
97
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
98
|
-
// Disable prefer-const (new in eslint:recommended, not in original config)
|
|
99
|
-
'prefer-const': 'off',
|
|
100
101
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
// Vue-specific rules
|
|
103
|
+
{
|
|
104
|
+
files: ['**/*.vue'],
|
|
105
|
+
rules: {
|
|
106
|
+
'vue/require-v-for-key': 'error',
|
|
107
|
+
'vue/require-prop-types': 'error',
|
|
108
|
+
'vue/block-order': [
|
|
109
|
+
'error',
|
|
110
|
+
{
|
|
111
|
+
order: [['script', 'template'], 'style'],
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
'vue/multi-word-component-names': 'off',
|
|
115
|
+
// Force lang="ts" in script tags
|
|
116
|
+
'vue/block-lang': [
|
|
117
|
+
'error',
|
|
118
|
+
{
|
|
119
|
+
script: {
|
|
120
|
+
lang: 'ts',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
125
|
+
'vue/no-import-compiler-macros': ['error'],
|
|
112
126
|
},
|
|
113
|
-
],
|
|
114
|
-
'vue/multi-word-component-names': 'off',
|
|
115
|
-
// Force lang="ts" in script tags
|
|
116
|
-
'vue/block-lang': [
|
|
117
|
-
'error',
|
|
118
|
-
{
|
|
119
|
-
script: {
|
|
120
|
-
lang: 'ts',
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
'vue/component-api-style': ['error', ['script-setup']],
|
|
125
|
-
'vue/no-import-compiler-macros': ['error'],
|
|
126
127
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
// Test files can have multiple components
|
|
129
|
+
{
|
|
130
|
+
files: ['**/*.spec.js', '**/*.spec.ts'],
|
|
131
|
+
rules: {
|
|
132
|
+
'vue/one-component-per-file': 'off',
|
|
133
|
+
},
|
|
133
134
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
// Browser globals for all Vue files
|
|
136
|
+
{
|
|
137
|
+
files: ['**/*.vue', '**/*.ts', '**/*.js'],
|
|
138
|
+
languageOptions: {
|
|
139
|
+
globals: {
|
|
140
|
+
...globals.browser,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
142
143
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
prettier,
|
|
144
|
+
// Disable stylistic rules that conflict with Prettier (Prettier runs separately)
|
|
145
|
+
prettier,
|
|
146
146
|
];
|