Repository navigation
Expand file tree
/
Copy pathbiome.jsonc
More file actions
151 lines (151 loc) · 5.7 KB
/
Copy pathbiome.jsonc
File metadata and controls
151 lines (151 loc) · 5.7 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
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
146
147
148
149
150
151
{
// Biome as the repository's linter and formatter
// (builder/PLAN-TOOLING-REVIEW.md, decision 4). The linter runs the rules
// that find defects -- the correctness and suspicious groups -- and nothing
// about style; the formatter owns style, set to the style most of the tree
// was already written in. scripts/check_lint.mjs runs this configuration.
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"root": true,
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"includes": [
"builder/**/*.mjs",
"scripts/**/*.mjs",
"lib/**/*.mjs",
"book/**/*.mjs",
"book/lib/progress-handler.js",
"eval/**/*.mjs",
"wisdom/**/*.mjs",
"indexer/**/*.mjs",
"test/**/*.mjs",
"docs/assets/js/*.js",
// Vendored code, and the two pagedjs-cli ports the review treats as
// vendored: attributed and unmodified.
"!builder/vendor",
"!book/lib/paged.browser.js",
"!book/lib/outline.mjs",
"!book/lib/postprocesser.mjs",
// Copied byte for byte from the launcher repository and changed only
// there (its VENDORED.md), so its style is that repository's.
"!scripts/lib/llvm-cache",
// Workflow scripts, not modules: the agent Workflow engine runs each as
// a function body, so it ends in a top-level `return`, which no module
// parser accepts. check_regex_safety.mjs still reads their regexes,
// through acorn's allowReturnOutsideFunction.
"!wisdom/extract/workflow.mjs",
"!indexer/draft/workflow.mjs",
// Trees the gates read as data.
"!test/fixtures"
]
},
// Each setting is the one that changes the fewest lines of the tree as it
// was written. Comments are never reflowed; they stay wrapped at 80 columns
// by hand. Line endings are LF in every checkout (.gitattributes).
"formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2, "lineWidth": 120, "lineEnding": "lf" },
"javascript": {
"formatter": {
"quoteStyle": "double",
"semicolons": "always",
"trailingCommas": "all",
"arrowParentheses": "always",
"bracketSpacing": true
}
},
"assist": { "enabled": false },
"linter": {
"enabled": true,
"rules": {
"preset": "none",
// A name a module uses but never declares or imports. Off in the
// recommended set; a function moved to a module of its own without its
// imports passed every gate until the script ran.
"correctness": { "preset": "recommended", "noUndeclaredVariables": "error" },
"suspicious": {
"preset": "recommended",
// `while ((m = re.exec(s)))` is how this tree walks a regex's matches.
"noAssignInExpressions": "off",
// Strings here hold GitHub Actions, PowerShell and JavaScript source
// whose `${...}` is meant literally.
"noTemplateCurlyInString": "off"
}
}
},
"overrides": [
{
// Functions these hand to puppeteer's page.evaluate run in the page,
// after axe-core has been injected into it as the global `axe`.
"includes": ["scripts/lib/axe-scan.mjs", "scripts/check_axe_patch_equiv.mjs"],
"javascript": { "globals": ["axe"] }
},
{
// Loaded into the book's page by pagedjs, which defines `Paged`.
"includes": ["book/lib/progress-handler.js"],
"javascript": { "globals": ["Paged"] }
},
{
// ES5-style scripts that ship to readers as written.
// A trailing comma after a call's last argument is ES2017.
"includes": ["docs/assets/js/*.js"],
"javascript": { "formatter": { "trailingCommas": "es5" } },
"linter": { "rules": { "correctness": { "noInnerDeclarations": "off" } } }
},
{
// builder/ must not depend on scripts/. check_tree_fresh.mjs watches
// docs/ and builder/ as the inputs that decide the built bytes, and would
// not see a change to a module the build imported from scripts/. Biome
// files the rule under style; here it guards a dependency. The one
// exception is scripts/impexp.mjs, which builder/addin-project.mjs packs
// the help add-in's project file with: it imports nothing, the build
// already publishes it, and check_tree_fresh.mjs watches it by name.
"includes": ["builder/**/*.mjs"],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"patterns": [
{
"group": ["**/scripts/**", "!**/scripts/impexp.mjs"],
"message": "builder/ must not depend on scripts/."
}
]
}
}
}
}
}
},
{
// lib/ holds modules every other part of the tooling may import
// (lib/README.md), so it imports none of them; a lib/ module that reached
// into scripts/ would take builder/ there with it.
"includes": ["lib/**/*.mjs"],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"patterns": [
{
"group": [
"**/builder/**",
"**/scripts/**",
"**/book/**",
"**/eval/**",
"**/wisdom/**",
"**/indexer/**",
"**/test/**"
],
"message": "lib/ must not import builder/, scripts/, book/, eval/, wisdom/, indexer/ or test/."
}
]
}
}
}
}
}
}
]
}