-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Prettier with Biome #7441
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# Update .prettierignore whenever this file changes | ||
docs/ | ||
node_modules/ | ||
.idea/ | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true, | ||
"defaultBranch": "main" | ||
}, | ||
"files": { "ignoreUnknown": false, "ignore": [] }, | ||
"formatter": { | ||
"enabled": true, | ||
"useEditorconfig": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 80, | ||
"attributePosition": "auto", | ||
"bracketSpacing": true, | ||
"ignore": [ | ||
"./wwwroot/data/regionids/*", | ||
"**/yarn.lock", | ||
"**/*.scss.d.ts", | ||
"./wwwroot/third_party/*", | ||
"doc/acknowledgements/attributions.md", | ||
"./wwwroot/test/init/sdmx-abs.json" | ||
] | ||
}, | ||
"organizeImports": { "enabled": false }, | ||
"linter": { "enabled": false, "rules": { "recommended": true } }, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "none", | ||
"semicolons": "always", | ||
"arrowParentheses": "always", | ||
"bracketSameLine": false, | ||
"attributePosition": "auto", | ||
"bracketSpacing": true | ||
} | ||
}, | ||
"json": { | ||
"parser": { | ||
"allowComments": true, | ||
"allowTrailingCommas": true | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,20 +31,20 @@ export type Or< | |
> = [A] extends [true] | ||
? true | ||
: [B] extends [true] | ||
? true | ||
: [C] extends [true] | ||
? true | ||
: [D] extends [true] | ||
? true | ||
: [E] extends [true] | ||
? true | ||
: [F] extends [true] | ||
? true | ||
: [G] extends [true] | ||
? true | ||
: [H] extends [true] | ||
? true | ||
: false; | ||
? true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The formatting of |
||
: [C] extends [true] | ||
? true | ||
: [D] extends [true] | ||
? true | ||
: [E] extends [true] | ||
? true | ||
: [F] extends [true] | ||
? true | ||
: [G] extends [true] | ||
? true | ||
: [H] extends [true] | ||
? true | ||
: false; | ||
|
||
/** | ||
* Inverts a conditional, changing `true` to `false` and `false` to `true`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,8 +146,7 @@ class MapboxVectorTileCatalogItem extends MappableMixin( | |
} | ||
} | ||
|
||
@computed | ||
/** Convert traits into paint rules: | ||
@computed /** Convert traits into paint rules: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prettier 3.4.2 also has this problem. Split out the change that moves the JSDoc to #7440 so that can get merged now without having to update the formatter. |
||
* - `layer` and `fillColor`/`lineColor` into simple rules | ||
* - `parsedJsonStyle` | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,10 @@ export default class WebMapServiceCapabilities { | |
readonly [name: string]: CapabilitiesLayer; | ||
}; | ||
|
||
private constructor(readonly xml: XMLDocument, readonly json: any) { | ||
private constructor( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't appreciate that constructors with readonly parameters are split over multiple lines even when they fit with room to spare in a single line, but this formatting is also consistent with Prettier 3.4.2. |
||
readonly xml: XMLDocument, | ||
readonly json: any | ||
) { | ||
this.allLayers = []; | ||
this.rootLayers = []; | ||
this.topLevelNamedLayers = []; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a 1.7 MB file that hasn't been updated since 2017, so put it in the ignore list to not slow down the formatting that is done.