@vortiquo/eslint-config 1.2.1-beta.1 → 1.2.2-beta.1
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/base-typescript.js +23 -8
- package/package.json +1 -1
package/base-typescript.js
CHANGED
|
@@ -19,14 +19,29 @@ export const baseTypescript = [
|
|
|
19
19
|
...base,
|
|
20
20
|
|
|
21
21
|
// Apply type-checked configs ONLY to TypeScript files
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
// We need to filter out configs that don't have rules (plugin definitions)
|
|
23
|
+
// and only add files restriction to configs that have rules
|
|
24
|
+
...tseslint.configs.strictTypeChecked.map((config) => {
|
|
25
|
+
// If this config has rules, scope it to TS files only
|
|
26
|
+
if (config.rules && Object.keys(config.rules).length > 0) {
|
|
27
|
+
return { ...config, files: TS_FILES };
|
|
28
|
+
}
|
|
29
|
+
// Plugin/parser configs stay global but we add files to scope parsing
|
|
30
|
+
if (config.languageOptions?.parser) {
|
|
31
|
+
return { ...config, files: TS_FILES };
|
|
32
|
+
}
|
|
33
|
+
// Plugin registration stays global (no files restriction)
|
|
34
|
+
return config;
|
|
35
|
+
}),
|
|
36
|
+
...tseslint.configs.stylisticTypeChecked.map((config) => {
|
|
37
|
+
if (config.rules && Object.keys(config.rules).length > 0) {
|
|
38
|
+
return { ...config, files: TS_FILES };
|
|
39
|
+
}
|
|
40
|
+
if (config.languageOptions?.parser) {
|
|
41
|
+
return { ...config, files: TS_FILES };
|
|
42
|
+
}
|
|
43
|
+
return config;
|
|
44
|
+
}),
|
|
30
45
|
|
|
31
46
|
// TypeScript-specific settings and rules (only for TS files)
|
|
32
47
|
{
|
package/package.json
CHANGED