Skip to content

Commit

Permalink
refactor: replace ESLint and Prettier with Biome (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
fityannugroho authored Oct 18, 2024
1 parent bcf3eb5 commit d675d39
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 944 deletions.
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

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

This file was deleted.

66 changes: 66 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"ignore": ["node_modules", "dist", "coverage", "pnpm-lock.yaml"]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSpacing": true,
"ignore": ["**/pnpm-lock.yaml"]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedPrivateClassMembers": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "error"
},
"style": {
"noNamespace": "error",
"useBlockStatements": "off"
},
"suspicious": {
"noEmptyBlockStatements": "error"
}
},
"ignore": [
"node_modules/**/*",
"dist/**/*",
"coverage/*/*",
"pnpm-lock.yaml"
]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
},
"globals": []
}
}
17 changes: 0 additions & 17 deletions eslint.config.js

This file was deleted.

20 changes: 5 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
"bin": {
"imgdl": "dist/cli.js"
},
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"lint": "eslint . && prettier --check .",
"lint:fix": "eslint . --fix && prettier --write .",
"lint": "biome check .",
"lint:fix": "biome check --write .",
"test": "vitest run",
"test:watch": "vitest",
"test:cov": "vitest run --coverage",
Expand All @@ -23,11 +21,7 @@
"type": "git",
"url": "git+https://github.com/fityannugroho/img-dl.git"
},
"keywords": [
"image-downloader",
"nodejs",
"cli"
],
"keywords": ["image-downloader", "nodejs", "cli"],
"author": "Fityan <[email protected]> (https://github.com/fityannugroho)",
"license": "MIT",
"bugs": {
Expand All @@ -39,19 +33,15 @@
"node": ">=20.9"
},
"devDependencies": {
"@eslint/js": "^9.12.0",
"@biomejs/biome": "1.9.4",
"@types/cli-progress": "^3.11.6",
"@types/node": "^22.7.6",
"@vitest/coverage-v8": "^2.1.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"execa": "^9.4.1",
"file-type": "^19.6.0",
"msw": "^2.4.11",
"prettier": "^3.3.3",
"tsup": "^8.3.0",
"typescript": "^5.6.3",
"typescript-eslint": "^7.8.0",
"vitest": "^2.1.3"
},
"dependencies": {
Expand Down
Loading

0 comments on commit d675d39

Please sign in to comment.