35 lines
819 B
JavaScript
35 lines
819 B
JavaScript
import reactPlugin from "eslint-plugin-react";
|
|
import hooksPlugin from "eslint-plugin-react-hooks";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
/**
|
|
* ESLint configuration for React authentik projects.
|
|
*/
|
|
export const reactConfig = tseslint.config({
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
|
|
plugins: {
|
|
"react": reactPlugin,
|
|
"react-hooks": hooksPlugin,
|
|
},
|
|
|
|
rules: {
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
|
|
"react/jsx-uses-react": 0,
|
|
|
|
"react/display-name": "off",
|
|
"react/jsx-curly-brace-presence": "error",
|
|
"react/jsx-no-leaked-render": "error",
|
|
"react/prop-types": "off",
|
|
"react/react-in-jsx-scope": "off",
|
|
},
|
|
});
|
|
|
|
export default reactConfig;
|