|
1 |
| -import jsEslint from "@eslint/js"; |
2 |
| -import eslintConfigPrettier from "eslint-config-prettier"; |
3 |
| -import importPlugin from "eslint-plugin-import"; |
4 |
| -import tsEslint from "typescript-eslint"; |
| 1 | +import wopjs, { defineConfig } from "@wopjs/eslint-config"; |
5 | 2 |
|
6 |
| -export default tsEslint.config( |
7 |
| - jsEslint.configs.recommended, |
8 |
| - ...tsEslint.configs.recommended, |
9 |
| - importPlugin.flatConfigs.recommended, |
10 |
| - importPlugin.flatConfigs.typescript, |
11 |
| - eslintConfigPrettier, |
12 |
| - { |
13 |
| - ignores: ["**/dist/", "**/public/", "**/docs/", "**/node_modules/"], |
| 3 | +export default defineConfig(...wopjs, { |
| 4 | + rules: { |
| 5 | + "@typescript-eslint/no-explicit-any": "off", |
14 | 6 | },
|
15 |
| - { |
16 |
| - languageOptions: { |
17 |
| - ecmaVersion: "latest", |
18 |
| - sourceType: "module", |
19 |
| - globals: { |
20 |
| - console: true, |
21 |
| - process: true, |
22 |
| - }, |
23 |
| - }, |
24 |
| - rules: { |
25 |
| - "import/no-unresolved": "off", |
26 |
| - "import/newline-after-import": [ |
27 |
| - "error", |
28 |
| - { considerComments: true, count: 1 }, |
29 |
| - ], |
30 |
| - "import/consistent-type-specifier-style": ["error", "prefer-top-level"], |
31 |
| - "import/no-duplicates": ["error", { considerQueryString: true }], |
32 |
| - "import/order": [ |
33 |
| - "error", |
34 |
| - { |
35 |
| - "newlines-between": "always", |
36 |
| - alphabetize: { order: "asc", caseInsensitive: true }, |
37 |
| - groups: [ |
38 |
| - "object", |
39 |
| - "type", |
40 |
| - ["builtin", "external", "internal"], |
41 |
| - ["parent", "sibling", "index"], |
42 |
| - ], |
43 |
| - pathGroups: [ |
44 |
| - { |
45 |
| - pattern: "*.+(scss|css|less)", |
46 |
| - patternOptions: { matchBase: true }, |
47 |
| - group: "object", |
48 |
| - }, |
49 |
| - { pattern: "~/**", group: "internal", position: "after" }, |
50 |
| - { pattern: "../**", group: "parent", position: "before" }, |
51 |
| - ], |
52 |
| - pathGroupsExcludedImportTypes: [ |
53 |
| - "builtin", |
54 |
| - "external", |
55 |
| - "object", |
56 |
| - "type", |
57 |
| - ], |
58 |
| - distinctGroup: false, |
59 |
| - }, |
60 |
| - ], |
61 |
| - }, |
62 |
| - }, |
63 |
| - { |
64 |
| - files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"], |
65 |
| - plugins: { |
66 |
| - "@typescript-eslint": tsEslint.plugin, |
67 |
| - }, |
68 |
| - languageOptions: { |
69 |
| - parser: tsEslint.parser, |
70 |
| - }, |
71 |
| - rules: { |
72 |
| - "@typescript-eslint/no-explicit-any": "off", |
73 |
| - "@typescript-eslint/consistent-type-imports": "error", |
74 |
| - "@typescript-eslint/no-empty-interface": "off", |
75 |
| - "@typescript-eslint/no-non-null-assertion": "off", |
76 |
| - "@typescript-eslint/no-unused-vars": [ |
77 |
| - "error", |
78 |
| - { |
79 |
| - argsIgnorePattern: "^_", |
80 |
| - varsIgnorePattern: "^_", |
81 |
| - destructuredArrayIgnorePattern: "^_", |
82 |
| - ignoreRestSiblings: true, |
83 |
| - }, |
84 |
| - ], |
85 |
| - }, |
86 |
| - } |
87 |
| -); |
| 7 | +}); |
0 commit comments