Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: release v1.8.2
Browse files Browse the repository at this point in the history
ematipico committed Jun 20, 2024
1 parent eacf951 commit 0ae9382
Showing 9 changed files with 3,828 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/content/docs/guides/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ After running the `init` command, you'll now have a new `biome.json` file in you

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": false
},
6 changes: 3 additions & 3 deletions src/content/docs/guides/how-biome-works.mdx
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ Here's an example of how you might set up your `biome.json` to extend other conf

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"extends": ["./formatter.json", "./linter.json"]
}
```
@@ -96,7 +96,7 @@ For instance, you could define formatter settings in `formatter.json`:

```json title="formatter.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"formatter": {
"indentSize": 2
},
@@ -112,7 +112,7 @@ And linter rules in `linter.json`:

```json title="linter.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"linter": {
"rules": {
"complexity": {
162 changes: 150 additions & 12 deletions src/content/docs/internals/changelog.md
Original file line number Diff line number Diff line change
@@ -15,9 +15,142 @@ 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).

## v1.8.1 (2024-06-10)
## v1.8.2 (2024-06-20)

### Analyzer
### CLI

#### Bug fixes

- Fix [#3201](https://github.com/biomejs/biome/issues/3201) by correctly injecting the source code of the file when printing the diagnostics. Contributed by @ematipico
- Fix [#3179](https://github.com/biomejs/biome/issues/3179) where comma separators are not correctly removed after running `biome migrate` and thus choke the parser. Contributed by @Sec-ant

#### Enhancement

- Reword the reporter message `No fixes needed` to `No fixes applied`.

The former message is misleading when there're still errors or warnings in the files that should be taken care of manually. For example:

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

The new message suits better in these cases.

Contributed by @Sec-ant

### Configuration

#### Bug fixes

- Don't conceal previous overrides ([#3176](https://github.com/biomejs/biome/issues/3176)).

Previously, each override inherited the unset configuration of the base configuration.
This means that setting a configuration in an override can be concealed by a subsequent override that inherits of the value from the base configuration.

For example, in the next example, `noDebugger` was disabled for the `index.js` file.

```json
{
"linter": {
"rules": {
"suspicious": { "noDebugger": "off" }
}
},
"overrides": [
{
"include": ["index.js"],
"linter": {
"rules": {
"suspicious": { "noDebugger": "warn" }
}
}
}, {
"include": ["index.js"],
"linter": {
"rules": {
"suspicious": { "noDoubleEquals": "off" }
}
}
}
]
}
```

The rule is now correctly enabled for the `index.js` file.

Contributed by @Conaclos

### Formatter

#### Bug fixes

- Fix [#3103](https://github.com/biomejs/biome/issues/3103) by correctly resolving CSS formatter options. Contributed by @ah-yu
- Fix [#3192](https://github.com/biomejs/biome/issues/3192) don't add an extra whitespace within :has. Contributed by @denbezrukov

### JavaScript APIs

#### Bug fixes

- Fix a regression introduced by the release of `v1.8.0`

### Linter

#### New features

- Add [nursery/useValidAutocomplete](https://biomejs.dev/linter/rules/use-valid-autocomplete/). Contributed by @unvalley

#### Bug fixes

- Add [nursery/noShorthandPropertyOverrides](https://biomejs.dev/linter/rules/no-shorthand-property-overrides). [#2958](https://github.com/biomejs/biome/issues/2958) Contributed by @neokidev
- Fix [[#3084](https://github.com/biomejs/biome/issues/3084)] false positive by correctly recognize parenthesized return statement. Contributed by @unvalley
- [useImportExtensions](https://biomejs.dev/linter/rules/use-import-extensions/) now suggests a correct fix for `import '.'` and `import './.'`. Contributed by @minht11
- Fix [useDateNow](https://biomejs.dev/linter/rules/use-date-now/) false positive when new Date object has arguments `new Date(0).getTime()`. Contributed by @minht11.
- The [`noUnmatchableAnbSelector`](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector/) rule is now able to catch unmatchable `an+b` selectors like `0n+0` or `-0n+0`. Contributed by @Sec-ant.
- The [`useHookAtTopLevel`](https://biomejs.dev/linter/rules/use-hook-at-top-level/) rule now recognizes properties named as hooks like `foo.useFoo()`. Contributed by @ksnyder9801
- Fix [#3092](https://github.com/biomejs/biome/issues/3092), prevent warning for `Custom properties (--*)`. Contributed by @chansuke
- Fix a false positive in the [`useLiteralKeys`](https://biomejs.dev/linter/rules/use-literal-keys/) rule. ([#3160](https://github.com/biomejs/biome/issues/3160))

This rule now ignores the following kind of computed member name:

```js
const a = {
[`line1
line2`]: true,
};
```

Contributed by @Sec-ant

- The [noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property/) rule now ignores the `composes` property often used in css modules. [#3000](https://github.com/biomejs/biome/issues/3000) Contributed by @chansuke

- Fix false positives of the [useExhaustiveDependencies](https://biomejs.dev/linter/rules/use-exhaustive-dependencies/) rule.

The component itself is considered stable when it is used recursively inside a hook closure defined inside of it:

```jsx
import { useMemo } from "react";

