-
Notifications
You must be signed in to change notification settings - Fork 7
/
biome.jsonc
145 lines (145 loc) · 4.15 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
135
136
137
138
139
140
141
142
143
144
145
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"organizeImports": { "enabled": true },
"formatter": {
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80
},
"linter": {
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off",
"noUselessStringConcat": "warn",
"noUselessUndefinedInitialization": "warn",
"useSimplifiedLogicExpression": "info",
"useDateNow": "error"
},
"correctness": {
"noUndeclaredDependencies": "warn",
"noUndeclaredVariables": "warn",
"noUnusedFunctionParameters": "warn",
"noUnusedImports": "error"
},
"performance": {
"noBarrelFile": "info",
"noReExportAll": "info"
},
"style": {
"noDoneCallback": "warn",
"noNamespace": "error",
"noNamespaceImport": "warn",
"noNegationElse": "error",
"noNonNullAssertion": "off",
"noParameterProperties": "error",
"noRestrictedGlobals": "error",
"noShoutyConstants": "error",
"noYodaExpression": "warn",
"useCollapsedElseIf": "error",
"useConsistentBuiltinInstantiation": "error",
"useDefaultSwitchClause": "warn",
"useEnumInitializers": "off",
"useExplicitLengthCheck": "warn",
"useNamingConvention": {
"level": "error",
"options": { "strictCase": false }
},
"useShorthandArrayType": "error",
"useShorthandAssign": "error",
"useSingleCaseStatement": "info",
"useTemplate": "off",
"useThrowNewError": "error",
"useThrowOnlyError": "warn"
},
"suspicious": {
"noApproximativeNumericConstant": "error",
"noAssignInExpressions": "off",
"noConfusingVoidType": "off",
"noConsoleLog": "warn",
"noConstEnum": "off",
"noDuplicateAtImportRules": "error",
"noDuplicateFontNames": "error",
"noDuplicateSelectorsKeyframeBlock": "error",
"noEmptyBlock": "warn",
"noEvolvingTypes": "warn",
"noExplicitAny": "off",
"noFocusedTests": "error",
"noMisplacedAssertion": "error",
"noMisrefactoredShorthandAssign": "error",
"useErrorMessage": "warn"
},
"nursery": {
"noCommonJs": "error",
"noDuplicateElseIf": "error",
"noDynamicNamespaceImportAccess": "error",
"noEnum": "error",
"noExportedImports": "error",
"noSecrets": "warn", // TODO: Change to "error" when more stable
"noSubstr": "warn",
"noUnknownPseudoClass": "warn",
"noUnknownPseudoElement": "warn",
"useAdjacentOverloadSignatures": "error",
"useValidAutocomplete": "warn"
}
}
},
"javascript": {
"globals": ["chrome", "Timer"], // TODO: Remove `Timer`; only used as type (from Bun globals)
"formatter": {
"semicolons": "always",
"trailingCommas": "all",
"quoteStyle": "single"
}
},
"overrides": [
{
"include": [".vscode/*.json", "tsconfig*.json"],
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
}
}
},
{
"include": ["**/*.spec.ts", "**/*.test.ts", "test/**"],
"formatter": {
"lineWidth": 100
},
"linter": {
"rules": {
"correctness": {
"noUndeclaredDependencies": "off"
}
}
},
"javascript": {
"globals": ["$console", "Bun", "chrome", "happyDOM", "Loader"]
}
},
{
"include": ["*.config.mjs", "*.config.ts", "*.d.ts", "build.ts"],
"linter": {
"rules": {
"correctness": {
"noUndeclaredDependencies": "off"
},
"style": {
"noNamespaceImport": "off",
"useNamingConvention": "off"
},
"suspicious": {
"noConsoleLog": "off"
}
}
},
"javascript": {
"globals": ["Bun", "chrome"]
}
}
]
}