build: replace eslint with biome and upgrade typescript to 7
typescript-eslint does not support TypeScript 7 yet, so retire ESLint and lint with Biome, which the site repositories already use. - Enable the Biome linter with the recommended preset - Turn off noAssignInExpressions for the inline offset advances in the binary header parsers - Exclude dist instead of build from Biome - Run biome lint for the lint and lint:fix scripts - Remove eslint, @eslint/js and the typescript-eslint packages - Upgrade typescript to 7.0.2, tsdown to 0.23.0 and biome to 2.5.13
This commit is contained in:
+9
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"includes": ["**", "!**/build", "!**/node_modules"]
|
||||
"includes": ["**", "!**/dist", "!**/node_modules"]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
@@ -16,7 +16,13 @@
|
||||
"lineWidth": 120
|
||||
},
|
||||
"linter": {
|
||||
"enabled": false
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"preset": "recommended",
|
||||
"suspicious": {
|
||||
"noAssignInExpressions": "off"
|
||||
}
|
||||
}
|
||||
},
|
||||
"assist": { "actions": { "source": { "organizeImports": "on" } } },
|
||||
"javascript": {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import js from '@eslint/js';
|
||||
import tseslint from '@typescript-eslint/eslint-plugin';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
...tseslint.configs['flat/recommended'],
|
||||
{
|
||||
ignores: ['dist/**', 'node_modules/**'],
|
||||
},
|
||||
];
|
||||
Generated
+1003
-1613
File diff suppressed because it is too large
Load Diff
+5
-9
@@ -33,8 +33,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsdown",
|
||||
"lint": "eslint 'src/**/*.ts'",
|
||||
"lint:fix": "eslint --fix 'src/**/*.ts'",
|
||||
"lint": "biome lint .",
|
||||
"lint:fix": "biome lint --write .",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome format .",
|
||||
"check": "biome check .",
|
||||
@@ -44,12 +44,8 @@
|
||||
"release": "npm publish"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.4.16",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
||||
"@typescript-eslint/parser": "^8.60.0",
|
||||
"eslint": "^10.4.0",
|
||||
"tsdown": "^0.22.0",
|
||||
"typescript": "^6.0.3"
|
||||
"@biomejs/biome": "^2.5.13",
|
||||
"tsdown": "^0.23.0",
|
||||
"typescript": "^7.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user