-
Notifications
You must be signed in to change notification settings - Fork 1
/
biome.jsonc
109 lines (109 loc) · 3.43 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
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.json"],
"ignore": ["**/bin", "**/obj", "**/types", "*.personal.*"]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
// Enable all by default (not just recommended), disable as-needed.
"all": true,
"nursery": {
"recommended": true
},
"a11y": {
// PROJECT-SPECIFIC, alt text in the context of CS2 does not make sense.
"noSvgWithoutTitle": "off",
// PROJECT-SPECIFIC, alt text in the context of CS2 does not make sense.
"useAltText": "off",
// PROJECT-SPECIFIC, does not make too much sense in the context of CS2.
"useKeyWithClickEvents": "off"
},
"complexity": {
// Learn the language.
"noVoid": "off"
},
"correctness": {
// I generally know what I'm doing.
"noNodejsModules": "off",
// PROJECT-SPECIFIC, here we are forced to disable it until the rule
// allows us to specify exceptions ("cs2/*" imports).
"noUndeclaredDependencies": "off",
// PROJECT-SPECIFIC, it is fine in this project.
"useImportExtensions": "off"
},
"performance": {
// Virtually not an issue with modern bundlers.
// It can indeed cause slower builds though, but my projects generally
// don't have much unused symbols.
"noBarrelFile": "off",
// Same as noBarrelFile.
"noReExportAll": "off"
},
"security": {
// It's already pretty clear when you use it
// (`dangerouslySetInnerHTML={{ __html: html }}`)
"noDangerouslySetInnerHtml": "off"
},
"style": {
// I must admit I just like it.
"noCommaOperator": "off",
// Same reason as performance.noBarrelFile.
"noNamespaceImport": "off",
// I like using template literals for hardcoded english strings, ex.
// exception error messages. This makes spotting them easier and also it
// makes it easier to use double or single quotes.
"noUnusedTemplateLiteral": "off",
// Keep it but with a few exceptions.
"useNamingConvention": {
"level": "error",
"options": {
"strictCase": false
}
}
},
"suspicious": {
// When I use anything other than `console.log`, it is intentional.
"noConsole": {
"level": "error",
"options": {
"allow": ["assert", "info", "warn", "error"]
}
},
// Double equals is not THAT bad, although I understand why the rule
// exists. If you know the language you can avoid the pitfalls and even
// enjoy the benefits of loose equality.
"noDoubleEquals": "off",
// PROJECT-SPECIFIC, we use React.
"noReactSpecificProps": "off"
}
}
},
"formatter": {
"lineEnding": "lf",
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 80,
"formatWithErrors": true
},
"json": {
"formatter": {
"indentWidth": 2
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "single",
"semicolons": "always",
"arrowParentheses": "asNeeded",
"quoteProperties": "preserve",
"trailingCommas": "none",
"bracketSameLine": true
}
}
}