Skip to content

Commit 663f029

Browse files
committed
Fix lint-staged configuration and add .mjs ESLint support
1 parent 87cbd97 commit 663f029

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if [ -z "${DISABLE_PRECOMMIT_LINT}" ]; then
2-
npm run lint-staged
2+
pnpm run lint-staged
33
else
44
echo "Skipping lint due to DISABLE_PRECOMMIT_LINT env var"
55
fi

.lintstagedrc.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
'*.{cjs,cts,js,json,md,mjs,mts,ts}': [
3+
'pnpm run lint -- --fix',
4+
'biome format --write'
5+
]
6+
}

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,11 @@ module.exports = [
142142
'sort-destructure-keys/sort-destructure-keys': 'error',
143143
'sort-imports': ['error', { ignoreDeclarationSort: true }]
144144
}
145+
},
146+
{
147+
files: ['**/*.mjs'],
148+
languageOptions: {
149+
sourceType: 'module'
150+
}
145151
}
146152
]

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@
9595
"validate-npm-package-name": "6.0.2",
9696
"vitest": "3.2.4"
9797
},
98-
"overrides": {
99-
"vite": "7.1.5"
98+
"pnpm": {
99+
"overrides": {
100+
"vite": "7.1.5"
101+
}
100102
},
101103
"engines": {
102104
"node": ">=18"
@@ -110,11 +112,5 @@
110112
"categories": [
111113
"levelup"
112114
]
113-
},
114-
"lint-staged": {
115-
"*.{cjs,cts,js,json,md,mjs,mts,ts}": [
116-
"pnpm run lint -- --fix",
117-
"pnpm run lint:fix:fast -- --no-errors-on-unmatched --files-ignore-unknown=true --colors=off"
118-
]
119115
}
120116
}

pnpm-lock.yaml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)