diff --git a/.oxlintrc.json b/.oxlintrc.json index a033f40f..b121e0fa 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -7,7 +7,7 @@ "style": "error", "restriction": "error" }, - "plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"], + "plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest", "vue"], "rules": { "unicorn/filename-case": [ "error", @@ -15,26 +15,88 @@ "case": "snakeCase" } ], - "eslint/func-style": [ + "eslint/func-style": ["error", "declaration"], + "eslint/sort-keys": "off", + "eslint/no-ternary": "off", // A utiliser pour des opérations simples + "oxc/no-async-await": "off", + "oxc/no-rest-spread-properties": "off", // Enable if older browser support is needed + "eslint/max-statements": ["warn", 20], + "eslint/id-length": [ "error", { - "style:": "declaration" + "exceptions": [ + "x", + "y", + "z", + "i", + "j", + "k", + "r", + "g", + "b", + "id", + "ID", + "fs", + "os" + ], + "min": 3 } ], - "eslint/sort-keys": "off", - "eslint/no-ternary": "off" + "eslint/no-console": "warn", // Disable for debugging. Disable later to not have browser logs + "sort-imports": ["error", { "allowSeparatedGroups": true }], + "eslint/no-undefined": "off", // Conflict with unicorn/no-typeof-undefined which prefers direct undefined comparison + "import/prefer-default-export": "off", + "import/no-named-export": "off", + "import/no-namespace": ["error", { "ignore": ["vuetify/*"] }], + "vue/max-props": ["error", { "maxProps": 8 }], + "oxc/no-optional-chaining": "off", + "node/no-process-env": "off", + "no-continue": "off", + "import/unambiguous": "off", + "max-params": ["warn", { "max": 4 }], + "eslint/no-magic-numbers": [ + "error", + { + "ignore": [-1, 0, 1, 2, 3, 4], + "ignoreArrayIndexes": true + } + ] }, "overrides": [ { - "files": ["**/components/*"], + "files": ["**/components/**"], "rules": { "unicorn/filename-case": [ "error", { - "case": "PascalCase" + "case": "pascalCase" } ] } + }, + { + "files": [ + "app/plugins/**", + "node_scripts/**", + "server/**", + "*.config.js" + ], + "rules": { + "import/no-default-export": "off" + } + }, + { + "files": ["tests/**"], + "rules": { + "vitest/require-hook": "off", + "vitest/no-hooks": "off" + } + }, + { + "files": ["**/preload.js"], + "rules": { + "import/no-commonjs": "off" + } } ] } diff --git a/app/components/DeleteDialog.vue b/app/components/DeleteDialog.vue index 9a895cbe..2533aa5d 100644 --- a/app/components/DeleteDialog.vue +++ b/app/components/DeleteDialog.vue @@ -8,7 +8,7 @@ }, item: { type: Object, - default: null, + default: undefined, }, selectedCount: { type: Number, diff --git a/app/components/DragAndDrop.vue b/app/components/DragAndDrop.vue index 547ce722..a9bdb0dc 100644 --- a/app/components/DragAndDrop.vue +++ b/app/components/DragAndDrop.vue @@ -1,14 +1,11 @@