Skip to content

Commit 9cb9462

Browse files
authored
Merge pull request #49 from jmespath-community/chore-eslint-and-prettier-to-biome
chore: migrate to biome for linting and formatting
2 parents 6fe72de + f9881e9 commit 9cb9462

29 files changed

+460
-1725
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ max_line_length = off
1616
trim_trailing_whitespace = true
1717

1818
[*.md]
19-
insert_final_newline = false
2019
trim_trailing_whitespace = false

.eslintignore

-9
This file was deleted.

.eslintrc.js

-33
This file was deleted.

.lintstagedrc.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"**/{src,test}/**/*.{ts,js}": [
3-
"prettier --write",
4-
"git add"
5-
]
2+
"**/{src,test}/**/*.{ts,js}": ["biome check --write", "git add"]
63
}

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.11.0

.prettierignore

-4
This file was deleted.

.prettierrc.js

-12
This file was deleted.

biome.json

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4+
"files": { "ignoreUnknown": false, "ignore": ["dist", "coverage", "test/compliance"] },
5+
"formatter": {
6+
"enabled": true,
7+
"useEditorconfig": true,
8+
"formatWithErrors": false,
9+
"indentStyle": "space",
10+
"indentWidth": 2,
11+
"lineEnding": "lf",
12+
"lineWidth": 120,
13+
"attributePosition": "auto",
14+
"bracketSpacing": true,
15+
"ignore": ["**/tests/fixtures/**/*", "**/dist", "**/coverage", "**/.vscode"]
16+
},
17+
"organizeImports": { "enabled": true },
18+
"linter": {
19+
"enabled": true,
20+
"rules": {
21+
"recommended": false,
22+
"complexity": { "noBannedTypes": "error" },
23+
"correctness": { "noUnusedVariables": "warn", "useArrayLiterals": "off" },
24+
"style": {
25+
"noInferrableTypes": "error",
26+
"noNamespace": "error",
27+
"noNonNullAssertion": "warn",
28+
"useAsConstAssertion": "error",
29+
"useBlockStatements": "error"
30+
},
31+
"suspicious": {
32+
"noEmptyBlockStatements": "off",
33+
"noExplicitAny": "warn",
34+
"noExtraNonNullAssertion": "error",
35+
"noMisleadingInstantiator": "error",
36+
"useNamespaceKeyword": "error"
37+
}
38+
},
39+
"ignore": [
40+
"**/node_modules",
41+
"**/dist",
42+
"**/jest.config.js",
43+
"**/fixtures",
44+
"**/shared-fixtures",
45+
"**/coverage",
46+
"**/__snapshots__",
47+
"src/**/*.js"
48+
]
49+
},
50+
"javascript": {
51+
"formatter": {
52+
"jsxQuoteStyle": "double",
53+
"quoteProperties": "asNeeded",
54+
"trailingCommas": "all",
55+
"semicolons": "always",
56+
"arrowParentheses": "asNeeded",
57+
"bracketSameLine": false,
58+
"quoteStyle": "single",
59+
"attributePosition": "auto",
60+
"bracketSpacing": true
61+
}
62+
},
63+
"overrides": [
64+
{
65+
"include": ["*.ts", "*.tsx"],
66+
"linter": {
67+
"rules": {
68+
"correctness": {
69+
"noConstAssign": "off",
70+
"noGlobalObjectCalls": "off",
71+
"noInvalidConstructorSuper": "off",
72+
"noNewSymbol": "off",
73+
"noSetterReturn": "off",
74+
"noUndeclaredVariables": "off",
75+
"noUnreachable": "off",
76+
"noUnreachableSuper": "off"
77+
},
78+
"style": {
79+
"noArguments": "error",
80+
"noVar": "error",
81+
"useConst": "error"
82+
},
83+
"suspicious": {
84+
"noDuplicateClassMembers": "off",
85+
"noDuplicateObjectKeys": "off",
86+
"noDuplicateParameters": "off",
87+
"noFunctionAssign": "off",
88+
"noImportAssign": "off",
89+
"noRedeclare": "off",
90+
"noUnsafeNegation": "off",
91+
"useGetterReturn": "off",
92+
"useValidTypeof": "off"
93+
}
94+
}
95+
}
96+
}
97+
]
98+
}

commitlint.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
extends: [
3-
'@commitlint/config-conventional', // scoped packages are not prefixed
4-
]
5-
}
3+
'@commitlint/config-conventional', // scoped packages are not prefixed
4+
],
5+
};

jest.config.ts

-39
This file was deleted.

0 commit comments

Comments
 (0)