This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (61 loc) · 1.75 KB
/
eslint.config.js
File metadata and controls
62 lines (61 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import uiKitRules from "./packages/eslint-plugin-ui-kit-rules/index.js";
export default [
// global ignores – applied before other configs
{
ignores: [
"packages/ui-kit/dist/**",
"**/node_modules/**",
"**/storybook-static/**",
"vendors/**",
"packages/showcase/dist/**",
"**/dist/**",
"**/scripts/**",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: [
"packages/ui-kit/src/**/*.{js,jsx,ts,tsx}",
"packages/ui-kit/tailwind.config.js",
"packages/ui-kit/vite.config.ts",
"packages/ui-kit/postcss.config.js",
"eslint.config.js",
],
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
globals: {
module: "readonly",
require: "readonly",
process: "readonly",
console: "readonly",
// Add browser globals if your UI kit code runs in the browser
window: "readonly",
document: "readonly",
navigator: "readonly",
},
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
"ui-kit-rules": uiKitRules,
},
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"@typescript-eslint/no-require-imports": "off",
// Custom rules
"ui-kit-rules/named-effect-with-cleanup": "error",
// 'no-undef': 'off' // Let's remove this for now and see if globals cover it.
},
},
];