Skip to content

Commit d3b2018

Browse files
authored
Merge pull request #2082 from trillium/trilliumsmith/biome
Replace ESLint and Prettier with Biome
2 parents 0e35dfb + 1dec53b commit d3b2018

11 files changed

Lines changed: 408 additions & 1530 deletions

.lintstagedrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"*.{js,jsx,ts,tsx,json,css,scss,md}": ["prettier --write", "eslint --fix"]
2+
"*.{js,jsx,ts,tsx,json,css,md}": [
3+
"sh -c 'biome check --write --no-errors-on-unmatched \"$@\" || true' --"
4+
]
35
}

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

backend/.prettierrc

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

backend/package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"description": "VRMS Backend",
55
"main": "server.js",
66
"scripts": {
7-
"lint": "eslint .",
8-
"format": "prettier --check .",
7+
"lint": "biome lint .",
8+
"format": "biome format --check .",
99
"test": "jest",
1010
"test:watch": "jest --watch",
1111
"start": "node server.js",
@@ -18,23 +18,11 @@
1818
"author": "sarL3y",
1919
"license": "ISC",
2020
"devDependencies": {
21-
"@babel/core": "^7.15.0",
22-
"@babel/eslint-parser": "^7.15.0",
23-
"@babel/eslint-plugin": "^7.14.5",
2421
"concurrently": "^5.1.0",
2522
"debug": "^4.3.1",
26-
"eslint": "^7.9.0",
27-
"eslint-config-airbnb": "^18.2.0",
28-
"eslint-config-airbnb-base": "^14.2.0",
29-
"eslint-config-prettier": "^6.11.0",
30-
"eslint-plugin-import": "^2.22.0",
31-
"eslint-plugin-jsx-a11y": "^6.3.1",
32-
"eslint-plugin-react": "^7.20.6",
3323
"jest": "^26.4.0",
3424
"mockdate": "^3.0.5",
3525
"nodemon": "^2.0.2",
36-
"prettier": "^2.1.1",
37-
"pretty-quick": "^3.0.2",
3826
"supertest": "^4.0.2",
3927
"why-is-node-running": "^2.2.0"
4028
},

biome.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"ignore": ["node_modules", "dist", "build", "coverage"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"lineWidth": 100
17+
},
18+
"organizeImports": {
19+
"enabled": true
20+
},
21+
"linter": {
22+
"enabled": true,
23+
"rules": {
24+
"recommended": true,
25+
"correctness": {
26+
"noUnusedVariables": "warn",
27+
"useExhaustiveDependencies": "warn"
28+
},
29+
"suspicious": {
30+
"noExplicitAny": "off"
31+
},
32+
"style": {
33+
"noUnusedTemplateLiteral": "off"
34+
}
35+
}
36+
},
37+
"javascript": {
38+
"formatter": {
39+
"quoteStyle": "single",
40+
"trailingCommas": "all",
41+
"semicolons": "always"
42+
}
43+
}
44+
}

client/.prettierrc.json

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

client/package.json

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,17 @@
4444
"preview": "vite preview",
4545
"heroku-postbuild": "npm run build"
4646
},
47-
"eslintConfig": {
48-
"extends": "react-app"
49-
},
5047
"browserslist": {
51-
"production": [
52-
">0.2%",
53-
"not dead",
54-
"not op_mini all"
55-
],
56-
"development": [
57-
"last 1 chrome version",
58-
"last 1 firefox version",
59-
"last 1 safari version"
60-
]
48+
"production": [">0.2%", "not dead", "not op_mini all"],
49+
"development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"]
6150
},
6251
"author": "sarL3y",
6352
"license": "ISC",
6453
"devDependencies": {
6554
"@testing-library/dom": "^10.3.2",
6655
"@testing-library/react": "^16.0.0",
6756
"autoprefixer": "^10.4.21",
68-
"eslint-config-airbnb": "^18.2.0",
69-
"eslint-config-airbnb-base": "^14.2.0",
70-
"eslint-config-prettier": "^6.11.0",
71-
"eslint-plugin-import": "^2.22.0",
72-
"eslint-plugin-jsx-a11y": "^6.3.1",
73-
"eslint-plugin-prettier": "^3.1.4",
74-
"eslint-plugin-react": "^7.20.6",
75-
"eslint-plugin-react-hooks": "^4.1.2",
7657
"jsdom": "^24.1.0",
77-
"prettier": "^2.1.1",
7858
"sass": "^1.49.7",
7959
"vitest": "^1.6.1"
8060
},

eslint.config.mjs

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

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
"scripts": {
66
"start": "concurrently \"cd backend && npm run start\" \"cd client && npm run start\"",
77
"mvp": "concurrently \"cd backend && npm run start\" \"cd client-mvp-04 && npm run start\"",
8-
"format": "prettier --write \"client/**/*.{js,jsx,css}\" \"backend/**/*.{js,jsx,css}\"",
9-
"lint": "eslint",
8+
"format": "lint-staged",
9+
"lint": "lint-staged",
10+
"check": "lint-staged",
11+
"check:all": "biome check --write .",
1012
"dev:api": "cd backend && npm run dev",
1113
"dev:client": "cd client && npm run start",
1214
"dev": "dotenv -e backend/.env -e client/.env concurrently \"npm run dev:api\" \"npm run dev:client\"",
@@ -28,14 +30,11 @@
2830
"styled-components": "^6.1.13"
2931
},
3032
"devDependencies": {
33+
"@biomejs/biome": "^1.9.4",
3134
"autoprefixer": "^10.4.21",
3235
"cypress": "^5.0.0",
33-
"eslint": "9.9.1",
34-
"eslint-config-prettier": "9.1.0",
35-
"eslint-plugin-react": "^7.37.3",
36-
"globals": "15.9.0",
3736
"husky": "^9.1.7",
38-
"prettier": "3.4.2",
37+
"lint-staged": "^15.2.10",
3938
"start-server-and-test": "^1.11.3"
4039
}
4140
}

0 commit comments

Comments
 (0)