Skip to content

Commit b641e16

Browse files
authored
chore: ditch eslint (#219)
upgrading to `eslint@^9` is a pain, lets make the switch to `biome` for linting instead.
1 parent 9177ae0 commit b641e16

File tree

75 files changed

+361
-2238
lines changed

Some content is hidden

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

75 files changed

+361
-2238
lines changed

.eslintignore

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

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
- run: yarn ci-test
4848

4949
- run: yarn ci-lint
50-
- run: yarn ci-format
5150

5251
- run: yarn integration:generate
5352
- run: yarn integration:validate

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ node_modules
33
.idea
44
.nyc_output
55
coverage
6-
.eslintcache
76
.env
87
.DS_Store
98

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ yarn lint
8181
yarn format
8282
```
8383

84-
We use `biome` for formatting, and `eslint` for linting, largely sticking to the recommended rules.
85-
The config can be seen here [./.eslintrc.js](./.eslintrc.js)
84+
We use `biome` for formatting, and linting, largely sticking to the recommended rules.
85+
The config can be seen here [./biome.json](./biome.json)
8686

8787
## Testing
8888

biome.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,18 @@
3333
}
3434
},
3535
"linter": {
36-
"enabled": false,
36+
"enabled": true,
3737
"rules": {
3838
"recommended": true
39-
}
39+
},
40+
"ignore": [
41+
"packages/openapi-code-generator/src/core/schemas/openapi-3.0-specification-validator.js",
42+
"packages/openapi-code-generator/src/core/schemas/openapi-3.1-specification-validator.js",
43+
"integration-tests/**/*",
44+
"integration-tests-definitions/**/*",
45+
"schemas/*.json",
46+
"packages/*/package.json",
47+
"package.json"
48+
]
4049
}
4150
}

jest.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
2-
const inspector = require("inspector")
1+
const inspector = require("node:inspector")
32

43
/**
54
* @type { import('@jest/types').Config.GlobalConfig }

jest/reporter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
21
const {DefaultReporter} = require("@jest/reporters")
32

43
class Reporter extends DefaultReporter {
@@ -7,6 +6,7 @@ class Reporter extends DefaultReporter {
76
if (result.numFailingTests === 0 && !result.testExecError) {
87
result.console = []
98
} else {
9+
// biome-ignore lint/style/noArguments: <explanation>
1010
super.printTestFileHeader(...arguments)
1111
}
1212
}

package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,26 @@
2020
"clean": "lerna run clean --stream",
2121
"docs:generate": "./scripts/generate-docs.sh",
2222
"refresh": "./scripts/refresh-data.sh",
23-
"lint": "eslint . --cache --report-unused-disable-directives --fix",
23+
"lint": "biome lint --apply .",
2424
"format": "biome check --apply .",
2525
"build": "node ./scripts/generate-ajv-validator.js && lerna run build --stream --scope '@nahkies/*'",
2626
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
2727
"integration:generate": "node ./scripts/generate.mjs",
2828
"integration:validate": "lerna run validate --stream",
2929
"ci-build": "yarn build",
3030
"ci-test": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
31-
"ci-lint": "eslint . --cache --report-unused-disable-directives",
32-
"ci-format": "biome ci .",
31+
"ci-lint": "biome ci .",
3332
"ci-pipeline": "./scripts/ci-pipeline.sh",
3433
"publish:alpha": "./scripts/publish.alpha.sh",
3534
"publish:release": "./scripts/publish.release.sh"
3635
},
3736
"devDependencies": {
38-
"@biomejs/biome": "^1.7.3",
37+
"@biomejs/biome": "1.7.3",
3938
"@swc/core": "^1.5.7",
4039
"@swc/jest": "^0.2.36",
4140
"@tsconfig/node20": "^20.1.4",
4241
"@tsconfig/strictest": "^2.0.5",
4342
"@types/node": "^20.12.12",
44-
"@typescript-eslint/eslint-plugin": "^7.10.0",
45-
"@typescript-eslint/parser": "^7.10.0",
46-
"eslint": "^8.57.0",
47-
"eslint-plugin-import": "^2.29.1",
48-
"eslint-plugin-jest": "^28.5.0",
4943
"husky": "^9.0.11",
5044
"jest": "^30.0.0-alpha.3",
5145
"lerna": "^8.1.3",
@@ -61,7 +55,7 @@
6155
],
6256
"lint-staged": {
6357
"*.{ts,js,tsx,jsx}": [
64-
"eslint --cache --report-unused-disable-directives --fix",
58+
"yarn biome lint --apply",
6559
"yarn biome check --apply --no-errors-on-unmatched"
6660
],
6761
"*.md": [

packages/documentation/.eslintrc.json

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

0 commit comments

Comments
 (0)