Skip to content

Commit

Permalink
feat: migrate eslint and prettier to biome
Browse files Browse the repository at this point in the history
- use pnpm instead of npm
- update .vscode
  - extension recommendations
  - settings for js ts json
- replaced .eslintrc.json and .prettierrc.json with biome.jsonc
- update package.json
  - removed eslint and prettier
  - scripts for husky and lint:code
  - lint-staged with biome
  • Loading branch information
ricardo-valero authored and ivan-demchenko committed Jul 9, 2024
1 parent 3c3a4e8 commit db24568
Show file tree
Hide file tree
Showing 8 changed files with 5,232 additions and 13,535 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

5 changes: 2 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"github.vscode-github-actions",
"esbenp.prettier-vscode",
"editorconfig.editorconfig",
"vivaxy.vscode-conventional-commits",
"jnoortheen.nix-ide",
"mkhl.direnv"
"mkhl.direnv",
"biomejs.biome"
]
}
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
Expand Down
49 changes: 49 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"style": {
"useBlockStatements": "warn"
},
"suspicious": {
"noDoubleEquals": "warn"
}
},
"ignore": ["**/out", "**/dist", "**/*.d.ts"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
},
"json": {
"parser": {
"allowComments": true
},
"formatter": {
"trailingCommas": "none"
}
}
}
Loading

0 comments on commit db24568

Please sign in to comment.