-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
chore: use biome to format JSON and JavaScript files #8280
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
07613b9
chore: use biome to format JSON and JavaScript files
ematipico a58cc96
chore: rebase
ematipico 966bc2c
chore: fix build
ematipico 3fd6055
chore: fix regressions
ematipico 6a3ce6c
chore: revert JSON changes with new options
ematipico a09ee5a
chore: ignore commit
ematipico File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,98 @@ | ||
const { builtinModules } = require('module'); | ||
|
||
module.exports = { | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json', './tsconfig.eslint.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint', 'prettier', 'no-only-tests'], | ||
rules: { | ||
// These off/configured-differently-by-default rules fit well for us | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^_', ignoreRestSiblings: true }, | ||
], | ||
'no-only-tests/no-only-tests': 'error', | ||
'@typescript-eslint/no-shadow': ['error'], | ||
'no-console': 'warn', | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json', './tsconfig.eslint.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint', 'prettier', 'no-only-tests'], | ||
rules: { | ||
// These off/configured-differently-by-default rules fit well for us | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^_', ignoreRestSiblings: true }, | ||
], | ||
'no-only-tests/no-only-tests': 'error', | ||
'@typescript-eslint/no-shadow': ['error'], | ||
'no-console': 'warn', | ||
|
||
// Todo: do we want these? | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/class-literal-property-style': 'off', | ||
'@typescript-eslint/consistent-indexed-object-style': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/no-base-to-string': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/prefer-optional-chain': 'off', | ||
'@typescript-eslint/prefer-string-starts-ends-with': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
'@typescript-eslint/sort-type-constituents': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// Todo: do we want these? | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/class-literal-property-style': 'off', | ||
'@typescript-eslint/consistent-indexed-object-style': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/no-base-to-string': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/prefer-optional-chain': 'off', | ||
'@typescript-eslint/prefer-string-starts-ends-with': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
'@typescript-eslint/sort-type-constituents': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
|
||
// These rules enabled by the preset configs don't work well for us | ||
'@typescript-eslint/await-thenable': 'off', | ||
'prefer-const': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
// Ensure Node builtins aren't included in Astro's server runtime | ||
files: ['packages/astro/src/runtime/**/*.ts'], | ||
rules: { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
paths: [...builtinModules], | ||
patterns: ['node:*'], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['packages/**/test/*.js', 'packages/**/*.js'], | ||
env: { | ||
mocha: true, | ||
}, | ||
globals: { | ||
globalThis: false, // false means read-only | ||
}, | ||
rules: { | ||
'no-console': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['packages/integrations/**/*.ts'], | ||
rules: { | ||
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }], | ||
}, | ||
}, | ||
{ | ||
files: ['benchmark/**/*.js'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'no-console': 'off', | ||
}, | ||
}, | ||
], | ||
// These rules enabled by the preset configs don't work well for us | ||
'@typescript-eslint/await-thenable': 'off', | ||
'prefer-const': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
// Ensure Node builtins aren't included in Astro's server runtime | ||
files: ['packages/astro/src/runtime/**/*.ts'], | ||
rules: { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
paths: [...builtinModules], | ||
patterns: ['node:*'], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['packages/**/test/*.js', 'packages/**/*.js'], | ||
env: { | ||
mocha: true, | ||
}, | ||
globals: { | ||
globalThis: false, // false means read-only | ||
}, | ||
rules: { | ||
'no-console': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['packages/integrations/**/*.ts'], | ||
rules: { | ||
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }], | ||
}, | ||
}, | ||
{ | ||
files: ['benchmark/**/*.js'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'no-console': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,9 @@ benchmark/results/ | |
|
||
# Files | ||
pnpm-lock.yaml | ||
*.js | ||
*.ts | ||
*.mjs | ||
*.cjs | ||
*.json | ||
*.jsonc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Yeah I think we should only do this after merging. The commit hash will change