|
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", "vue"], |
11 | 11 | "rules": { |
12 | 12 | "unicorn/filename-case": [ |
13 | 13 | "error", |
14 | 14 | { |
15 | | - "case": "snakeCase" |
| 15 | + "cases": { |
| 16 | + "snakeCase": true |
| 17 | + } |
16 | 18 | } |
17 | 19 | ], |
18 | | - "eslint/func-style": [ |
| 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 | + "eslint/no-magic-numbers": [ |
19 | 44 | "error", |
20 | 45 | { |
21 | | - "style:": "declaration" |
| 46 | + "ignore": [-1, 0, 1, 2, 4], |
| 47 | + "ignoreArrayIndexes": true |
22 | 48 | } |
23 | 49 | ], |
24 | | - "eslint/sort-keys": "off", |
25 | | - "eslint/no-ternary": "off", |
26 | | - "import/no-named-export": "off", |
27 | | - "import/prefer-default-export": "off" |
| 50 | + "vue/max-props": ["error", { "maxProps": 7 }] |
28 | 51 | }, |
29 | 52 | "overrides": [ |
30 | 53 | { |
31 | | - "files": ["**/components/*"], |
| 54 | + "files": ["app/components/**"], |
32 | 55 | "rules": { |
33 | 56 | "unicorn/filename-case": [ |
34 | 57 | "error", |
|
37 | 60 | } |
38 | 61 | ] |
39 | 62 | } |
| 63 | + }, |
| 64 | + { |
| 65 | + "files": ["*.js", "app/plugins/**"], |
| 66 | + "rules": { |
| 67 | + "import/no-default-export": "off" |
| 68 | + } |
| 69 | + }, |
| 70 | + { |
| 71 | + "files": ["utils/**"], |
| 72 | + "rules": { |
| 73 | + "promise/prefer-await-to-callbacks": "off" |
| 74 | + } |
40 | 75 | } |
41 | 76 | ] |
42 | 77 | } |
0 commit comments