-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
65 lines (63 loc) · 1.65 KB
/
eslint.config.mjs
File metadata and controls
65 lines (63 loc) · 1.65 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
63
64
65
import js from "@eslint/js";
import globals from "globals";
import pluginReact from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tailwindcss from "eslint-plugin-tailwindcss";
import unicorn from "eslint-plugin-unicorn";
import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";
const webTailwindCssPath = new URL("./apps/web/src/index.css", import.meta.url)
.pathname;
export default defineConfig([
globalIgnores(["**/dist/**/*"]),
{
files: ["**/*.{ts,tsx}"],
extends: [js.configs.recommended, tseslint.configs.recommended],
languageOptions: {
ecmaVersion: 2022,
globals: globals.browser,
},
plugins: {
unicorn,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "no-type-imports",
disallowTypeAnnotations: false,
},
],
"unicorn/filename-case": ["error"],
},
},
{
files: ["**/web/**/*.{ts,tsx}"],
extends: [
pluginReact.configs.flat.recommended,
pluginReact.configs.flat["jsx-runtime"],
reactHooks.configs.flat["recommended-latest"],
reactRefresh.configs.vite,
],
plugins: {
tailwindcss,
},
settings: {
react: {
version: "detect",
},
tailwindcss: {
callees: ["cn"],
config: webTailwindCssPath,
},
},
rules: {
"tailwindcss/no-unnecessary-arbitrary-value": "warn",
},
},
]);