Skip to content

Commit b9eec60

Browse files
committed
update commands with info from v2
1 parent 319c1be commit b9eec60

File tree

5 files changed

+99
-53
lines changed

5 files changed

+99
-53
lines changed

biome.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -30,11 +30,17 @@
3030
"useFilenamingConvention": "error",
3131
"useForOf": "error",
3232
"useShorthandAssign": "error",
33-
"useShorthandArrayType": "error"
33+
"noParameterAssign": "error",
34+
"useAsConstAssertion": "error",
35+
"useDefaultParameterLast": "error",
36+
"useEnumInitializers": "error",
37+
"useSelfClosingElements": "error",
38+
"useSingleVarDeclarator": "error",
39+
"noUnusedTemplateLiteral": "error",
40+
"useNumberNamespace": "error",
41+
"noInferrableTypes": "error",
42+
"noUselessElse": "error"
3443
}
3544
}
36-
},
37-
"organizeImports": {
38-
"enabled": true
3945
}
4046
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"typecheck": "tsc"
1616
},
1717
"devDependencies": {
18-
"@biomejs/biome": "^1.9.4",
18+
"@biomejs/biome": "^2.0.0",
1919
"@cloudflare/workers-types": "^4.20250617.0",
2020
"tsx": "^4.20.3",
2121
"typescript": "^5.8.3",

pnpm-lock.yaml

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

src/commands/arewepluginsyet.ts

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,58 @@
11
import { SlashCommandBuilder } from '@discordjs/builders';
22
import dedent from 'dedent';
3-
import { type APIApplicationCommandInteraction, InteractionResponseType } from 'discord-api-types/v10';
3+
import { ButtonStyle, ComponentType, InteractionResponseType, MessageFlags } from 'discord-api-types/v10';
44
import { reply } from '../reply.js';
55

6-
export async function onPluginsSlashCommand(interaction: APIApplicationCommandInteraction) {
6+
export async function onPluginsSlashCommand() {
77
return reply(InteractionResponseType.ChannelMessageWithSource, {
8-
content: dedent`
9-
🚨 **Plugins are coming to Biome 2.0** 🚨
10-
11-
See the umbrella issue: <https://github.com/biomejs/biome/issues/2463>
12-
`,
8+
flags: MessageFlags.IsComponentsV2,
9+
components: [
10+
{
11+
type: ComponentType.TextDisplay,
12+
content: dedent`
13+
### 🚨 Plugins are here 🚨
14+
[Biome v2](<https://biomejs.dev/blog/biome-v2>) comes with our first iteration of [linter plugins](https://biomejs.dev/linter/plugins).
15+
`,
16+
},
17+
{
18+
type: ComponentType.Separator,
19+
},
20+
{
21+
type: ComponentType.TextDisplay,
22+
content: dedent`
23+
You can put a GritQL snippet in a file anywhere in your project, but be mindful you use the \`.grit\` extension. Then, you can simply enable it as a plugin with the following configuration:
24+
\`\`\`json
25+
{
26+
"plugins": ["./path-to-plugin.grit"]
27+
}
28+
\`\`\`
29+
`,
30+
},
31+
{
32+
type: ComponentType.Separator,
33+
},
34+
{
35+
type: ComponentType.TextDisplay,
36+
content: dedent`
37+
These plugins are still limited in scope: They only allow you to match code snippets and report diagnostics on them.
38+
Want to contribute? See the umbrella issue: <https://github.com/biomejs/biome/issues/2463>
39+
`,
40+
},
41+
{
42+
type: ComponentType.ActionRow,
43+
components: [
44+
{
45+
type: ComponentType.Button,
46+
style: ButtonStyle.Link,
47+
url: 'https://biomejs.dev/linter/plugins',
48+
label: 'Documentation',
49+
},
50+
],
51+
},
52+
],
1353
});
1454
}
1555

1656
export const slashCommandData = new SlashCommandBuilder()
1757
.setName('arewepluginsyet')
18-
.setDescription('Does Biome support plugins yet?');
58+
.setDescription('Does Biome support plugins yet? (Yes!)');

src/commands/supported-languages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function onSupportedLanguagesSlashCommand(interaction: APIApplicati
99
### ✅ Full Support
1010
JavaScript, TypeScript, JSX, JSON, JSONC, CSS, GraphQL
1111
### ⚠️ Partial Support
12-
[Astro, Vue, Svelte](<https://github.com/biomejs/biome/issues/1719>) (Embedded JS only)
12+
[Astro, Vue, Svelte](<https://github.com/biomejs/biome/issues/1719>) (Embedded JS only), GritQL
1313
### ⏳ Working on it!
1414
HTML, [YAML](<https://github.com/biomejs/biome/issues/2365>)\*, Markdown
1515
### ❓ Not yet

0 commit comments

Comments
 (0)