@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.
Files changed (2) hide show
  1. package/base-typescript.js +23 -8
  2. package/package.json +1 -1
@@ -19,14 +19,29 @@ export const baseTypescript = [
19
19
  ...base,
20
20
 
21
21
  // Apply type-checked configs ONLY to TypeScript files
22
- ...tseslint.configs.strictTypeChecked.map((config) => ({
23
- ...config,
24
- files: TS_FILES,
25
- })),
26
- ...tseslint.configs.stylisticTypeChecked.map((config) => ({
27
- ...config,
28
- files: TS_FILES,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vortiquo/eslint-config",
3
- "version": "1.2.1-beta.1",
3
+ "version": "1.2.2-beta.1",
4
4
  "description": "Modern ESLint v9 flat configurations with TypeScript, React, Next.js, and Node.js support",
5
5
  "type": "module",
6
6
  "license": "MIT",