Skip to content

Commit 0b22a87

Browse files
committed
1.9.3
1 parent 8ddc7ea commit 0b22a87

File tree

10 files changed

+210
-182
lines changed

10 files changed

+210
-182
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.9.3
4+
5+
- Added a few minor ESLint rules to be disabled.
6+
- Now using Biome's JSON Metadata to generate this package's rules to be disabled. Many thanks, [ematipico](https://github.com/ematipico)!
7+
38
## 1.8.3
49

510
- Fix issue with ESLint's Flat Config ([#7](https://github.com/SrBrahma/eslint-config-biome/issues/7)).

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ npm install -D eslint-config-biome # or your preferred package manager ;)
7575
7676
- 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 is equivalent to Prettier. [Attribution](ATTRIBUTION.md).
7777
78-
- This package had its origin [in this discussion](https://github.com/biomejs/biome/discussions/3#discussioncomment-7876363). Thanks [DaniGuardiola
79-
](https://github.com/DaniGuardiola) for [your *related initial crawler code*](https://github.com/biomejs/biome/discussions/3#discussioncomment-7910787)!
78+
- This package had its origin [in this discussion](https://github.com/biomejs/biome/discussions/3#discussioncomment-7876363).
8079
8180
8281
## 📰 [Changelog](CHANGELOG.md)

index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
"no-delete-var": "off",
2727
"no-dupe-args": "off",
2828
"no-dupe-class-members": "off",
29+
"no-dupe-else-if": "off",
2930
"no-dupe-keys": "off",
3031
"no-duplicate-case": "off",
3132
"no-else-return": "off",
@@ -60,7 +61,7 @@ module.exports = {
6061
"no-sequences": "off",
6162
"no-setter-return": "off",
6263
"no-shadow-restricted-names": "off",
63-
"no-sparse-array": "off",
64+
"no-sparse-arrays": "off",
6465
"no-this-before-super": "off",
6566
"no-unneeded-ternary": "off",
6667
"no-unreachable": "off",
@@ -72,6 +73,7 @@ module.exports = {
7273
"no-useless-catch": "off",
7374
"no-useless-computed-key": "off",
7475
"no-useless-constructor": "off",
76+
"no-useless-escape": "off",
7577
"no-useless-rename": "off",
7678
"no-var": "off",
7779
"no-with": "off",
@@ -86,12 +88,13 @@ module.exports = {
8688
"require-yield": "off",
8789
"use-isnan": "off",
8890
"valid-typeof": "off",
89-
"@mysticatea/eslint-plugin/no-this-in-static": "off",
91+
"@eslint-community/eslint-plugin-mysticatea/no-this-in-static": "off",
9092
"@typescript-eslint/ban-types": "off",
9193
"@typescript-eslint/consistent-type-exports": "off",
9294
"@typescript-eslint/consistent-type-imports": "off",
9395
"@typescript-eslint/default-param-last": "off",
9496
"@typescript-eslint/dot-notation": "off",
97+
"@typescript-eslint/explicit-member-accessibility": "off",
9598
"@typescript-eslint/no-dupe-class-members": "off",
9699
"@typescript-eslint/no-empty-interface": "off",
97100
"@typescript-eslint/no-explicit-any": "off",
@@ -118,6 +121,7 @@ module.exports = {
118121
"@typescript-eslint/prefer-literal-enum-member": "off",
119122
"@typescript-eslint/prefer-namespace-keyword": "off",
120123
"@typescript-eslint/prefer-optional-chain": "off",
124+
"eslint-plugin-mysticatea/no-this-in-static": "off",
121125
"jest/max-nested-describe": "off",
122126
"jest/no-duplicate-hooks": "off",
123127
"jest/no-export": "off",
@@ -148,7 +152,9 @@ module.exports = {
148152
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
149153
"jsx-a11y/no-noninteractive-tabindex": "off",
150154
"jsx-a11y/no-redundant-roles": "off",
155+
"jsx-a11y/prefer-tag-over-role": "off",
151156
"jsx-a11y/role-has-required-aria-props": "off",
157+
"jsx-a11y/role-supports-aria-props": "off",
152158
"jsx-a11y/scope": "off",
153159
"jsx-a11y/tabindex-no-positive": "off",
154160
"react/button-has-type": "off",
@@ -164,6 +170,7 @@ module.exports = {
164170
"react/void-dom-elements-no-children": "off",
165171
"react-hooks/exhaustive-deps": "off",
166172
"simple-import-sort/imports": "off",
173+
"sonarjs/prefer-while": "off",
167174
"stylistic/jsx-self-closing-comp": "off",
168175
"unicorn/new-for-builtins": "off",
169176
"unicorn/no-array-for-each": "off",

package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "eslint-config-biome",
3-
"version": "1.8.4",
3+
"version": "1.9.3",
44
"description": "Disables ESLint rules that have a recommended and equivalent Biome rule",
55
"main": "index.js",
66
"scripts": {
7+
"dev": "bun --watch run scripts/index.ts",
78
"format": "biome check --apply-unsafe . && eslint --fix . package.json",
89
"format:check": "biome check . && eslint . package.json",
910
"pre-commit": "bun format && bun typecheck && bun test && git add -A",
1011
"prepare": "husky",
1112
"start": "bun i && bun run scripts/index.ts",
1213
"test:watch": "bun test --watch",
1314
"tsw": "tsc --watch --noEmit",
14-
"typecheck": "tsc --noEmit",
15-
"watch": "bun --watch run scripts/index.ts"
15+
"typecheck": "tsc --noEmit"
1616
},
1717
"files": [
1818
"index.js",
@@ -33,13 +33,11 @@
3333
],
3434
"repository": "SrBrahma/eslint-config-biome",
3535
"devDependencies": {
36-
"@biomejs/biome": "^1.8.3",
36+
"@biomejs/biome": "^1.9.3",
3737
"@sindresorhus/tsconfig": "^5.1.1",
38-
"@types/bun": "^1.1.8",
39-
"@types/jsdom": "^21.1.7",
38+
"@types/bun": "^1.1.11",
4039
"eslint-config-gev": "4.5.1",
41-
"husky": "^9.1.5",
42-
"jsdom": "^24.1.3",
43-
"typescript": "^5.5.4"
40+
"husky": "^9.1.6",
41+
"typescript": "^5.6.3"
4442
}
4543
}

scripts/consts.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export const filenames = {
66
}
77
export const rootPath = path.resolve(__dirname, "..")
88

9+
/**
10+
* Some ESLint rules are already taken care by Biome but it's not specified from the used sources of information that they do.
11+
* So we manually disable them here.
12+
*/
913
export const extraRulesToDisable = [
1014
"simple-import-sort/imports",
1115
// Not being added for some reason, TODO check it and fix it
@@ -14,6 +18,12 @@ export const extraRulesToDisable = [
1418
"no-delete-var",
1519
"no-return-assign",
1620
"no-useless-computed-key",
17-
"unicorn/no-static-only-class",
1821
"unicorn/no-typeof-undefined",
22+
"@typescript-eslint/no-useless-template-literals",
23+
// There are two packages for mysticatea. One is already handled by the code, this handles the other package.
24+
"eslint-plugin-mysticatea/no-this-in-static",
25+
// https://biomejs.dev/linter/rules/use-import-type/
26+
"@typescript-eslint/no-import-type-side-effects",
27+
// https://biomejs.dev/linter/rules/no-useless-type-constraint/
28+
"@typescript-eslint/no-unnecessary-type-arguments",
1929
]

scripts/fetchFromDocs.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

scripts/fetchFromGithub.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.

scripts/index.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
/** Attribution for eslint-config-prettier is available at the ATTRIBUTION.md and in the eslint-config-prettier.js. */
22

33
import { extraRulesToDisable, filenames } from "./consts"
4-
import { getEquivalentRulesFromDocs } from "./fetchFromDocs"
5-
import { getEslintEquivalentRulesFromGithub } from "./fetchFromGithub.js"
4+
import { getRulesFromJsonMetadata } from "./metadata.js"
65
import { createPrettierFile } from "./prettier"
76
import { getJsBaseRules, getTsExtensionsForRules } from "./tsExtensions"
87
import { sortRules, writeMainFile } from "./utils"
98

109
const main = async () => {
11-
const rules = [
12-
...(await getEquivalentRulesFromDocs()),
13-
...extraRulesToDisable,
14-
...(await getEslintEquivalentRulesFromGithub()),
15-
]
10+
const rules = [...(await getRulesFromJsonMetadata()), ...extraRulesToDisable]
1611

1712
const rulesWithTsExtends = [
1813
...rules,
@@ -21,8 +16,9 @@ const main = async () => {
2116
]
2217

2318
const rulesNoDuplicates = [...new Set(rulesWithTsExtends)]
19+
const sortedRules = sortRules(rulesNoDuplicates)
2420

25-
writeMainFile(sortRules(rulesNoDuplicates))
21+
writeMainFile(sortedRules)
2622
await createPrettierFile()
2723

2824
console.log(`Generated ${filenames.index} & ${filenames.prettier}!`)

0 commit comments

Comments
 (0)