Skip to content

Commit 7b0ac82

Browse files
authored
chore: install oxlint and publint locally (#482)
1 parent 164cd18 commit 7b0ac82

File tree

5 files changed

+395
-4
lines changed

5 files changed

+395
-4
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v5
18-
- name: Lint JS
19-
run: npx oxlint@latest -D perf
18+
- uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
- run: npm ci --ignore-scripts --no-audit --no-fund
22+
- run: npm run lint
2023

2124
test:
2225
name: Unit tests
@@ -56,5 +59,4 @@ jobs:
5659
- run: npm run build
5760
env:
5861
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
59-
- name: Lint package
60-
run: npx publint
62+
- run: npm run lint-package

.oxlintrc.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"import",
5+
"typescript",
6+
"oxc",
7+
"unicorn"
8+
],
9+
"env": {
10+
"node": true,
11+
"browser": true,
12+
"es2024": true
13+
},
14+
"categories": {
15+
"perf": "error",
16+
"correctness": "error",
17+
"pedantic": "error"
18+
},
19+
"rules": {
20+
"unicorn/no-null": "error",
21+
"unicorn/prefer-set-has": "off",
22+
"prefer-string-slice": "off",
23+
"prefer-code-point": "off",
24+
"no-lonely-if": "off",
25+
"unicorn/no-lonely-if": "off",
26+
"no-unused-vars": "off",
27+
"no-await-in-loop": "off",
28+
"prefer-query-selector": "off",
29+
"max-dependencies": "off",
30+
"ban-types": "off",
31+
"no-undefined": "off",
32+
"no-useless-undefined": "off",
33+
"max-classes-per-file": "off",
34+
"max-lines-per-function": "off",
35+
"prefer-math-trunc": "off",
36+
"max-lines": "off",
37+
"max-depth": [
38+
"warn",
39+
{
40+
"max": 5
41+
}
42+
],
43+
"explicit-function-return-type": "off",
44+
"no-console": "off",
45+
"no-optional-chaining": "off",
46+
"no-commonjs": "off",
47+
"unambiguous": "off",
48+
"no-default-export": "off",
49+
"no-async-await": "off",
50+
"no-non-null-assertion": "off",
51+
"no-plusplus": "off",
52+
"no-bitwise": "off",
53+
"default-case": "off",
54+
"no-rest-spread-properties": "off",
55+
"require-await": "warn",
56+
"no-null": "off",
57+
"no-warning-comments": "off"
58+
}
59+
}

0 commit comments

Comments
 (0)