sokko-g/eslint.config.js
Shinuwa a9b68a5712
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
Enable app-wide StrictMode and restore React effect checks
2026-09-12 12:53:08 +02:00

63 lines
1.5 KiB
JavaScript

// Rôle : configure ESLint pour le code React, les hooks et les scripts Node du projet.
import js from "@eslint/js";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
export default [
{
ignores: [
"node_modules/**",
"website/dist/**",
".codex-home/**"
]
},
js.configs.recommended,
{
files: ["website/src/**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.es2024
},
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh
},
rules: {
...reactHooks.configs.recommended.rules,
"no-unused-vars": ["error", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}],
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }]
}
},
{
files: ["*.js", "*.mjs", "scripts/**/*.mjs", "tests/**/*.mjs"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.node,
...globals.es2024
}
},
rules: {
"no-unused-vars": ["error", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}]
}
}
];