@pob/eslint-config 66.0.0 → 67.1.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/lib/index.js +145 -144
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -43,157 +43,158 @@ if (!tsFiles) {
|
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
configs
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
46
|
+
const extensions = "{js,cjs,mjs}";
|
|
47
|
+
|
|
48
|
+
const testFiles = [
|
|
49
|
+
`**/*.{test,test-e2e,spec}.${extensions}`,
|
|
50
|
+
`**/__tests__/**/*.${extensions}`,
|
|
51
|
+
`**/__mocks__/**/*.${extensions}`,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const tsTestFiles = [
|
|
55
|
+
`**/*.test.${tsExtensions}`,
|
|
56
|
+
`**/*.test-e2e.${tsExtensions}`,
|
|
57
|
+
`**/__tests__/**/*.${tsExtensions}`,
|
|
58
|
+
`**/__mocks__/**/*.${tsExtensions}`,
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const typescriptConfigs = [
|
|
62
|
+
...applyTs({
|
|
63
|
+
filesOverridesIf: [tsFiles],
|
|
64
|
+
configs: [
|
|
65
|
+
...tseslint.configs.strictTypeChecked,
|
|
66
|
+
typescriptReplaceUnicornConfig,
|
|
67
|
+
typescriptReplaceEslintConfig,
|
|
68
|
+
typescriptPluginRulesConfig,
|
|
69
|
+
typescriptRulesConfig,
|
|
70
|
+
],
|
|
71
|
+
}),
|
|
72
|
+
...apply({
|
|
73
|
+
files: tsTestFiles,
|
|
74
|
+
configs: testOverrideConfigsWithTypescript,
|
|
75
|
+
}),
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
/** @deprecated */
|
|
79
|
+
const nodeCommonjs = [
|
|
80
|
+
...baseConfigs,
|
|
81
|
+
...apply({
|
|
82
|
+
mode: "keep-files-if-exists",
|
|
83
|
+
files: ["**/*.{js,cjs,mjs,mts,ts,tsx,cts}"],
|
|
84
|
+
configs: [
|
|
85
|
+
baseCommonjsConfig,
|
|
86
|
+
...importPluginBaseConfigs,
|
|
87
|
+
importPluginCommonjsConfig,
|
|
88
|
+
...nodePluginCommonjsConfigs,
|
|
89
|
+
],
|
|
90
|
+
}),
|
|
91
|
+
|
|
92
|
+
...apply({
|
|
93
|
+
extensions,
|
|
94
|
+
mode: "directory",
|
|
95
|
+
files: ["**/scripts/"],
|
|
96
|
+
configs: [scriptsOverrideConfig],
|
|
97
|
+
}),
|
|
98
|
+
|
|
99
|
+
...apply({
|
|
100
|
+
files: ["**/*.{mjs,mts}"],
|
|
101
|
+
mode: "keep-files-if-exists",
|
|
102
|
+
configs: [
|
|
103
|
+
baseModuleConfig,
|
|
104
|
+
importPluginModuleConfig,
|
|
105
|
+
...nodePluginModuleConfigs,
|
|
106
|
+
],
|
|
107
|
+
}),
|
|
108
|
+
|
|
109
|
+
...apply({
|
|
110
|
+
files: testFiles,
|
|
111
|
+
configs: testOverrideConfigsWithoutTypescript,
|
|
112
|
+
}),
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
const baseModule = [
|
|
116
|
+
...baseConfigs,
|
|
117
|
+
...apply({
|
|
118
|
+
mode: "keep-files-if-exists",
|
|
119
|
+
files: ["**/*.{js,mjs,cjs,mts,ts,tsx,cts}"],
|
|
120
|
+
configs: [
|
|
121
|
+
baseModuleConfig,
|
|
122
|
+
...importPluginBaseConfigs,
|
|
123
|
+
importPluginModuleConfig,
|
|
124
|
+
],
|
|
125
|
+
}),
|
|
126
|
+
|
|
127
|
+
...apply({
|
|
128
|
+
mode: "keep-files-if-exists",
|
|
129
|
+
files: ["**/*.{cjs,cts}"],
|
|
130
|
+
configs: [baseCommonjsConfig, importPluginCommonjsConfig],
|
|
131
|
+
}),
|
|
132
|
+
|
|
133
|
+
...typescriptConfigs,
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
const nodeModule = [
|
|
137
|
+
...baseModule,
|
|
138
|
+
...apply({
|
|
139
|
+
mode: "keep-files-if-exists",
|
|
140
|
+
files: ["**/*.{js,mjs,mts,ts,tsx}"],
|
|
141
|
+
configs: [...nodePluginModuleConfigs],
|
|
142
|
+
}),
|
|
143
|
+
|
|
144
|
+
...apply({
|
|
145
|
+
extensions,
|
|
146
|
+
mode: "directory",
|
|
147
|
+
files: ["**/scripts/"],
|
|
148
|
+
configs: [scriptsOverrideConfig],
|
|
149
|
+
}),
|
|
150
|
+
|
|
151
|
+
...apply({
|
|
152
|
+
mode: "keep-files-if-exists",
|
|
153
|
+
files: ["**/*.{cjs,cts}"],
|
|
154
|
+
configs: [...nodePluginCommonjsConfigs],
|
|
155
|
+
}),
|
|
156
|
+
|
|
157
|
+
...nodeTypescriptConfigs,
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @satisfies {{ configs: Record<string, import("typescript-eslint").ConfigArray> }}
|
|
162
|
+
*/
|
|
163
|
+
export default {
|
|
164
|
+
configs: {
|
|
165
|
+
baseModule: [
|
|
166
|
+
...baseModule,
|
|
167
|
+
...apply({
|
|
168
|
+
extensions,
|
|
169
|
+
mode: "directory",
|
|
170
|
+
files: ["**/scripts/"],
|
|
171
|
+
configs: [...nodePluginModuleConfigs, scriptsOverrideConfig],
|
|
172
|
+
}),
|
|
173
|
+
],
|
|
174
|
+
/** @deprecated */
|
|
175
|
+
nodeModule,
|
|
176
|
+
/** @deprecated */
|
|
177
|
+
nodeCommonjs,
|
|
178
|
+
node: nodeModule,
|
|
179
|
+
|
|
180
|
+
allowImplicitReturnType: applyTs({
|
|
181
|
+
configs: [allowImplicitReturnTypeConfig],
|
|
132
182
|
}),
|
|
133
183
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const nodeModule = [
|
|
138
|
-
...baseModule,
|
|
139
|
-
...apply({
|
|
140
|
-
mode: "keep-files-if-exists",
|
|
141
|
-
files: ["**/*.{js,mjs,mts,ts,tsx}"],
|
|
142
|
-
configs: [...nodePluginModuleConfigs],
|
|
184
|
+
allowUnsafe: applyTs({
|
|
185
|
+
configs: [allowUnsafeConfig],
|
|
143
186
|
}),
|
|
144
187
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
mode: "directory",
|
|
148
|
-
files: ["**/scripts/"],
|
|
149
|
-
configs: [scriptsOverrideConfig],
|
|
188
|
+
allowUnsafeAsWarn: applyTs({
|
|
189
|
+
configs: [allowUnsafeAsWarnConfig],
|
|
150
190
|
}),
|
|
151
191
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
files: ["**/*.{cjs,cts}"],
|
|
155
|
-
configs: [...nodePluginCommonjsConfigs],
|
|
192
|
+
app: applyTs({
|
|
193
|
+
configs: [appConfig],
|
|
156
194
|
}),
|
|
157
195
|
|
|
158
|
-
|
|
159
|
-
];
|
|
160
|
-
|
|
161
|
-
return {
|
|
162
|
-
configs: {
|
|
163
|
-
baseModule: [
|
|
164
|
-
...baseModule,
|
|
165
|
-
...apply({
|
|
166
|
-
extensions,
|
|
167
|
-
mode: "directory",
|
|
168
|
-
files: ["**/scripts/"],
|
|
169
|
-
configs: [...nodePluginModuleConfigs, scriptsOverrideConfig],
|
|
170
|
-
}),
|
|
171
|
-
],
|
|
172
|
-
/** @deprecated */
|
|
173
|
-
nodeModule,
|
|
174
|
-
/** @deprecated */
|
|
175
|
-
nodeCommonjs,
|
|
176
|
-
node: nodeModule,
|
|
177
|
-
|
|
178
|
-
allowImplicitReturnType: applyTs({
|
|
179
|
-
configs: [allowImplicitReturnTypeConfig],
|
|
180
|
-
}),
|
|
181
|
-
|
|
182
|
-
allowUnsafe: applyTs({
|
|
183
|
-
configs: [allowUnsafeConfig],
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
allowUnsafeAsWarn: applyTs({
|
|
187
|
-
configs: [allowUnsafeAsWarnConfig],
|
|
188
|
-
}),
|
|
189
|
-
|
|
190
|
-
app: applyTs({
|
|
191
|
-
configs: [appConfig],
|
|
192
|
-
}),
|
|
193
|
-
|
|
194
|
-
monorepo: [monorepoRootConfigsConfig],
|
|
196
|
+
monorepo: [monorepoRootConfigsConfig],
|
|
195
197
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
};
|
|
198
|
+
checkPackages: checkPackageDependenciesConfigs,
|
|
199
|
+
},
|
|
199
200
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "67.1.0",
|
|
4
4
|
"description": "eslint config files",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"@typescript-eslint/parser": "8.63.0",
|
|
41
41
|
"check-package-dependencies": "^12.1.0",
|
|
42
42
|
"confusing-browser-globals": "^1.0.11",
|
|
43
|
-
"eslint-plugin-import-x": "^4.
|
|
43
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
44
44
|
"eslint-plugin-n": "^17.24.0",
|
|
45
45
|
"eslint-plugin-regexp": "^3.1.0",
|
|
46
46
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
47
47
|
"typescript-eslint": "^8.63.0",
|
|
48
|
-
"@pob/eslint-plugin": "66.
|
|
48
|
+
"@pob/eslint-plugin": "66.1.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "24.13.3",
|
|
52
|
-
"eslint": "10.
|
|
53
|
-
"eslint-plugin-import-x": "4.
|
|
52
|
+
"eslint": "10.8.0",
|
|
53
|
+
"eslint-plugin-import-x": "4.17.1",
|
|
54
54
|
"eslint-plugin-n": "17.24.0",
|
|
55
55
|
"eslint-plugin-regexp": "3.1.0",
|
|
56
56
|
"eslint-plugin-unicorn": "64.0.0",
|