-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbiome.jsonc
134 lines (132 loc) · 3.4 KB
/
biome.jsonc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"organizeImports": {
"enabled": false
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
// this rule is annoying during development (it can always be turned on in CI)
"noUnusedImports": "off"
},
"style": {
"noDefaultExport": "off",
"noNonNullAssertion": { "level": "warn" },
"useImportType": { "level": "error" }
},
"complexity": {
// disable rule because arrow functions are in fact different vs. function syntax (e.g. they do not bind `this`)
// react components lose the component name with arrow functions but do not with the function() syntax
"useArrowFunction": { "fix": "none", "level": "off" }
},
"a11y": {
// the majority of our svg icons are aria-hidden so this rule is not useful
"noSvgWithoutTitle": {
"level": "off"
},
// bs rule says to use semantic elements with native alert role but wtf element is that
"useSemanticElements": {
"level": "off"
}
},
"suspicious": {
// set to warn because key={index} is ok in react for trivial cases where components will not be reordered
"noArrayIndexKey": { "level": "warn" }
},
"nursery": {}
}
},
"javascript": {
"formatter": {
"enabled": true,
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "asNeeded",
"jsxQuoteStyle": "double"
}
},
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": false
},
"formatter": {
"enabled": true
}
},
"css": {
"parser": {
"allowWrongLineComments": false,
"cssModules": false
}
},
"overrides": [
// computed keys are a common pattern with libraries such as clsx
{
"include": ["apps/**/*.tsx", "functions/**/*.ts", "packages/react-*/**"],
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "off"
}
// "nursery": {}
}
}
},
// false positive when putting routes in a tuple with a jsx component
{
"include": ["apps/**/router.tsx"],
"linter": {
"rules": {
"correctness": {
"useJsxKeyInIterable": "off"
}
}
}
},
// loosen rules for tests to allow `any`
{
"include": ["**/*.test.ts", "**/*.test.tsx"],
"linter": {
"rules": {
"complexity": {
"noForEach": "off"
},
"correctness": {
"noUnusedImports": "off"
},
"suspicious": {
"noExplicitAny": "off"
}
}
}
}
],
"files": {
"ignore": [
// pnpm and npm format package.json differently than biome so ignore to avoid unnecessary changes in git
"package.json",
// other patterns (also refer to .gitignore when `vcs.useIgnoreFile` is `true`)
"**/node_modules",
"**/migrations",
"**/coverage",
"**/storybook-static"
]
}
}