|
7 | 7 | "style": "error", |
8 | 8 | "restriction": "error" |
9 | 9 | }, |
10 | | - "plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"], |
| 10 | + "plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest", "vue"], |
11 | 11 | "rules": { |
12 | 12 | "unicorn/filename-case": [ |
13 | 13 | "error", |
14 | 14 | { |
15 | 15 | "case": "snakeCase" |
16 | 16 | } |
17 | 17 | ], |
18 | | - "eslint/func-style": [ |
| 18 | + "eslint/func-style": ["error", "declaration"], |
| 19 | + "eslint/sort-keys": "off", |
| 20 | + "eslint/no-ternary": "off", // A utiliser pour des opérations simples |
| 21 | + "oxc/no-async-await": "off", |
| 22 | + "oxc/no-rest-spread-properties": "off", // Enable if older browser support is needed |
| 23 | + "eslint/max-statements": ["warn", 20], |
| 24 | + "eslint/id-length": [ |
19 | 25 | "error", |
20 | 26 | { |
21 | | - "style:": "declaration" |
| 27 | + "exceptions": [ |
| 28 | + "x", |
| 29 | + "y", |
| 30 | + "z", |
| 31 | + "i", |
| 32 | + "j", |
| 33 | + "k", |
| 34 | + "r", |
| 35 | + "g", |
| 36 | + "b", |
| 37 | + "id", |
| 38 | + "ID", |
| 39 | + "fs", |
| 40 | + "os" |
| 41 | + ], |
| 42 | + "min": 3 |
22 | 43 | } |
23 | 44 | ], |
24 | | - "eslint/sort-keys": "off", |
25 | | - "eslint/no-ternary": "off" |
| 45 | + "eslint/no-console": "warn", // Disable for debugging. Disable later to not have browser logs |
| 46 | + "sort-imports": ["error", { "allowSeparatedGroups": true }], |
| 47 | + "eslint/no-undefined": "off", // Conflict with unicorn/no-typeof-undefined which prefers direct undefined comparison |
| 48 | + "import/prefer-default-export": "off", |
| 49 | + "import/no-named-export": "off", |
| 50 | + "import/no-namespace": ["error", { "ignore": ["vuetify/*"] }], |
| 51 | + "vue/max-props": ["error", { "maxProps": 8 }], |
| 52 | + "oxc/no-optional-chaining": "off", |
| 53 | + "node/no-process-env": "off", |
| 54 | + "no-continue": "off", |
| 55 | + "import/unambiguous": "off", |
| 56 | + "max-params": ["warn", { "max": 4 }], |
| 57 | + "eslint/no-magic-numbers": [ |
| 58 | + "error", |
| 59 | + { |
| 60 | + "ignore": [-1, 0, 1, 2, 3, 4], |
| 61 | + "ignoreArrayIndexes": true |
| 62 | + } |
| 63 | + ] |
26 | 64 | }, |
27 | 65 | "overrides": [ |
28 | 66 | { |
29 | | - "files": ["**/components/*"], |
| 67 | + "files": ["**/components/**"], |
30 | 68 | "rules": { |
31 | 69 | "unicorn/filename-case": [ |
32 | 70 | "error", |
33 | 71 | { |
34 | | - "case": "PascalCase" |
| 72 | + "case": "pascalCase" |
35 | 73 | } |
36 | 74 | ] |
37 | 75 | } |
| 76 | + }, |
| 77 | + { |
| 78 | + "files": [ |
| 79 | + "app/plugins/**", |
| 80 | + "node_scripts/**", |
| 81 | + "server/**", |
| 82 | + "*.config.js" |
| 83 | + ], |
| 84 | + "rules": { |
| 85 | + "import/no-default-export": "off" |
| 86 | + } |
| 87 | + }, |
| 88 | + { |
| 89 | + "files": ["tests/**"], |
| 90 | + "rules": { |
| 91 | + "vitest/require-hook": "off", |
| 92 | + "vitest/no-hooks": "off" |
| 93 | + } |
| 94 | + }, |
| 95 | + { |
| 96 | + "files": ["**/preload.js"], |
| 97 | + "rules": { |
| 98 | + "import/no-commonjs": "off" |
| 99 | + } |
38 | 100 | } |
39 | 101 | ] |
40 | 102 | } |
0 commit comments