Skip to content

Commit d58a22f

Browse files
authored
chore: update biome to 1.9 (#1401)
1 parent fd520a8 commit d58a22f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+53
-509
lines changed

.github/workflows/verify.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,6 @@ jobs:
2323
outputs:
2424
base-branch: ${{ steps.get-base-branch.outputs.BRANCH }}
2525

26-
lint:
27-
name: Lint
28-
needs: [branch-info]
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
with:
33-
fetch-depth: 0
34-
35-
- uses: pnpm/action-setup@v3
36-
37-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
38-
uses: nrwl/nx-set-shas@v4
39-
with:
40-
main-branch-name: ${{needs.branch-info.outputs.base-branch}}
41-
42-
- name: Setup Node
43-
uses: actions/setup-node@v4
44-
with:
45-
node-version: 20
46-
cache: pnpm
47-
48-
- name: Install Dependencies
49-
run: pnpm install
50-
51-
- name: Lint
52-
run: pnpm lint:packages
53-
5426
test:
5527
name: Test
5628
needs: [branch-info]

.plop/templates/component/package.json.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"scripts": {
3535
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3636
"clean": "rm -rf dist",
37-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3837
"test": "vitest run --coverage"
3938
},
4039
"dependencies": {

.stylelintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"editor.formatOnSave": true,
55
"editor.defaultFormatter": "biomejs.biome",
66
"editor.codeActionsOnSave": {
7-
"source.fixAll.stylelint": "explicit",
87
"quickfix.biome": "explicit",
98
"source.organizeImports.biome": "explicit"
109
},

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ All Javascript code is linted with [Biome](https://biomejs.dev/).
217217

218218
### CSS Styleguide
219219

220-
All CSS code is linted with [Stylelint](https://stylelint.io/).
220+
All CSS code is linted with [Biome](https://biomejs.dev/).
221221

222222
### Specs Styleguide
223223

biome.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@
2222
"enabled": true,
2323
"rules": {
2424
"recommended": true,
25+
"a11y": {
26+
"noLabelWithoutControl": "off",
27+
"useSemanticElements": "off"
28+
},
2529
"correctness": {
2630
"noUnusedVariables": "error",
2731
"useHookAtTopLevel": "error",
28-
"noUnusedImports": "error"
32+
"noUnusedImports": "error",
33+
"noUnknownMediaFeatureName": "off"
2934
},
3035
"performance": {
3136
"noDelete": "off",
@@ -38,8 +43,8 @@
3843
"useNodejsImportProtocol": "off",
3944
"noNamespaceImport": "error"
4045
},
41-
"nursery": {
42-
"noDuplicateJsonKeys": "error"
46+
"suspicious": {
47+
"noEmptyBlock": "off"
4348
}
4449
}
4550
},
@@ -57,9 +62,6 @@
5762
"enabled": true,
5863
"lineWidth": 100,
5964
"quoteStyle": "single"
60-
},
61-
"linter": {
62-
"enabled": true
6365
}
6466
},
6567
"vcs": {

docs/tech-stack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To test accessibility we use [Playwright](https://playwright.dev/) with [@axe-co
3838

3939
## Code Style
4040

41-
We use [Biome](https://biomejs.dev/) and [Stylelint](https://stylelint.io/) to highlight problems in our code and [Biome](https://biomejs.dev/) to format it to be consistent across the repo.
41+
We use [Biome](https://biomejs.dev/) to highlight problems in our code and [Biome](https://biomejs.dev/) to format it to be consistent across the repo.
4242

4343
## Git
4444

lint-staged.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module.exports = {
2-
'*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}': [
3-
'biome check --apply --no-errors-on-unmatched', // Format, sort imports, lint, and apply safe fixes
2+
'*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,css}': [
3+
'biome check --write --no-errors-on-unmatched', // Format, sort imports, lint, and apply safe fixes
44
],
5-
'*.css': ['stylelint --fix'],
65
};

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"e2e:a11y": "STORYBOOK_URL=http://127.0.0.1:8080/ pnpm playwright test",
1414
"generate": "plop",
1515
"graph": "nx affected:graph",
16-
"lint:packages": "pnpm build:transform && nx affected --target=lint",
1716
"storybook": "pnpm build:transform && sb dev -p 3000",
1817
"storybook:build": "pnpm build:transform && sb build --quiet",
1918
"test": "pnpm build:transform && vitest run --coverage",
@@ -36,7 +35,7 @@
3635
"homepage": "https://github.com/launchdarkly/launchpad-ui#readme",
3736
"devDependencies": {
3837
"@axe-core/playwright": "^4.10.0",
39-
"@biomejs/biome": "1.8.3",
38+
"@biomejs/biome": "1.9.1",
4039
"@changesets/changelog-github": "^0.5.0",
4140
"@changesets/cli": "^2.27.1",
4241
"@commitlint/cli": "^19.5.0",
@@ -71,7 +70,6 @@
7170
"browserslist": "^4.23.0",
7271
"chromatic": "^11.10.2",
7372
"deepmerge": "^4.3.1",
74-
"fast-glob": "^3.3.0",
7573
"husky": "^9.1.1",
7674
"jsdom": "^25.0.0",
7775
"lightningcss": "^1.27.0",
@@ -84,9 +82,6 @@
8482
"rollup-plugin-pure": "^0.2.1",
8583
"storybook": "^8.3.0",
8684
"storybook-addon-pseudo-states": "^4.0.0",
87-
"stylelint": "^16.9.0",
88-
"stylelint-config-standard": "^36.0.0",
89-
"stylelint-value-no-unknown-custom-properties": "^6.0.1",
9085
"typescript": "^5.6.2",
9186
"typescript-plugin-css-modules": "^5.1.0",
9287
"vite": "^5.4.0",

packages/alert/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/alert/src/styles/Alert.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
line-height: 1.2857;
4848
}
4949

50-
/* stylelint-disable-next-line no-descending-specificity */
5150
.Alert.Alert--inline {
5251
background-color: unset;
5352
padding: 0;

packages/avatar/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/banner/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/button/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/button/src/styles/Button.module.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* stylelint-disable no-descending-specificity */
21
:root,
32
[data-theme='default'] {
43
--lp-component-button-color-bg-default: var(--lp-color-bg-interactive-secondary-base);
@@ -612,7 +611,6 @@
612611
height: 1.5rem;
613612
width: 1.5rem;
614613
}
615-
/* stylelint-enable no-descending-specificity */
616614

617615
/* ------- PRIMARY FLAIR ------- */
618616

packages/button/stories/Button.stories.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.Storygroup-wrapper > * {
2-
/* stylelint-disable-next-line declaration-no-important */
32
margin: auto 0 !important;
43
}
54

packages/card/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/chip/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/clipboard/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/collapsible/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/columns/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/components/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"scripts": {
3131
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3232
"clean": "rm -rf dist",
33-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3433
"test": "vitest run --coverage"
3534
},
3635
"dependencies": {

packages/components/src/styles/Modal.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
position: fixed;
135135
inset: 0;
136136
width: 100vw;
137-
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
138137
height: var(--visual-viewport-height);
139138
background: light-dark(#28282880, #282828b2);
140139
display: flex;

packages/components/src/styles/Popover.module.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@
4444
}
4545

4646
&[data-trigger='Select'] {
47-
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
4847
min-width: var(--trigger-width);
4948
}
5049

5150
&[data-trigger='ComboBox'] {
52-
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
5351
min-width: var(--trigger-width);
5452
}
5553

packages/counter/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/counter/src/styles/Counter.module.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* stylelint-disable number-max-precision */
21
.Counter {
32
display: inline-block;
43
font-size: 0.6875rem;
@@ -17,4 +16,3 @@
1716
color: var(--lp-color-text-ui-secondary);
1817
background-color: var(--lp-color-bg-ui-secondary);
1918
}
20-
/* stylelint-enable number-max-precision */

packages/drawer/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/filter/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/form/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/icons/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"scripts": {
3232
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json && cp src/img/sprite.svg dist",
3333
"clean": "rm -rf dist",
34-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3534
"test": "vitest run --coverage"
3635
},
3736
"dependencies": {

packages/inline/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/markdown/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/menu/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/modal/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/navigation/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/pagination/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

packages/popover/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"scripts": {
3030
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json",
3131
"clean": "rm -rf dist",
32-
"lint": "stylelint '**/*.css' --ignore-path ../../.stylelintignore",
3332
"test": "vitest run --coverage"
3433
},
3534
"dependencies": {

0 commit comments

Comments
 (0)