Skip to content

Commit e7c3104

Browse files
committed
style: replace ESLint and Prettier with oxlint and oxfmt
1 parent c2078e9 commit e7c3104

14 files changed

Lines changed: 2713 additions & 5054 deletions

.github/workflows/pull-requests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
6262
restore-keys: |
6363
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
64+
- run: npm run fmt
6465
- run: npm run lint
6566

6667
Typecheck:

.husky/commit-msg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#!/usr/bin/env sh
22

3-
COMMIT_MSG=$(cat $1)
4-
5-
echo "$COMMIT_MSG" | npx --no-install commitlint
3+
commitlint --edit ${1}

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/usr/bin/env sh
22

3-
npx --no-install lint-staged
3+
oxfmt
4+
oxlint
5+
git update-index --again

.oxfmtrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": ["cdk.out", "node_modules", "next-env.d.ts", "package-lock.json", "src/generated"],
4+
"printWidth": 120,
5+
"objectWrap": "preserve",
6+
"semi": false,
7+
"singleQuote": true,
8+
"sortImports": true,
9+
"tabWidth": 4
10+
}

.oxlintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error",
5+
"perf": "error"
6+
},
7+
"options": {
8+
"typeAware": true,
9+
"typeCheck": true
10+
},
11+
"plugins": ["import", "eslint", "typescript", "oxc", "react"],
12+
"rules": {
13+
"import/extensions": [
14+
"error",
15+
"always",
16+
{
17+
"ts": "never",
18+
"tsx": "always",
19+
"ignorePackages": true
20+
}
21+
],
22+
"jsx-no-constructed-context-values": "off",
23+
"no-accumulating-spread": "off"
24+
}
25+
}

.prettierrc.json

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

CHANGELOG.md

Lines changed: 54 additions & 79 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ response.headers.append(
8989
The script tag that loads the Usercentrics Browser CMP.
9090

9191
```tsx
92-
interface UsercentricsScriptProps
93-
extends React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement> {
92+
interface UsercentricsScriptProps extends React.DetailedHTMLProps<
93+
React.ScriptHTMLAttributes<HTMLScriptElement>,
94+
HTMLScriptElement
95+
> {
9496
/**
9597
* The language code the Usercentrics UI should load by default. If not set, it will be automatically selected.
9698
*

eslint.config.mjs

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

0 commit comments

Comments
 (0)