Skip to content

Commit 90915b7

Browse files
committed
chore(lint): adopt oxc-config-mantine for the oxlint ruleset
1 parent e502933 commit 90915b7

4 files changed

Lines changed: 30 additions & 106 deletions

File tree

‎oxlint.config.mjs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from 'oxlint';
2+
import { oxlint } from 'oxc-config-mantine';
3+
4+
export default defineConfig({
5+
...oxlint,
6+
rules: {
7+
...oxlint.rules,
8+
// Upstream ships `curly: 'error'` (defaults to "all" → braces always required), which
9+
// conflicts with oxfmt: the formatter collapses single-statement bodies onto the condition
10+
// line (`if (x) return;`), so a freshly-formatted file fails its own lint step.
11+
// "multi-line" allows exactly what oxfmt emits while still requiring braces for multi-line
12+
// bodies. Do not drop this override when bumping oxc-config-mantine.
13+
curly: ['error', 'multi-line'],
14+
},
15+
// Upstream ignores 'docs/out' and 'package/dist' but not 'docs/.next', which our docs sites have.
16+
ignorePatterns: ['**/*.{mjs,cjs,js,d.ts,d.mts}', 'docs/.next', 'docs/out', 'package/dist'],
17+
});

‎oxlint.config.ts‎

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

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"format:write": "oxfmt --write \"**/*.{ts,tsx,css}\"",
1616
"typecheck": "tsc --noEmit && cd docs && npm run typecheck",
1717
"lint": "npm run oxlint && npm run stylelint",
18-
"oxlint": "oxlint .",
18+
"oxlint": "oxlint -c oxlint.config.mjs .",
1919
"stylelint": "stylelint '**/*.css' --cache",
2020
"jest": "jest",
2121
"test": "npm run syncpack && npm run format:test && npm run typecheck && npm run lint && npm run jest",
@@ -62,6 +62,7 @@
6262
"jest-axe": "^11.0.0",
6363
"jest-environment-jsdom": "^29.7.0",
6464
"mantine-docgen-script": "^1.6.0",
65+
"oxc-config-mantine": "^1.0.0",
6566
"oxfmt": "^0.60.0",
6667
"oxlint": "^1.75.0",
6768
"postcss": "^8.5.23",

‎yarn.lock‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9049,6 +9049,7 @@ __metadata:
90499049
jest-axe: "npm:^11.0.0"
90509050
jest-environment-jsdom: "npm:^29.7.0"
90519051
mantine-docgen-script: "npm:^1.6.0"
9052+
oxc-config-mantine: "npm:^1.0.0"
90529053
oxfmt: "npm:^0.60.0"
90539054
oxlint: "npm:^1.75.0"
90549055
postcss: "npm:^8.5.23"
@@ -10328,6 +10329,16 @@ __metadata:
1032810329
languageName: node
1032910330
linkType: hard
1033010331

10332+
"oxc-config-mantine@npm:^1.0.0":
10333+
version: 1.0.0
10334+
resolution: "oxc-config-mantine@npm:1.0.0"
10335+
peerDependencies:
10336+
oxfmt: ^0.55.0
10337+
oxlint: ^1.70.0
10338+
checksum: 10c0/0adcb4872a889984b2f8f3cd60a105c23d3902a50ba9545a35c312de02b2768fefe9a2cd245134b4efb5442a63848299607d537912feff9844450c6c7c0ba9a8
10339+
languageName: node
10340+
linkType: hard
10341+
1033110342
"oxc-parser@npm:^0.127.0":
1033210343
version: 0.127.0
1033310344
resolution: "oxc-parser@npm:0.127.0"

0 commit comments

Comments
 (0)