web/eslint.config.js

27 lines
695 B
JavaScript
Raw Normal View History

2024-09-23 13:28:45 +01:00
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
2024-08-08 12:52:23 +01:00
export default tseslint.config({
extends: [js.configs.recommended, ...tseslint.configs.recommended],
2024-09-23 13:28:45 +01:00
files: ["**/*.{ts,tsx}"],
ignores: ["dist"],
2024-08-08 12:52:23 +01:00
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
2024-09-23 13:28:45 +01:00
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
2024-08-08 12:52:23 +01:00
},
rules: {
...reactHooks.configs.recommended.rules,
2024-09-23 13:28:45 +01:00
"react-refresh/only-export-components": [
"warn",
2024-08-08 12:52:23 +01:00
{ allowConstantExport: true },
],
},
2024-09-23 13:28:45 +01:00
});