@zetavg/eslint-config 0.0.8-pre.3 → 0.0.8-pre.5

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 CHANGED
@@ -5,10 +5,11 @@ Shared ESLint configuration.
5
5
  ## Install
6
6
 
7
7
  ```bash
8
+ # npm
9
+ npm install --save-dev @zetavg/eslint-config eslint prettier
10
+ # pnpm
8
11
  pnpm add --save-dev @zetavg/eslint-config eslint prettier
9
- ```
10
-
11
- ```bash
12
+ # yarn
12
13
  yarn add --dev @zetavg/eslint-config eslint prettier
13
14
  ```
14
15
 
package/configs/json.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import json from '@eslint/json';
2
2
  import { defineConfig } from 'eslint/config';
3
+ import * as jsoncParser from 'jsonc-eslint-parser';
3
4
 
4
5
  export default defineConfig([
5
6
  {
@@ -8,11 +9,9 @@ export default defineConfig([
8
9
  },
9
10
  },
10
11
  {
11
- files: ['**/*.json'],
12
- ignores: [
13
- '**/tsconfig.json', // tsconfig files may contain comments, which ESLint can't parse
14
- ],
12
+ files: ['**/*.json', '**/*.jsonc', '**/*.json5'],
15
13
  language: 'json/json',
14
+ languageOptions: { parser: jsoncParser },
16
15
  rules: {
17
16
  'json/no-duplicate-keys': 'error',
18
17
  },
@@ -3,6 +3,5 @@ import tseslint from 'typescript-eslint';
3
3
 
4
4
  /**
5
5
  * Default ESLint configuration for TypeScript.
6
- * Should already be scoped to TypeScript files.
7
6
  */
8
7
  export default defineConfig([tseslint.configs.recommended]);
package/package.json CHANGED
@@ -61,14 +61,15 @@
61
61
  "eslint-plugin-simple-import-sort": "^12",
62
62
  "eslint-plugin-unicorn": "^59 || ^63",
63
63
  "globals": "^16 || ^17",
64
+ "jsonc-eslint-parser": "^3.1.0",
64
65
  "typescript-eslint": "^8"
65
66
  },
66
67
  "devDependencies": {
67
- "@zetavg/prettier-config": "^0.0.8-pre.3",
68
- "@zetavg/tsconfig": "^0.0.8-pre.3",
68
+ "@zetavg/prettier-config": "^0.0.8-pre.5",
69
+ "@zetavg/tsconfig": "^0.0.8-pre.5",
69
70
  "eslint": "^9",
70
71
  "prettier": "^3",
71
72
  "typescript": "~5.8"
72
73
  },
73
- "version": "0.0.8-pre.3"
74
+ "version": "0.0.8-pre.5"
74
75
  }
@@ -5,7 +5,6 @@ import * as configs from '../configs/index.js';
5
5
 
6
6
  export default defineConfig([
7
7
  { ignores: ['dist', 'node_modules'] },
8
- configs.typescript,
9
8
  configs.vitest,
10
9
  configs.json,
11
10
  configs.markdown,
@@ -20,6 +19,11 @@ export default defineConfig([
20
19
  files: ['**/*.[j,t]sx'],
21
20
  extends: [configs.react],
22
21
  },
22
+ {
23
+ name: 'Configs for TypeScript Files',
24
+ files: ['**/*.{ts,cts,mts,tsx}'],
25
+ extends: [configs.typescript],
26
+ },
23
27
  {
24
28
  name: 'Configs for CommonJS Files',
25
29
  files: ['**/*.cjs'],