-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbiome.jsonc
More file actions
100 lines (100 loc) · 3.09 KB
/
Copy pathbiome.jsonc
File metadata and controls
100 lines (100 loc) · 3.09 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
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
{
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
// Biome replaces eslint, eslint-config-chartjs and eslint-plugin-es here.
// The formatter settings below are the eslint-config-chartjs style rules
// (2-space indent, single quotes, semicolons, no spacing inside braces),
// so that adopting the formatter is not also a restyling of the sources.
"files": {
"includes": [
"**/*.js",
"**/*.mjs",
"**/*.ts",
"**/*.json",
"**/*.jsonc",
"!package-lock.json",
// Emitted from the JSDoc by `npm run types`, not edited by hand.
"!types/generated"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
// eslint had `max-len` off; this only wraps what is already very long.
"lineWidth": 120
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
// object-curly-spacing: never
"bracketSpacing": false,
// quotes: single, avoidEscape
"quoteStyle": "single",
// semi: always
"semicolons": "always",
// comma-dangle: only-multiline -- never adding one keeps the diff small
"trailingCommas": "none"
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"complexity": {
// eslint: complexity [2, 10]. Cognitive complexity is a different
// measure, so the threshold is not the same number.
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": { "maxAllowedComplexity": 15 }
}
// These were off while the sources were ES5 (`var`, `arguments`,
// string concatenation). The Vitest rewrite has no such code left, so
// they are on: recommended defaults, nothing added.
},
"style": {
// eslint: curly [2, all]
"useBlockStatements": "error"
},
"suspicious": {
// eslint: no-console [2, {allow: [warn, error]}]
"noConsole": {
"level": "error",
"options": { "allow": ["warn", "error"] }
},
// `isNaN` and `Number.isNaN` do not answer the same question: the
// global coerces, and the matchers rely on that.
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
// The code already uses the safe `Object.prototype.hasOwnProperty.call`
// form; the rule only wants the newer `Object.hasOwn`.
"noPrototypeBuiltins": "off"
}
}
},
"overrides": [
{
// Ported from 0.5.0 with only the Image guard changed, and kept diffable
// against that version. The optional-chain rewrite of `text && text.charCodeAt`
// is equivalent here only because the loops iterate over `text.length`,
// which is not a property of the guard worth relying on in a port.
"includes": ["src/spriting.js"],
"linter": {
"rules": {
"complexity": { "useOptionalChain": "off" }
}
}
}
],
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}