fonc: met en place oxlint uniquement pour ses règles exclusives
This commit is contained in:
parent
5b35de89e7
commit
effd10eb1b
4 changed files with 23 additions and 1 deletions
11
.oxlintrc.json
Normal file
11
.oxlintrc.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"categories": {
|
||||||
|
"correctness": "error",
|
||||||
|
"suspicious": "error",
|
||||||
|
"perf": "error"
|
||||||
|
},
|
||||||
|
"plugins": ["import", "oxc"],
|
||||||
|
"rules": {
|
||||||
|
"oxc/branches-sharing-code": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"dictionaries": ["fr-fr", "en-gb"],
|
"dictionaries": ["fr-fr", "en-gb"],
|
||||||
"words": ["Navigateur", "tsdown", "publint", "sonarjs"]
|
"words": ["Navigateur", "tsdown", "publint", "sonarjs"],
|
||||||
|
"userWords": ["oxlint"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
index.ts
2
index.ts
|
|
@ -4,6 +4,7 @@ import globals from "globals";
|
||||||
|
|
||||||
import { règlesJavaScript } from "./règles/javascript.ts";
|
import { règlesJavaScript } from "./règles/javascript.ts";
|
||||||
import { règlesJsDoc } from "./règles/jsdoc.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èglesProgrammationFonctionnelle } from "./règles/programmation-fonctionnelle.ts";
|
||||||
import { règlesSonarJs } from "./règles/sonarjs.ts";
|
import { règlesSonarJs } from "./règles/sonarjs.ts";
|
||||||
import { règlesTri } from "./règles/tri.ts";
|
import { règlesTri } from "./règles/tri.ts";
|
||||||
|
|
@ -36,4 +37,5 @@ export const configTypescriptNavigateur: ReadonlyArray<Linter.Config> = defineCo
|
||||||
règlesSonarJs,
|
règlesSonarJs,
|
||||||
règlesJsDoc,
|
règlesJsDoc,
|
||||||
règlesTri,
|
règlesTri,
|
||||||
|
règlesOxlint,
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
8
règles/oxlint.ts
Normal file
8
règles/oxlint.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import type { Linter } from "eslint";
|
||||||
|
|
||||||
|
import oxlint from "eslint-plugin-oxlint";
|
||||||
|
|
||||||
|
export const règlesOxlint: Readonly<Linter.Config> = {
|
||||||
|
name: "Oxlint",
|
||||||
|
...oxlint.configs["flat/recommended"][0],
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue