|
7 | 7 | "style": "error", |
8 | 8 | "restriction": "error" |
9 | 9 | }, |
10 | | - "plugins": ["import", "node", "oxc", "promise", "unicorn", "vue"], |
| 10 | + "plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"], |
11 | 11 | "rules": { |
12 | 12 | "unicorn/filename-case": [ |
13 | 13 | "error", |
14 | 14 | { |
15 | | - "cases": { |
16 | | - "snakeCase": true |
17 | | - } |
| 15 | + "case": "snakeCase" |
18 | 16 | } |
19 | 17 | ], |
20 | | - "eslint/func-style": ["error", "declaration"], |
21 | | - "eslint/sort-keys": "off", |
22 | | - "eslint/no-ternary": "off", // A utiliser pour des opérations simples |
23 | | - "oxc/no-async-await": "off", |
24 | | - "oxc/no-rest-spread-properties": "off", // Enable if older browser support is needed |
25 | | - "eslint/max-statements": ["warn", 20], |
26 | | - "eslint/id-length": ["error", { "exceptions": ["x", "y", "z", "i", "j", "k"], "min": 2 }], |
27 | | - "eslint/no-console": "warn", // Disable for debugging. Disable later to not have browser logs |
28 | | - "unicorn/numeric-separators-style": "off", // 1_000 ou 1000 ? |
29 | | - "sort-imports": ["error", { "allowSeparatedGroups": true }], |
30 | | - "eslint/curly": "off", // Quick statement in one line |
31 | | - "eslint/no-undefined": "off", // Conflict with unicorn/no-typeof-undefined which prefers direct undefined comparison |
32 | | - "unicorn/no-null": "warn", // A débattre ? |
33 | | - "import/prefer-default-export": "off", |
34 | | - "import/no-named-export": "off", |
35 | | - "unicorn/prefer-global-this": "off", |
36 | | - "import/unambiguous": "off", |
37 | | - "oxc/no-optional-chaining": "off", |
38 | | - "node/no-process-env": "off", |
39 | | - "capitalized-comments": "warn", |
40 | | - "unicorn/consistent-existence-index-check": "off", // Opérateur < > remplacés par !== -1 for index check |
41 | | - "unicorn/require-post-message-target-origin": "off", // lorsqu'on envoie un message avec postMessage, on doit spécifier l'origin |
42 | | - "unicorn/prefer-structured-clone": "off", // Pas compatible avec plugin Pinia ? |
43 | | - "no-continue": "off", |
44 | | - "max-params": ["warn", { "max": 4 }], |
45 | | - "eslint/no-magic-numbers": [ |
| 18 | + "eslint/func-style": [ |
46 | 19 | "error", |
47 | 20 | { |
48 | | - "ignore": [-1, 0, 1, 2, 4], |
49 | | - "ignoreArrayIndexes": true |
| 21 | + "style:": "declaration" |
50 | 22 | } |
51 | 23 | ], |
52 | | - "vue/max-props": ["error", { "maxProps": 7 }] |
| 24 | + "eslint/sort-keys": "off", |
| 25 | + "eslint/no-ternary": "off" |
53 | 26 | }, |
54 | 27 | "overrides": [ |
55 | 28 | { |
56 | | - "files": ["app/components/**"], |
| 29 | + "files": ["**/components/*"], |
57 | 30 | "rules": { |
58 | 31 | "unicorn/filename-case": [ |
59 | 32 | "error", |
|
62 | 35 | } |
63 | 36 | ] |
64 | 37 | } |
65 | | - }, |
66 | | - { |
67 | | - "files": ["*.js", "app/plugins/**"], |
68 | | - "rules": { |
69 | | - "import/no-default-export": "off" |
70 | | - } |
71 | | - }, |
72 | | - { |
73 | | - "files": ["utils/**"], |
74 | | - "rules": { |
75 | | - "promise/prefer-await-to-callbacks": "off" |
76 | | - } |
77 | 38 | } |
78 | 39 | ] |
79 | 40 | } |
0 commit comments