Skip to content

Commit

Permalink
Switch from Prettier and ESLint to BiomeJS
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoffrey committed Jul 27, 2024
1 parent 0fe23dd commit 39142d9
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 106 deletions.
88 changes: 0 additions & 88 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install && npm test && npm run lint
- run: npm install && npm test && npm run check
env:
CI: true
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

46 changes: 46 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"include": ["src/**/*.ts", "test/**/*.ts"]
},
"organizeImports": {
"enabled": false
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noUselessTypeConstraint": "off",
"noBannedTypes": "off",
"useArrowFunction": "off"
},
"suspicious": {
"noAssignInExpressions": "off",
"noExplicitAny": "off",
"noGlobalIsNan": "off",
"noImplicitAnyLet": "off"
},
"style": {
"noParameterAssign": "off",
"useNumberNamespace": "off",
"noNonNullAssertion": "off",
"noUselessElse": "off",
"useImportType": "off",
"useConst": "off",
"useNodejsImportProtocol": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "es5"
}
}
}
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,28 @@
"node": ">=14.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/expect": "^24.3.0",
"@types/lodash": "^4.14.144",
"@types/node": "^18.7.14",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"lodash": "^4.17.15",
"np": "^10.0.0",
"prettier": "^3.2.5",
"rollup": "^4.12.1",
"typescript": "^4.8.3",
"vitest": "^1.6.0"
},
"scripts": {
"build": "rm -rf ./{dist} && rollup --config ./rollup.config.js",
"clean": "rm -rf ./{dist,node_modules}",
"fix": "npm run fix:eslint && npm run fix:prettier",
"fix:eslint": "npm run lint:eslint --fix",
"fix:prettier": "prettier '**/*.{js,json,ts}' --write",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint '{src,test}/*.{js,ts}'",
"lint:prettier": "prettier '**/*.{js,json,ts}' --check",
"fix": "npx @biomejs/biome check --write .",
"fix:lint": "npx @biomejs/biome lint --write .",
"fix:format": "npx @biomejs/biome format --write .",
"check": "npx @biomejs/biome check .",
"check:lint": "npx @biomejs/biome lint .",
"check:format": "npx @biomejs/biome format .",
"release": "npm run build && npm run lint && np",
"test": "npm run build && npm run test:types && npm run test:vitest",
"test:types": "tsc --noEmit && tsc --project ./test/tsconfig.json --noEmit",
Expand Down

0 comments on commit 39142d9

Please sign in to comment.