17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
import type { Linter } from "eslint";
|
|
|
|
import sonarJs from "eslint-plugin-sonarjs";
|
|
|
|
export const règlesSonarJs: Readonly<Linter.Config> = {
|
|
name: "SonarJS",
|
|
plugins: sonarJs.configs.recommended.plugins ?? {},
|
|
rules: {
|
|
...sonarJs.configs.recommended.rules,
|
|
"sonarjs/arguments-usage": "error",
|
|
"sonarjs/no-collapsible-if": "error",
|
|
"sonarjs/no-duplicate-string": "error",
|
|
"sonarjs/no-inconsistent-returns": "error",
|
|
"sonarjs/no-nested-switch": "error",
|
|
"sonarjs/prefer-immediate-return": "error",
|
|
},
|
|
};
|