Skip to content

Commit 0626234

Browse files
ematipicobluwy
andauthored
chore: use biome to sort imports - only test files (#10180)
* chore: use biome to sort imports * do the sorting * Update package.json Co-authored-by: Bjorn Lu <[email protected]> --------- Co-authored-by: Bjorn Lu <[email protected]>
1 parent 8e51bf9 commit 0626234

File tree

296 files changed

+584
-476
lines changed

Some content is hidden

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

296 files changed

+584
-476
lines changed

biome.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
3+
"files": {
4+
"include": ["*.test.js"],
5+
"ignore": ["vendor"]
6+
},
7+
"organizeImports": {
8+
"enabled": true
9+
},
10+
"linter": {
11+
"enabled": false
12+
},
13+
"formatter": {
14+
"enabled": false
15+
}
16+
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"build:ci": "turbo run build:ci --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
1414
"build:examples": "turbo run build --filter=\"@example/*\"",
1515
"dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"",
16-
"format": "pnpm run format:code",
17-
"format:ci": "pnpm run format:code",
16+
"format": "pnpm run format:code && pnpm run format:imports",
17+
"format:ci": "pnpm run format:code && pnpm run format:imports",
1818
"format:code": "prettier -w \"**/*\" --ignore-unknown --cache",
19-
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
19+
"format:imports": "biome check --apply .",
2020
"test": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
2121
"test:match": "cd packages/astro && pnpm run test:match",
2222
"test:unit": "cd packages/astro && pnpm run test:unit",
@@ -45,6 +45,7 @@
4545
},
4646
"packageManager": "[email protected]",
4747
"dependencies": {
48+
"@biomejs/biome": "^1.5.3",
4849
"astro-benchmark": "workspace:*"
4950
},
5051
"devDependencies": {

packages/astro-rss/test/pagesGlobToRssItems.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import assert from 'node:assert/strict';
22
import { describe, it } from 'node:test';
33

4-
import { phpFeedItem, web1FeedItem } from './test-utils.js';
54
import { pagesGlobToRssItems } from '../dist/index.js';
5+
import { phpFeedItem, web1FeedItem } from './test-utils.js';
66

77
describe('pagesGlobToRssItems', () => {
88
it('should generate on valid result', async () => {

packages/astro-rss/test/rss.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import rss, { getRssString } from '../dist/index.js';
66
import { rssSchema } from '../dist/schema.js';
77
import {
88
description,
9+
parseXmlString,
910
phpFeedItem,
1011
phpFeedItemWithContent,
1112
phpFeedItemWithCustomData,
@@ -14,7 +15,6 @@ import {
1415
web1FeedItem,
1516
web1FeedItemWithAllData,
1617
web1FeedItemWithContent,
17-
parseXmlString,
1818
} from './test-utils.js';
1919

2020
// note: I spent 30 minutes looking for a nice node-based snapshot tool

packages/astro/e2e/error-cyclic.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import { testFactory, getErrorOverlayContent } from './test-utils.js';
2+
import { getErrorOverlayContent, testFactory } from './test-utils.js';
33

44
const test = testFactory({
55
root: './fixtures/error-cyclic/',

packages/astro/e2e/error-sass.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import { testFactory, getErrorOverlayContent } from './test-utils.js';
2+
import { getErrorOverlayContent, testFactory } from './test-utils.js';
33

44
const test = testFactory({
55
root: './fixtures/error-sass/',

packages/astro/e2e/nested-recursive.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test as base, expect } from '@playwright/test';
1+
import { expect, test as base } from '@playwright/test';
22
import { loadFixture, waitForHydrate } from './test-utils.js';
33

44
const test = base.extend({

packages/astro/e2e/vue-component.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { prepareTestFactory } from './shared-component-tests.js';
21
import { expect } from '@playwright/test';
2+
import { prepareTestFactory } from './shared-component-tests.js';
33
const { test, createTests } = prepareTestFactory({ root: './fixtures/vue-component/' });
44

55
const config = {

packages/astro/test/0-css.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import assert from 'node:assert/strict';
8-
import { describe, before, it, after } from 'node:test';
8+
import { after, before, describe, it } from 'node:test';
99
import * as cheerio from 'cheerio';
1010
import { loadFixture } from './test-utils.js';
1111

packages/astro/test/alias-tsconfig-baseurl-only.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import assert from 'node:assert/strict';
2-
import { describe, before, it, after } from 'node:test';
2+
import { after, before, describe, it } from 'node:test';
33
import * as cheerio from 'cheerio';
44
import { loadFixture } from './test-utils.js';
55

0 commit comments

Comments
 (0)