Skip to content

Commit 4a11cf4

Browse files
committed
chore: add eslint-plugin-unicorn
1 parent 1e67743 commit 4a11cf4

File tree

5 files changed

+260
-18
lines changed

5 files changed

+260
-18
lines changed

eslint.config.mjs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
import { defineConfig } from '@configurajs/eslint'
2+
import unicorn from 'eslint-plugin-unicorn'
23

3-
export default defineConfig({
4+
const configs = defineConfig({
45
vue: false,
56
jsx: false,
67
})
8+
9+
configs.push({
10+
plugins: {
11+
unicorn,
12+
},
13+
rules: {
14+
'unicorn/explicit-length-check': 'error',
15+
},
16+
})
17+
18+
export default configs

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"dev": "tsup --watch",
3434
"format": "prettier --write .",
3535
"postinstall": "simple-git-hooks",
36-
"lint": "eslint --fix .",
36+
"lint": "eslint .",
37+
"lint:fix": "eslint --fix .",
3738
"package": "rimraf *.vsix && pnpm build && vsce package --no-dependencies",
3839
"release": "vr release --skip-npm-publish",
3940
"test": "vitest run",
@@ -334,6 +335,7 @@
334335
"@varlet/release": "^0.3.2",
335336
"@vscode/vsce": "^3.2.1",
336337
"eslint": "^9.18.0",
338+
"eslint-plugin-unicorn": "^57.0.0",
337339
"mock-fs": "^5.4.1",
338340
"nano-staged": "^0.8.0",
339341
"prettier": "^3.4.2",

0 commit comments

Comments
 (0)