function MyRecursiveComponent() {
// MyRecursiveComponent is stable, we don't need to add it to the dependencies list.
const children = useMemo(() => <MyRecursiveComponent />, []);
return <div>{children}</div>;
}
```

Also, `export default function` and `export default class` are considered stable now because they can only appear at the top level of a module.

Contributed by @Sec-ant

- Fix missing `withDefaults` macro in vue files for globals variables. Contributed by @Shyam-Chen

### Parser

#### Bug fixes

- Fix CSS modules settings mapping. Contributed by @denbezrukov

## v1.8.1 (2024-06-10)

### CLI

@@ -32,17 +165,13 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

- Fix [#3067](https://github.com/biomejs/biome/issues/3067), by assigning the correct default value to `indentWidth`. Contributed by @ematipico

### Editors

### Formatter

#### Bug fixes
- Fix the bug where whitespace after the & character in CSS nesting was incorrectly trimmed, ensuring proper targeting of child classes [#3061](https://github.com/biomejs/biome/issues/3061). Contributed by @denbezrukov
- Fix [#3068](https://github.com/biomejs/biome/issues/3068) where the CSS formatter was inadvertently converting variable declarations and function calls to lowercase. Contributed by @denbezrukov
- Fix the formatting of CSS grid layout properties. Contributed by @denbezrukov

### JavaScript APIs

### Linter

#### Bug fixes
@@ -77,12 +206,21 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

Contributed by @Conaclos

### Parser
- [noStringCaseMismatch](https://biomejs.dev/linter/rules/no-string-case-mismatch/) now ignores escape sequences ([#3134](https://github.com/biomejs/biome/issues/3134)).

#### New features
- Implemented CSS Unknown At-Rule parsing, allowing the parser to gracefully handle unsupported or unrecognized CSS at-rules. Contributed by @denbezrukov
The following code is no longer reported by the rule:

```js
s.toUpperCase() === "\u001b";
```

Contributed by @Conaclos

### Parser

#### Bug fixes

- Implemented CSS Unknown At-Rule parsing, allowing the parser to gracefully handle unsupported or unrecognized CSS at-rules. Contributed by @denbezrukov
- Fix [#3055](https://github.com/biomejs/biome/issues/3055) CSS: Layout using named grid lines is now correctly parsed. Contributed by @denbezrukov
- Fix [#3091](https://github.com/biomejs/biome/issues/3091). Allows the parser to handle nested style rules and at-rules properly, enhancing the parser's compatibility with the CSS Nesting Module. Contributed by @denbezrukov

@@ -383,8 +521,8 @@ New rules are incubated in the nursery group. Once stable, we promote them to a
#### New features

- Add [nursery/useDateNow](https://biomejs.dev/linter/rules/use-date-now/). Contributed by @minht11
- Add [nursery/useErrorMessage](https://biomejs.dev/linter/rules/use_error_message/). Contributed by @minht11
- Add [nursery/useThrowOnlyError](https://biomejs.dev/linter/rules/use_throw_only_error/). Contributed by @minht11
- Add [nursery/useErrorMessage](https://biomejs.dev/linter/rules/use-error-message/). Contributed by @minht11
- Add [nursery/useThrowOnlyError](https://biomejs.dev/linter/rules/use-throw-only-error/). Contributed by @minht11
- Add [nursery/useImportExtensions](https://biomejs.dev/linter/rules/use-import-extensions/). Contributed by @minht11

- [useNamingConvention](https://biomejs.dev/linter/rules/use-naming-convention/) now supports an option to enforce custom conventions ([#1900](https://github.com/biomejs/biome/issues/1900)).
@@ -437,7 +575,7 @@ New rules are incubated in the nursery group. Once stable, we promote them to a
- Add [nursery/noUnknownMediaFeatureName](https://biomejs.dev/linter/rules/no-unknown-media-feature-name). [#2751](https://github.com/biomejs/biome/issues/2751) Contributed by @Kazuhiro-Mimaki
- Add [nursery/noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property). [#2755](https://github.com/biomejs/biome/pull/2755) Contributed by @chansuke
- Add [nursery/noUnknownSelectorPseudoElement](https://biomejs.dev/linter/rules/no-unknown-selector-pseudo-element). [#2655](https://github.com/biomejs/biome/issues/2655) Contributed by @keita-hino
- Add [nursery/noUnknownUnit](https://biomejs.dev/linter/rules/no-unknwon-unit). [#2535](https://github.com/biomejs/biome/issues/2535) Contributed by @neokidev
- Add [nursery/noUnknownUnit](https://biomejs.dev/linter/rules/no-unknown-unit). [#2535](https://github.com/biomejs/biome/issues/2535) Contributed by @neokidev
- Add [nursery/noUnmatchableAnbSelector](https://biomejs.dev/linter/rules/no-unmatchable-anb-selector). [#2706](https://github.com/biomejs/biome/issues/2706) Contributed by @togami2864
- Add [nursery/useGenericFontNames](https://biomejs.dev/linter/rules/use-generic-font-names). [#2573](https://github.com/biomejs/biome/pull/2573) Contributed by @togami2864
- Add [nursery/noYodaExpression](https://biomejs.dev/linter/rules/no-yoda-expression/). Contributed by @michellocana
2 changes: 1 addition & 1 deletion src/content/docs/ja/guides/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ Biomeをインストールする際には、バージョン範囲演算子を使

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": false
},
2 changes: 1 addition & 1 deletion src/content/docs/pt-br/guides/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ Após utilizar o comando, você terá um novo arquivo `biome.json` no seu diret

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": false
},
2 changes: 1 addition & 1 deletion src/content/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ If you have problems with resolving the physical file, you can use the one publi

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json"
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json"
}
```

2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/guides/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ import PackageManagerCommand from "@/components/PackageManagerCommand.astro";

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": false
},
8 changes: 4 additions & 4 deletions src/content/docs/zh-cn/reference/configuration.mdx
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import LintGroups from "@/components/generated/Groups.astro";

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json"
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json"
}
```

@@ -37,14 +37,14 @@ import LintGroups from "@/components/generated/Groups.astro";

```json title="biome.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"extends": ["./formatter.json", "./linter.json"]
}
```

```json title="formatter.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"formatter": {
"indentSize": 2
},
@@ -58,7 +58,7 @@ import LintGroups from "@/components/generated/Groups.astro";

```json title="linter.json"
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"linter": {
"rules": {
"complexity": {
Loading

0 comments on commit 0ae9382

Please sign in to comment.