diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..8815d3d --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,11 @@ +{ + "categories": { + "correctness": "error", + "suspicious": "error", + "perf": "error" + }, + "plugins": ["import", "oxc"], + "rules": { + "oxc/branches-sharing-code": "error" + } +} diff --git a/cspell.json b/cspell.json index e4d0278..0e6bf54 100644 --- a/cspell.json +++ b/cspell.json @@ -1,4 +1,5 @@ { "dictionaries": ["fr-fr", "en-gb"], - "words": ["Navigateur", "tsdown", "publint", "sonarjs"] + "words": ["Navigateur", "tsdown", "publint", "sonarjs"], + "userWords": ["oxlint"] } diff --git a/index.ts b/index.ts index 029ab27..b1a12b0 100644 --- a/index.ts +++ b/index.ts @@ -4,6 +4,7 @@ import globals from "globals"; import { règlesJavaScript } from "./règles/javascript.ts"; import { règlesJsDoc } from "./règles/jsdoc.ts"; +import { règlesOxlint } from "./règles/oxlint.ts"; import { règlesProgrammationFonctionnelle } from "./règles/programmation-fonctionnelle.ts"; import { règlesSonarJs } from "./règles/sonarjs.ts"; import { règlesTri } from "./règles/tri.ts"; @@ -36,4 +37,5 @@ export const configTypescriptNavigateur: ReadonlyArray = defineCo règlesSonarJs, règlesJsDoc, règlesTri, + règlesOxlint, ]); diff --git a/règles/oxlint.ts b/règles/oxlint.ts new file mode 100644 index 0000000..2f0bea3 --- /dev/null +++ b/règles/oxlint.ts @@ -0,0 +1,8 @@ +import type { Linter } from "eslint"; + +import oxlint from "eslint-plugin-oxlint"; + +export const règlesOxlint: Readonly = { + name: "Oxlint", + ...oxlint.configs["flat/recommended"][0], +};