web: Flesh out configs. (#13801)

This commit is contained in:
Teffen Ellis
2025-04-08 01:21:05 +02:00
committed by GitHub
parent 0e83de2697
commit 360223a2ff
32 changed files with 813 additions and 0 deletions

34
packages/eslint-config/react-config.js vendored Normal file
View File

@ -0,0 +1,34 @@
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;