Skip to content

Commit 9a3ca44

Browse files
authored
Merge pull request #137 from yamadashy/devin/1746883145-migrate-to-biome
chore: migrate from ESLint/Prettier to Biome
2 parents c4d3661 + f3db1bb commit 9a3ca44

File tree

4 files changed

+60
-67
lines changed

4 files changed

+60
-67
lines changed

.secretlintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rules": [
3+
{
4+
"id": "@secretlint/secretlint-rule-preset-recommend"
5+
}
6+
]
7+
}

biome.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"files": {
4+
"include": [
5+
"app/scripts/**/*.js",
6+
"app/scripts/**/*.ts"
7+
],
8+
"ignore": [
9+
"node_modules",
10+
"dist"
11+
]
12+
},
13+
"organizeImports": {
14+
"enabled": true
15+
},
16+
"linter": {
17+
"enabled": true,
18+
"rules": {
19+
"recommended": true
20+
}
21+
},
22+
"formatter": {
23+
"enabled": true,
24+
"formatWithErrors": false,
25+
"indentStyle": "space",
26+
"indentWidth": 2,
27+
"lineWidth": 120
28+
},
29+
"javascript": {
30+
"formatter": {
31+
"quoteStyle": "single",
32+
"trailingCommas": "all",
33+
"semicolons": "always"
34+
}
35+
},
36+
"json": {
37+
"parser": {
38+
"allowComments": true,
39+
"allowTrailingCommas": true
40+
},
41+
"formatter": {
42+
"enabled": false
43+
}
44+
}
45+
}

eslint.config.mjs

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

package.json

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"scripts": {
88
"dev": "webextension-toolbox dev",
99
"build": "webextension-toolbox build",
10-
"lint": "eslint ./app --max-warnings 0 --cache --fix && tsc --noEmit",
11-
"supported-browsers": "npx browserslist",
10+
"build-all": "npm run build chrome && npm run build firefox && npm run build edge",
11+
"lint": "npm run lint-biome && npm run lint-secretlint",
12+
"lint-biome": "biome check --write",
13+
"lint-secretlint": "secretlint \"**/*\" --secretlintignore .gitignore",
1214
"archive": "git archive HEAD -o storage/source.zip"
1315
},
1416
"repository": {
@@ -35,29 +37,18 @@
3537
"@babel/plugin-proposal-class-properties": "^7.18.6",
3638
"@babel/preset-env": "^7.27.1",
3739
"@babel/preset-typescript": "^7.27.1",
38-
"@eslint/js": "^9.26.0",
40+
"@biomejs/biome": "1.8.3",
41+
"secretlint": "^9.3.2",
42+
"@secretlint/secretlint-rule-preset-recommend": "^9.3.2",
3943
"@types/babel__core": "^7.20.5",
4044
"@types/babel__preset-env": "^7.10.0",
4145
"@types/chrome": "^0.0.319",
4246
"@types/core-js": "2.5.8",
43-
"@types/eslint": "^9.6.1",
44-
"@types/eslint-config-prettier": "^6.11.3",
45-
"@types/eslint-plugin-prettier": "^3.1.3",
46-
"@types/eslint__js": "~8.42.3",
4747
"@types/jquery": "^3.5.32",
48-
"@types/prettier": "^3.0.0",
4948
"@types/webpack-bundle-analyzer": "^4.7.0",
50-
"@typescript-eslint/eslint-plugin": "^8.31.1",
51-
"@typescript-eslint/parser": "^8.31.1",
5249
"@webextension-toolbox/webextension-toolbox": "^7.1.1",
5350
"babel-loader": "^10.0.0",
54-
"eslint": "^9.26.0",
55-
"eslint-config-prettier": "^10.1.2",
56-
"eslint-formatter-friendly": "^7.0.0",
57-
"eslint-plugin-import": "^2.31.0",
58-
"eslint-plugin-prettier": "^5.3.1",
5951
"globals": "^16.0.0",
60-
"prettier": "^3.5.3",
6152
"renovate": "^40.3.4",
6253
"typescript": "^5.8.3",
6354
"webpack-bundle-analyzer": "^4.10.2"
@@ -84,15 +75,7 @@
8475
"last 40 Opera version",
8576
"last 40 Edge version"
8677
],
87-
"prettier": {
88-
"tabWidth": 2,
89-
"semi": true,
90-
"singleQuote": true,
91-
"printWidth": 120,
92-
"bracketSpacing": true,
93-
"trailingComma": "all",
94-
"quoteProps": "consistent"
95-
},
78+
9679
"engines": {
9780
"node": ">=23.6.0"
9881
}

0 commit comments

Comments
 (0)