-
Notifications
You must be signed in to change notification settings - Fork 750
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (63 loc) · 1.72 KB
/
Copy patheslint.config.js
File metadata and controls
64 lines (63 loc) · 1.72 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
import pluginQuery from "@tanstack/eslint-plugin-query";
import { defineConfig } from "eslint/config";
import tseslint from "typescript-eslint";
export default defineConfig(
{
ignores: [
"**/target/**",
"**/dist/**",
"**/node_modules/**",
"**/*.gen.*",
"apps/desktop/src/i18n/locales/*/messages.ts",
],
},
{
files: ["apps/web/**/*.{ts,tsx}", "apps/desktop/**/*.{ts,tsx}"],
extends: [
tseslint.configs.base,
...pluginQuery.configs["flat/recommended"],
],
rules: {
"no-restricted-imports": [
"error",
{
paths: [
{
name: "sonner",
importNames: ["Toaster"],
message:
"Use Toaster from @anlg/ui/components/ui/toast for Hugeicons.",
},
],
patterns: [
{
group: [
"lucide*",
"@phosphor-icons/*",
"phosphor-react",
"react-icons",
"react-icons/*",
"@tabler/icons*",
"@heroicons/*",
"@radix-ui/react-icons",
"@fortawesome/*",
"@hugeicons/*",
],
message:
"Use @anlg/ui/components/icons so interface icons come from the shared Hugeicons set.",
},
],
},
],
"no-restricted-syntax": [
"error",
{
selector:
"JSXOpeningElement[name.name='Streamdown']:not(:has(JSXAttribute[name.name='icons']))",
message:
"Pass streamdownIcons from @anlg/ui/components/streamdown-icons so markdown controls use Hugeicons.",
},
],
},
},
);