Skip to content

Commit 713765d

Browse files
chore(ci): synchronize to e8dc656 (#2862)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 59863a2 commit 713765d

File tree

12 files changed

+324
-108
lines changed

12 files changed

+324
-108
lines changed

Cargo.lock

Lines changed: 70 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ path = "codegen/src/lib.rs"
1616
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1717
[dependencies]
1818
anyhow = "1.0.98"
19-
biome_analyze = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79", features = [
19+
biome_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b", features = [
2020
"schema",
2121
] }
22-
biome_cli = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
23-
biome_configuration = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79", features = [
22+
biome_cli = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
23+
biome_configuration = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b", features = [
2424
"schema",
2525
] }
26-
biome_console = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
27-
biome_css_analyze = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
28-
biome_css_parser = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
29-
biome_css_syntax = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
30-
biome_deserialize = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
31-
biome_diagnostics = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
32-
biome_flags = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
33-
biome_formatter = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
34-
biome_fs = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
35-
biome_graphql_analyze = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
36-
biome_graphql_parser = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
37-
biome_graphql_syntax = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
38-
biome_js_analyze = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
39-
biome_js_formatter = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
40-
biome_js_parser = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
41-
biome_js_syntax = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
42-
biome_json_analyze = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
43-
biome_json_factory = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
44-
biome_json_formatter = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
45-
biome_json_parser = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
46-
biome_json_syntax = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
47-
biome_rowan = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
48-
biome_service = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
49-
biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
50-
biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "9f4538ab8bad8a974b8e408641b1fd4770d26c79" }
26+
biome_console = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
27+
biome_css_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
28+
biome_css_parser = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
29+
biome_css_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
30+
biome_deserialize = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
31+
biome_diagnostics = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
32+
biome_flags = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
33+
biome_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
34+
biome_fs = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
35+
biome_graphql_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
36+
biome_graphql_parser = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
37+
biome_graphql_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
38+
biome_js_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
39+
biome_js_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
40+
biome_js_parser = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
41+
biome_js_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
42+
biome_json_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
43+
biome_json_factory = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
44+
biome_json_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
45+
biome_json_parser = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
46+
biome_json_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
47+
biome_rowan = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
48+
biome_service = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
49+
biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
50+
biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "e8dc65600a260aad428da25638ff6ca48accdf6b" }
5151
bpaf = { version = "0.9.20", features = ["docgen"] }
5252
# Needed to fix some weird dependency
5353
lock_api = "0.4.13"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@astrojs/rss": "4.0.12",
3434
"@astrojs/starlight": "0.35.2",
3535
"@biomejs/biome": "2.1.4",
36-
"@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@9f4538a",
36+
"@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e8dc656",
3737
"@codemirror/lang-css": "6.3.1",
3838
"@codemirror/lang-html": "6.4.9",
3939
"@codemirror/lang-javascript": "6.2.4",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redirects.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ export default {
234234
'/linter/rules/noVoid': '/linter/rules/no-void',
235235
'/linter/rules/noVoidElementsWithChildren': '/linter/rules/no-void-elements-with-children',
236236
'/linter/rules/noVoidTypeReturn': '/linter/rules/no-void-type-return',
237+
'/linter/rules/noVueDataObjectDeclaration': '/linter/rules/no-vue-data-object-declaration',
237238
'/linter/rules/noVueReservedKeys': '/linter/rules/no-vue-reserved-keys',
238239
'/linter/rules/noVueReservedProps': '/linter/rules/no-vue-reserved-props',
239240
'/linter/rules/noWith': '/linter/rules/no-with',

src/components/generated/linter/NumberOfRules.astro

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/docs/linter/domains.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ Rules that belong to the domain:
9595
- [noUnresolvedImports](/linter/rules/no-unresolved-imports)
9696
- [useExhaustiveSwitchCases](/linter/rules/use-exhaustive-switch-cases) (recommended)
9797
- [useJsonImportAttribute](/linter/rules/use-json-import-attribute)
98+
## Qwik
99+
Use this domain inside Qwik projects. This domain enables rules that are specific to Qwik projects.
98100
### Qwik activation
99101
Enabled the **recommended** rules of the domain:
100102
```json title="biome.json" ins={3-5}
@@ -323,5 +325,6 @@ Enabled when the following dependencies are declared:
323325

324326
### Vue rules
325327
Rules that belong to the domain:
328+
- [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) (recommended)
326329
- [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) (recommended)
327330
- [noVueReservedProps](/linter/rules/no-vue-reserved-props) (recommended)

src/content/docs/linter/javascript/rules.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of
178178
| [noUselessBackrefInRegex](/linter/rules/no-useless-backref-in-regex) | Disallow useless backreferences in regular expression literals that always match an empty string. | |
179179
| [noUselessEscapeInString](/linter/rules/no-useless-escape-in-string) | Disallow unnecessary escapes in string literals. | <span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span> |
180180
| [noUselessUndefined](/linter/rules/no-useless-undefined) | Disallow the use of useless `undefined`. | <span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span> |
181+
| [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) | Enforce that Vue component `data` options are declared as functions. | <span class='inline-icon' title='The rule has a safe fix.'><Icon name="seti:config" label="The rule has a safe fix" size="1.2rem" /></span><span class='inline-icon' title="This rule is only available in beta"><Icon name="moon" label="This rule is only available in beta" size="1.2rem" /></span> |
181182
| [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) | Disallow reserved keys in Vue component data and computed properties. | |
182183
| [noVueReservedProps](/linter/rules/no-vue-reserved-props) | Disallow reserved names to be used as props. | |
183184
| [useAdjacentGetterSetter](/linter/rules/use-adjacent-getter-setter) | Enforce that getters and setters for the same property are adjacent in class and object definitions. | |

src/content/docs/linter/rules/no-import-cycles.mdx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,67 @@ export function baz() {
9999
}
100100
```
101101

102+
**`types.ts`**
103+
104+
```ts
105+
import type { bar } from "./qux.ts";
106+
107+
export type Foo = {
108+
bar: typeof bar;
109+
};
110+
```
111+
112+
**`qux.ts`**
113+
114+
```ts
115+
import type { Foo } from "./types.ts";
116+
117+
export function bar(foo: Foo) {
118+
console.log(foo);
119+
}
120+
```
121+
122+
## Options
123+
124+
The rule provides the options described below.
125+
126+
### `ignoreTypes`
127+
128+
Ignores type-only imports when finding an import cycle. A type-only import (`import type`)
129+
will be removed by the compiler, so it cuts an import cycle at runtime. Note that named type
130+
imports (`import { type Foo }`) aren't considered as type-only because it's not removed by
131+
the compiler if the `verbatimModuleSyntax` option is enabled. Enabled by default.
132+
133+
```json
134+
{
135+
"options": {
136+
"ignoreTypes": false
137+
}
138+
}
139+
```
140+
141+
#### Invalid
142+
143+
**`types.ts`**
144+
145+
```ts
146+
import type { bar } from "./qux.ts";
147+
148+
export type Foo = {
149+
bar: typeof bar;
150+
};
151+
```
152+
153+
**`qux.ts`**
154+
155+
```ts
156+
import type { Foo } from "./types.ts";
157+
158+
export function bar(foo: Foo) {
159+
console.log(foo);
160+
}
161+
```
162+
102163
## How to configure
103164
```json title="biome.json"
104165
{
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built.
3+
# Head to the `biomejs/biome` repository, and modify the source code in there.
4+
5+
title: noVueDataObjectDeclaration
6+
description: Learn more about noVueDataObjectDeclaration
7+
---
8+
import { Tabs, TabItem } from '@astrojs/starlight/components';
9+
10+
<Tabs>
11+
<TabItem label="JavaScript (and super languages)" icon="seti:javascript">
12+
## Summary
13+
:::note
14+
This rule is currently only available in the [2.0 beta release](/blog/biome-v2-0-beta).
15+
:::
16+
- Diagnostic Category: [`lint/nursery/noVueDataObjectDeclaration`](/reference/diagnostics#diagnostic-category)
17+
- This rule has a [**safe**](/linter/#safe-fixes) fix.
18+
- The default severity of this rule is [**information**](/reference/diagnostics#information).
19+
- This rule belongs to the following domains:
20+
- [`vue`](/linter/domains#vue)
21+
- Sources:
22+
- Inspired from [`vue/no-deprecated-data-object-declaration`](https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration)
23+
- Inspired from [`vue/no-shared-component-data`](https://eslint.vuejs.org/rules/no-shared-component-data)
24+
25+
:::caution
26+
This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time.
27+
:::
28+
## Description
29+
Enforce that Vue component `data` options are declared as functions.
30+
31+
In Vue 3+, defining `data` as an object is deprecated because it leads to shared mutable state across component instances.
32+
This rule flags usages of `data: { … }` and offers an automatic fix to convert it into a function returning that object.
33+
34+
See also:
35+
– Vue Migration Guide – Data Option: https://v3-migration.vuejs.org/breaking-changes/data-option.html :contentReference[oaicite:0]{index=0}
36+
– ESLint Plugin Vue: `no-deprecated-data-object-declaration`: https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration :contentReference[oaicite:1]{index=1}
37+
38+
## Examples
39+
40+
### Invalid
41+
42+
```js
43+
// component-local data via function
44+
export default {
45+
/* ✗ BAD */
46+
data: { foo: null },
47+
};
48+
```
49+
50+
```js
51+
// Composition API helper also deprecated
52+
defineComponent({
53+
/* ✗ BAD */
54+
data: { message: 'hi' }
55+
});
56+
```
57+
58+
```js
59+
// Vue 3 entrypoint via createApp
60+
createApp({
61+
/* ✗ BAD */
62+
data: { active: true }
63+
}).mount('#app');
64+
```
65+
66+
### Valid
67+
68+
```js
69+
// component-local data via function
70+
export default {
71+
/* ✓ GOOD */
72+
data() {
73+
return { foo: null };
74+
}
75+
};
76+
```
77+
78+
```js
79+
// global registration with function syntax
80+
Vue.component('my-comp', {
81+
/* ✓ GOOD */
82+
data: function () {
83+
return { count: 0 };
84+
}
85+
});
86+
```
87+
88+
```js
89+
// Composition API and createApp entrypoints
90+
defineComponent({
91+
/* ✓ GOOD */
92+
data() {
93+
return { message: 'hi' };
94+
}
95+
});
96+
97+
createApp({
98+
/* ✓ GOOD */
99+
data: function() {
100+
return { active: true };
101+
}
102+
}).mount('#app');
103+
```
104+
105+
## How to configure
106+
```json title="biome.json"
107+
{
108+
"linter": {
109+
"rules": {
110+
"nursery": {
111+
"noVueDataObjectDeclaration": "error"
112+
}
113+
}
114+
}
115+
}
116+
117+
```
118+
## Related links
119+
120+
- [Disable a rule](/linter/#disable-a-rule)
121+
- [Configure the code fix](/linter#configure-the-code-fix)
122+
- [Rule options](/linter/#rule-options)
123+
124+
</TabItem>
125+
</Tabs>
126+

0 commit comments

Comments
 (0)