@wopjs/eslint-config 0.1.4 → 0.1.6

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
@@ -16,7 +16,7 @@ Wopjs eslint config. It aims to enforce code style that is consistent and diff-f
16
16
  ## Install
17
17
 
18
18
  ```
19
- npm add @wopjs/eslint-config
19
+ npm add -D @wopjs/eslint-config
20
20
  ```
21
21
 
22
22
  ## Usage
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import { type ConfigArray } from "typescript-eslint";
1
+ import { type config, type ConfigArray } from "typescript-eslint";
2
2
 
3
3
  declare const wopjs: ConfigArray;
4
4
 
5
5
  export default wopjs;
6
+
7
+ export declare const defineConfig: typeof config;
package/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  import jsEslint from "@eslint/js";
2
+ import json from "@eslint/json";
2
3
  import gitignore from "eslint-config-flat-gitignore";
3
4
  import eslintConfigPrettier from "eslint-config-prettier";
4
5
  import importX from "eslint-plugin-import-x";
5
- import jsonc from "eslint-plugin-jsonc";
6
6
  import perfectionist from "eslint-plugin-perfectionist";
7
7
  import tsEslint from "typescript-eslint";
8
8
 
9
+ export const defineConfig = tsEslint.config;
10
+
9
11
  export default tsEslint.config(
10
12
  gitignore(),
11
13
  eslintConfigPrettier,
@@ -26,6 +28,7 @@ export default tsEslint.config(
26
28
  parser: tsEslint.parser,
27
29
  sourceType: "module",
28
30
  },
31
+ name: "typescript",
29
32
  plugins: {
30
33
  "@typescript-eslint": tsEslint.plugin,
31
34
  },
@@ -65,7 +68,7 @@ export default tsEslint.config(
65
68
  },
66
69
  },
67
70
  {
68
- extends: [...jsonc.configs["flat/recommended-with-json"]],
71
+ extends: [json.configs.recommended],
69
72
  files: [
70
73
  "src/**/*.json",
71
74
  "scripts/**/*.json",
@@ -75,8 +78,10 @@ export default tsEslint.config(
75
78
  "typedoc.json",
76
79
  "mangle-cache.json",
77
80
  ],
81
+ language: "json/json",
82
+ name: "json",
78
83
  rules: {
79
- "jsonc/sort-keys": ["error", "asc", { caseSensitive: true, minKeys: 2, natural: true }],
84
+ "json/sort-keys": ["error", "asc", { caseSensitive: true, minKeys: 2, natural: true }],
80
85
  },
81
86
  },
82
87
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wopjs/eslint-config",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Wopjs eslint config that aims to enforce code style that is consistent and diff-friendly, easy to review.",
5
5
  "repository": "wopjs/eslint-config",
6
6
  "main": "./index.js",
@@ -39,17 +39,16 @@
39
39
  "eslint": "9.x"
40
40
  },
41
41
  "dependencies": {
42
- "@eslint/js": "^9.18.0",
42
+ "@eslint/js": "^9.19.0",
43
+ "@eslint/json": "^0.10.0",
43
44
  "eslint-config-flat-gitignore": "^1.0.0",
44
45
  "eslint-config-prettier": "^10.0.1",
45
46
  "eslint-plugin-import-x": "^4.6.1",
46
- "eslint-plugin-jsonc": "^2.18.2",
47
- "eslint-plugin-perfectionist": "^4.6.0",
47
+ "eslint-plugin-perfectionist": "^4.7.0",
48
48
  "typescript-eslint": "^8.21.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/node": "^22.10.7",
52
- "eslint": "^9.18.0",
51
+ "eslint": "^9.19.0",
53
52
  "prettier": "^3.4.2",
54
53
  "typescript": "^5.7.3"
55
54
  }