eslint-config-biome
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -7,2 +7,3 @@ /** | ||
module.exports = { | ||
extends: ["./eslint-config-prettier.js"], | ||
rules: { | ||
@@ -138,9 +139,9 @@ "constructor-super": "off", | ||
"simple-import-sort/imports": "off", | ||
"@typescript-eslint/default-param-last": "off", | ||
"@typescript-eslint/dot-notation": "off", | ||
"@typescript-eslint/no-dupe-class-members": "off", | ||
"@typescript-eslint/no-loss-of-precision": "off", | ||
"@typescript-eslint/no-dupe-class-members": "off", | ||
"@typescript-eslint/default-param-last": "off", | ||
"@typescript-eslint/no-redeclare": "off", | ||
"@typescript-eslint/no-useless-constructor": "off", | ||
"@typescript-eslint/no-redeclare": "off", | ||
} | ||
} |
{ | ||
"name": "eslint-config-biome", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Disables ESLint rules that have a recommended and equivalent Biome rule", | ||
"main": "index.js", | ||
"scripts": { | ||
"format:check": "eslint . && biome check .", | ||
"format": "eslint --fix biome check --apply-unsafe .", | ||
"format:check": "biome check . && eslint .", | ||
"format": "biome check --apply-unsafe . && eslint --fix", | ||
"tsw": "tsc --watch --noEmit", | ||
@@ -10,0 +10,0 @@ "typecheck": "tsc --noEmit", |
@@ -10,3 +10,3 @@ <div align="center"> | ||
Disables ESLint rules that have an [**equivalent and recommended**](https://github.com/biomejs/biome/discussions/3) [Biome](https://biomejs.dev/), allowing the<br/> | ||
Disables ESLint rules that have an [**equivalent and recommended**](https://github.com/biomejs/biome/discussions/3) [Biome](https://biomejs.dev/) rule, allowing the<br/> | ||
simultaneous use of Biome and ESLint. | ||
@@ -27,14 +27,17 @@ | ||
- `.eslintrc.*`: Add `"biome"` as the last item in the `extends` field. | ||
- `.eslintrc.*`: Add the following as the last item in the `"overrides"` array. Create it if necessary. | ||
```json | ||
{ | ||
"extends": [ | ||
"other-configs", | ||
"biome" | ||
] | ||
"overrides": [ | ||
// other overrides, | ||
{ | ||
files: ["*.ts", "*.js", "*.tsx", "*.jsx"], | ||
extends: ["biome"], | ||
} | ||
], | ||
} | ||
``` | ||
- `eslint.config.js`: Import `eslint-config-biome` and have it as the last item in the configuration array | ||
- Or `eslint.config.js`: Import `eslint-config-biome` and have it as the last item in the configuration array | ||
@@ -45,3 +48,3 @@ ```js | ||
export default [ | ||
otherConfigs, | ||
// other configs, | ||
eslintConfigBiome, | ||
@@ -53,29 +56,27 @@ ]; | ||
- In your .eslintrc, you can instead have this in `overrides`: | ||
- In VSCode, to apply Biome and ESLint on save, you should have these in your project's `.vscode/settings.json`: | ||
```json | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports.biome": "explicit", | ||
"quickfix.biome": "explicit" | ||
}, | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} | ||
``` | ||
"overrides": [{ | ||
files: ["*.ts", "*.js", "*.tsx", "*.jsx"], | ||
extends: ["biome"], | ||
}], | ||
``` | ||
- Being it the last item in the array, this makes other existing overrides to have this patch applied. This also overrides any rules that may lie in the root of your .eslintrc under `rules`. | ||
- For package.json scripts and CI, I recommend running `biome` before `eslint` for faster failure detection. | ||
- You should use it together with [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) so formatting rules are also disabled as Biome has almost 100% compatibility with prettier. It may eventually be integrated into this package, so you won't need to also install it. | ||
```json | ||
"scripts": { | ||
"format:check": "biome check . && eslint .", | ||
"format": "biome check --apply-unsafe . && eslint --fix", | ||
} | ||
``` | ||
- In VSCode, to apply Biome and ESLint on save, you should have these in your settings.json: | ||
- Since v1.4.0, this package includes [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier), so formatting rules are also disabled as Biome has almost full compatibility with prettier. [Attribution](ATTRIBUTION.md). Its installation is no longer required and it can be removed from your project and your eslint config file. | ||
```json | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports.biome": "explicit", | ||
"quickfix.biome": "explicit" | ||
}, | ||
"editor.defaultFormatter": "biomejs.biome" | ||
``` | ||
- Soon there will be a npx tool to disable ESLint rules based on your biome config file, so non-recommended biome rules will also be considered. | ||
This package had its origin [in this discussion](https://github.com/biomejs/biome/discussions/3#discussioncomment-7876363). Thanks [DaniGuardiola | ||
This package had its origin [in this discussion](https://github.com/biomejs/biome/discussions/3#discussioncomment-7876363). Also, thanks [DaniGuardiola | ||
](https://github.com/DaniGuardiola) for [your initial code](https://github.com/biomejs/biome/discussions/3#discussioncomment-7910787)! | ||
@@ -82,0 +83,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10207
145
82