Skip to content

Commit ea00bb8

Browse files
committed
flags
1 parent 93d1bfd commit ea00bb8

4 files changed

Lines changed: 59 additions & 14 deletions

File tree

.oxlintrc.json

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,79 @@
77
"style": "error",
88
"restriction": "error"
99
},
10-
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"],
10+
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest", "vue"],
1111
"rules": {
1212
"unicorn/filename-case": [
1313
"error",
1414
{
1515
"case": "snakeCase"
1616
}
1717
],
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": ["error", { "exceptions": ["x", "y", "z", "i", "j", "k", "r", "g", "b", "id", "ID", "fs", "os"], "min": 3 }],
25+
"eslint/no-console": "warn", // Disable for debugging. Disable later to not have browser logs
26+
"sort-imports": ["error", { "allowSeparatedGroups": true }],
27+
"eslint/no-undefined": "off", // Conflict with unicorn/no-typeof-undefined which prefers direct undefined comparison
28+
"import/prefer-default-export": "off",
29+
"import/no-named-export": "off",
30+
"import/no-namespace": ["error", { "ignore": ["vuetify/*"] }],
31+
"vue/max-props": ["error", { "maxProps": 8 }],
32+
"oxc/no-optional-chaining": "off",
33+
"node/no-process-env": "off",
34+
"no-continue": "off",
35+
"max-params": ["warn", { "max": 4 }],
36+
"eslint/no-magic-numbers": [
1937
"error",
2038
{
21-
"style:": "declaration"
39+
"ignore": [-1, 0, 1, 2, 4],
40+
"ignoreArrayIndexes": true
2241
}
2342
],
24-
"eslint/sort-keys": "off",
25-
"eslint/no-ternary": "off"
2643
},
2744
"overrides": [
2845
{
29-
"files": ["**/components/*"],
46+
"files": ["**/components/**"],
3047
"rules": {
3148
"unicorn/filename-case": [
3249
"error",
3350
{
34-
"case": "PascalCase"
51+
"case": "pascalCase"
3552
}
36-
]
53+
],
54+
"import/unambiguous": "warn"
55+
}
56+
},
57+
{
58+
"files": [
59+
"app/plugins/**",
60+
"node_scripts/**",
61+
"server/**",
62+
"*.config.js", ],
63+
"rules": {
64+
"import/no-default-export": "off",
65+
"unicorn/prefer-structured-clone": "off",
66+
"unicorn/require-post-message-target-origin": "off"
67+
}
68+
},
69+
{
70+
"files": ["tests/**"],
71+
"rules": {
72+
"vitest/require-hook": "off",
73+
"eslint/init-declarations": "off",
74+
"vitest/require-top-level-describe": "off"
75+
}
76+
},
77+
{
78+
"files": ["**/preload.js"],
79+
"rules": {
80+
"import/no-commonjs": "off",
81+
"import/unambiguous": "off"
3782
}
3883
}
3984
]
40-
}
85+
}

app/utils/local.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async function delete_folder_recursive(data_folder_path) {
182182
for (let i = 0; i <= MAX_DELETE_FOLDER_RETRIES; i += 1) {
183183
try {
184184
console.log(`Deleting folder: ${data_folder_path}`)
185-
// eslint-disable-next-line no-await-in-loop
185+
// oxlint-disable-next-line no-await-in-loop
186186
await rimraf(data_folder_path)
187187
console.log(`Deleted folder: ${data_folder_path}`)
188188
return
@@ -191,7 +191,7 @@ async function delete_folder_recursive(data_folder_path) {
191191
// Wait before retrying
192192
const MILLISECONDS_PER_RETRY = 1000
193193
const DELAY = MILLISECONDS_PER_RETRY * (i + 1)
194-
// eslint-disable-next-line no-await-in-loop
194+
// oxlint-disable-next-line no-await-in-loop
195195
await setTimeout(DELAY)
196196
console.log("Retrying delete folder")
197197
}
@@ -220,7 +220,7 @@ function kill_back(back_port) {
220220

221221
function kill_viewer(viewer_port) {
222222
function do_kill() {
223-
// eslint-disable-next-line avoid-new
223+
// oxlint-disable-next-line avoid-new
224224
return new Promise((resolve) => {
225225
const socket = new WebSocket(`ws://localhost:${viewer_port}/ws`)
226226
socket.on("open", () => {

tests/setup_indexeddb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { setup } from "vitest-indexeddb"
22

3-
// eslint-disable-next-line jest/require-hook
3+
// oxlint-disable-next-line jest/require-hook
44
setup()

tests/vitest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const DEFAULT_RETRY = 0
77

88
const globalRetry = process.env.CI ? RETRIES : DEFAULT_RETRY
99

10-
// eslint-disable-next-line import/no-default-export
10+
// oxlint-disable-next-line import/no-default-export
1111
export default defineConfig({
1212
test: {
1313
globals: true,

0 commit comments

Comments
 (0)