-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
74 lines (72 loc) · 2.21 KB
/
Copy patheslint.config.js
File metadata and controls
74 lines (72 loc) · 2.21 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
66
67
68
69
70
71
72
73
74
// Minimal ESLint config — Biome covers formatting and most linting.
// ESLint is kept only for structural rules that enforce AGENTS.md conventions
// Biome cannot express (they need TypeScript type information).
//
// The rules themselves now come from `@charcuterie/eslint-config`, the fleet's
// shared house rules, so `id-length`, the `is`/`has` boolean naming convention,
// one-component-per-file and `test()`-not-`it()` are identical here and in every
// other Charcuterie app. CastKit supplies only what is repo-shaped: which paths
// the React rules cover, and the zod `z` alias.
import {
createLogicalPropertiesRules,
createReactRules,
createStoryOverrides,
createTestRules,
createTypedRules,
} from "@charcuterie/eslint-config"
import { defineConfig } from "eslint/config"
export default defineConfig(
{
ignores: [
".claude/worktrees/**",
".yarn/**",
"**/build/**",
"**/dist/**",
"**/node_modules/**",
"**/public/**",
"**/render-output/**",
"**/scripts/**",
"**/storybook-static/**",
"docs/**",
],
},
createTypedRules({
tsconfigRootDir: import.meta.dirname,
}),
{
// The shared `id-length` exceptions are `_` and `$`; CastKit's server
// packages also use `z` as the conventional zod namespace alias.
files: ["**/*.{ts,tsx}"],
rules: {
"id-length": [
"error",
{
min: 2,
exceptions: ["_", "$", "z"],
properties: "never",
},
],
},
},
// AGENTS.md convention: one component per file in the view/web packages.
createReactRules({
files: ["packages/{views,web}/**/*.{ts,tsx}"],
}),
createStoryOverrides({
files: [
"packages/{views,web}/**/__fixtures__/**/*.{ts,tsx}",
"packages/{views,web}/**/*.stories.tsx",
// Storybook-only preview helpers: catalogs that map many view names to
// element builders are multi-component by nature, like the stories they
// feed.
"packages/web/src/storybook/**/*.tsx",
],
}),
createTestRules({
files: ["**/*.test.{ts,tsx}"],
}),
// Logical properties only, in the shipped component markup.
createLogicalPropertiesRules({
files: ["packages/{views,web}/**/*.tsx"],
}),
)