Skip to content
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

release: 1.6.0 #1969

Merged
merged 39 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
195dd5e
release: 1.6.0
ematipico Mar 5, 2024
92391f7
update some documentation
ematipico Mar 5, 2024
1489b21
chore: first draft of the blog post
ematipico Mar 6, 2024
d442905
one more chapter
ematipico Mar 6, 2024
a52a484
Apply suggestions from code review
ematipico Mar 6, 2024
aefd29d
feat: promote rule (#1978)
Conaclos Mar 6, 2024
3cb83bf
Merge branch 'main' into relase/1.6.0
Conaclos Mar 6, 2024
4a3c7f6
trailingCommas with S, and codegen
ematipico Mar 6, 2024
5d1a2c8
fix: avoid source overriding of useConsistentArrayType
Conaclos Mar 6, 2024
2573386
apply changes and fix changed check
ematipico Mar 6, 2024
a49f6ba
fix incorrect order in changelog example
ematipico Mar 6, 2024
e6c7606
refactor(lint/noUnusedVariables): don't report unused imports
Conaclos Mar 6, 2024
486dad2
Merge remote-tracking branch 'refs/remotes/origin/relase/1.6.0' into …
Conaclos Mar 6, 2024
0f291d8
refactor: remove useGroupedTypeImports
Conaclos Mar 6, 2024
b4dec0e
chore: update crates
ematipico Mar 7, 2024
49035c0
chore: fix changelog
ematipico Mar 7, 2024
57af3b8
Merge remote-tracking branch 'origin/main' into relase/1.6.0
ematipico Mar 7, 2024
61144f3
better explanation
ematipico Mar 7, 2024
c942068
fix diagnostics for `useJsxKeyInIterable`
ematipico Mar 7, 2024
a69cdf2
refacor: remove future dead links
Conaclos Mar 7, 2024
9cd09a0
refactor(lint): set version of new rules
Conaclos Mar 7, 2024
3893b1d
Update website/src/content/blog/biome-v1-6.mdx
ematipico Mar 7, 2024
7572772
apply suggestion
ematipico Mar 7, 2024
054c0fa
add warning
ematipico Mar 7, 2024
b5b7077
refactor: move useAwait in suspicious and set as not recommended
Conaclos Mar 7, 2024
dc31ee7
Merge branch 'relase/1.6.0' of github.com:biomejs/biome into relase/1…
Conaclos Mar 7, 2024
b081455
Update CHANGELOG.md
Conaclos Mar 7, 2024
6832bad
Update website/src/content/blog/biome-v1-6.mdx
Conaclos Mar 7, 2024
4206878
Update website/src/content/docs/internals/language-support.mdx
Conaclos Mar 7, 2024
5f8b156
Update website/src/content/docs/internals/language-support.mdx
Conaclos Mar 7, 2024
7024c4a
Update website/src/content/docs/guides/getting-started.mdx
Conaclos Mar 7, 2024
3b4f49d
Update website/src/content/docs/guides/getting-started.mdx
Conaclos Mar 7, 2024
daf339b
Update website/src/content/blog/biome-v1-6.mdx
Conaclos Mar 7, 2024
2d0b90e
chore: update changelog
Conaclos Mar 7, 2024
ac991ec
Merge branch 'main' into relase/1.6.0
Conaclos Mar 8, 2024
6fdfdf5
fix: remove warning
Conaclos Mar 8, 2024
1738773
fix: update 1.6.0 config schema
Conaclos Mar 8, 2024
95f1a82
chore(blog): add new rules section
Conaclos Mar 8, 2024
962087a
chore: update number of rules
ematipico Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01_formatter_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
id: environment
attributes:
label: Environment information
description: Run the command `biome rage` and paste its output here. Please review it, in case there are sensitive information you don't want to share.
description: Run the command `biome rage --formatter` and paste its output here. Please review it, in case there are sensitive information you don't want to share.
render: bash
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02_lint_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
id: environment
attributes:
label: Environment information
description: Run the command `biome rage` and paste its output here. Please review it, in case there are sensitive information you don't want to share.
description: Run the command `biome rage --linter` and paste its output here. Please review it, in case there are sensitive information you don't want to share.
render: bash
validations:
required: true
Expand Down
59 changes: 54 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ New entries must be placed in a section entitled `Unreleased`.
Read
our [guidelines for writing a good changelog entry](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#changelog).

## Unreleased
## 1.6.0 (TBD)

### Analyzer

Expand All @@ -22,8 +22,8 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
---
- import { getLocale } from "astro:i18n";
- import { Code } from "astro:components";
+ import { getLocale } from "astro:i18n";
+ import { Code } from "astro:components";
+ import { getLocale } from "astro:i18n";
---

<div></div>
Expand Down Expand Up @@ -317,6 +317,47 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### Linter

#### Promoted rules

New rules are incubated in the nursery group.
Once stable, we promote them to a stable group.
The following rules are promoted:

- [complexity/noEmptyTypeParameters](https://biomejs.dev/linter/rules/no-empty-type-parameters)
- [complexity/noUselessLoneBlockStatements](https://biomejs.dev/linter/rules/no-useless-lone-block-statements)
- [correctness/noUnusedImports](https://biomejs.dev/linter/rules/no-unused-imports)
- [correctness/noInvalidUseBeforeDeclaration](https://biomejs.dev/linter/rules/no-invalid-use-before-declaration)
- [correctness/noUnusedPrivateClassMembers](https://biomejs.dev/linter/rules/no-unused-private-class-members)
- [correctness/useAwait](https://biomejs.dev/linter/rules/use-await)
- [security/noGlobalEval](https://biomejs.dev/linter/rules/no-global-eval)
- [style/useConsistentArrayType](https://biomejs.dev/linter/rules/use-consistent-array-type)
- [style/useExportType](https://biomejs.dev/linter/rules/use-export-type)
- [style/useFilenamingConvention](https://biomejs.dev/linter/rules/use-filenaming-convention)
- [style/useForOf](https://biomejs.dev/linter/rules/use-for-of)
- [style/useImportType](https://biomejs.dev/linter/rules/use-import-type)
- [style/useNodejsImportProtocol](https://biomejs.dev/linter/rules/use-nodejs-import-protocol)
- [style/useNumberNamespace](https://biomejs.dev/linter/rules/use-number-namespace)
- [style/useShorthandFunctionType](https://biomejs.dev/linter/rules/use-shorthand-function-type)
- [suspicious/noEmptyBlockStatements](https://biomejs.dev/linter/rules/no-empty-block-statements)
- [suspicious/noGlobalAssign](https://biomejs.dev/linter/rules/no-global-assign)
- [suspicious/noMisleadingCharacterClass](https://biomejs.dev/linter/rules/no-misleading-character-class)
- [suspicious/noThenProperty](https://biomejs.dev/linter/rules/no-then-property)

Additionally, the following rules are now recommended:

- [suspicious/noApproximativeNumericConstant](https://biomejs.dev/linter/rules/no-approximative-numeric-constant)
- [suspicious/noMisrefactoredShorthandAssign](https://biomejs.dev/linter/rules/no-misrefactored-shorthand-assign)

#### Removed rules

- Remove [nursery/useGroupedTypeImport](https://biomejs.dev/linter/rules/use-grouped-type-import).

[style/useImportType](https://biomejs.dev/linter/rules/use-import-type) covers the behavior of this rule.

Note that removing a nursery rule is not breaking change according to our [versionning phillosophy](https://biomejs.dev/internals/versioning).

Contributed by @Conaclos

#### New features

- Add the rule [noSkippedTests](https://biomejs.dev/linter/rules/no-skipped-tests), to disallow skipped tests:
Expand Down Expand Up @@ -364,8 +405,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
<div></div>
```

- Add partial support for `.vue` files. Biome is able to lint and fix the script block of the Vue files. Contributed by
@nhedger
- Add partial support for `.vue` files. Biome is able to lint and fix the script block of the Vue files.

```diff
<script setup lang="ts">
Expand All @@ -376,6 +416,8 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b
<template></template>
```

Contributed by @nhedger

- Add rule [useNodeAssertStrict](https://biomejs.dev/linter/rules/use-node-assert-strict), which promotes the use
of `node:assert/strict` over `node:assert`. Contributed by @ematipico

Expand Down Expand Up @@ -479,6 +521,13 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

Contributed by @Conaclos

- [noUnusedVariables](https://biomejs.dev/linter/rules/no-unused-variables) no longer reports unused imports.

We now have a dedicated rule for reporting unused imports:
[noUnusedImpoorts](https://biomejs.dev/linter/rules/no-unused-imports)
ematipico marked this conversation as resolved.
Show resolved Hide resolved

Contributed by @Conaclos

#### Bug fixes

- Fix missing link in [noStaticOnlyClass](https://biomejs.dev/linter/rules/no-static-only-class) documentation.
Expand Down Expand Up @@ -638,7 +687,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

#### New features

- Add option `json.formatter.trailingComma`, to provide a better control over the trailing comma in JSON/JSONC files. Its default value is `"none"`.
- Add option `json.formatter.trailingCommas`, to provide a better control over the trailing comma in JSON/JSONC files. Its default value is `"none"`.

#### Bug fixes

Expand Down
12 changes: 9 additions & 3 deletions crates/biome_cli/src/execute/process_file/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub(crate) fn check_file<'ctx>(
let lint_result = lint_with_guard(ctx, &mut workspace_file);
match lint_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand All @@ -38,7 +40,9 @@ pub(crate) fn check_file<'ctx>(
let organize_imports_result = organize_imports_with_guard(ctx, &mut workspace_file);
match organize_imports_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand All @@ -57,7 +61,9 @@ pub(crate) fn check_file<'ctx>(
let format_result = format_with_guard(ctx, &mut workspace_file);
match format_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as something from "../something";
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ console.log(a);
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ The configuration that is contained inside the file `biome.json`
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
Global options applied to all commands
--colors=<off|force> Set the formatting mode for markup: "off" prints everything as plain text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rome.json internalError/fs ━━━━━━━━━━━━━━━━━
```

```block
Checked 2 files in <TIME>. No fixes needed.
Checked 2 files in <TIME>. Fixed 2 files.
```


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as something from "../something";
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ The configuration that is contained inside the file `biome.json`
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
Global options applied to all commands
--colors=<off|force> Set the formatting mode for markup: "off" prints everything as plain text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Available options:
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
--stdin-file-path=PATH Use this option when you want to format code piped from `stdin`, and
print the output to `stdout`.
The file doesn't need to exist on disk, what matters is the extension of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Environment:
NODE_PACKAGE_MANAGER: unset

Biome Configuration:
Status: Loaded successfully
Error: Found an unknown key `useConsistentArrayType`.
Status: Loaded with errors
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
Expand All @@ -74,7 +75,6 @@ Linter:
a11y/noAutofocus = "off"
complexity/recommended = true
correctness/all = true
nursery/useConsistentArrayType = {"level":"warn","options":{"syntax":"shorthand"}}
style/noNonNullAssertion = "off"
suspicious/noCommentText = {"level":"warn","options":null}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ biome.json:6:13 deserialize ━━━━━━━━━━━━━━━━━
- noInnerDeclarations
- noInvalidConstructorSuper
- noInvalidNewBuiltin
- noInvalidUseBeforeDeclaration
- noNewSymbol
- noNonoctalDecimalEscape
- noPrecisionLoss
Expand All @@ -73,10 +74,13 @@ biome.json:6:13 deserialize ━━━━━━━━━━━━━━━━━
- noUnreachableSuper
- noUnsafeFinally
- noUnsafeOptionalChaining
- noUnusedImports
- noUnusedLabels
- noUnusedPrivateClassMembers
- noUnusedVariables
- noVoidElementsWithChildren
- noVoidTypeReturn
- useAwait
- useExhaustiveDependencies
- useHookAtTopLevel
- useIsNan
Expand Down Expand Up @@ -120,17 +124,25 @@ biome.json:9:13 deserialize ━━━━━━━━━━━━━━━━━
- useAsConstAssertion
- useBlockStatements
- useCollapsedElseIf
- useConsistentArrayType
- useConst
- useDefaultParameterLast
- useEnumInitializers
- useExponentiationOperator
- useExportType
- useFilenamingConvention
- useForOf
- useFragmentSyntax
- useImportType
- useLiteralEnumMembers
- useNamingConvention
- useNodejsImportProtocol
- useNumberNamespace
- useNumericLiterals
- useSelfClosingElements
- useShorthandArrayType
- useShorthandAssign
- useShorthandFunctionType
- useSingleCaseStatement
- useSingleVarDeclarator
- useTemplate
Expand Down
Loading
Loading