monorepo/visions/ui/eslint.config.js

30 lines
821 B
JavaScript
Raw Normal View History

2025-02-14 03:58:04 +00: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";
import eslintConfigPrettier from "eslint-config-prettier";
2025-02-14 00:01:21 +00:00
export default tseslint.config(
2025-02-14 03:58:04 +00:00
{ ignores: ["dist"] },
2025-02-14 00:01:21 +00:00
{
2025-02-14 03:58:04 +00:00
extends: [js.configs.recommended, ...tseslint.configs.recommended, eslintConfigPrettier],
files: ["**/*.{ts,tsx}"],
2025-02-14 00:01:21 +00:00
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
2025-02-14 03:58:04 +00:00
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
2025-02-14 00:01:21 +00:00
},
rules: {
...reactHooks.configs.recommended.rules,
2025-02-14 03:58:04 +00:00
"react-refresh/only-export-components": [
"warn",
2025-02-14 00:01:21 +00:00
{ allowConstantExport: true },
],
},
},
2025-02-14 03:58:04 +00:00
);