Skip to content

Commit f231a07

Browse files
committed
chore: migrate eslint and other deps
1 parent e791407 commit f231a07

File tree

19 files changed

+2099
-1682
lines changed

19 files changed

+2099
-1682
lines changed

.eslintignore

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

.eslintrc.json

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

docs/highlight.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-console */
21
import * as shiki from 'shiki';
32
import { JSDOM } from 'jsdom';
43
import { visit } from 'unist-util-visit';

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"unist-util-visit": "^5.0.0",
3434
"valibot": "^0.28.1",
3535
"vee-validate": "^4.12.6",
36-
"vue": "^3.3.11",
36+
"vue": "^3.4.26",
3737
"yup": "^1.3.2",
3838
"zod": "^3.22.4"
3939
}

eslint.config.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import eslint from '@eslint/js';
2+
import globals from "globals";
3+
import tseslint from 'typescript-eslint';
4+
5+
export default tseslint.config(
6+
eslint.configs.recommended,
7+
...tseslint.configs.recommended,
8+
{
9+
languageOptions: {
10+
sourceType: 'module',
11+
globals: {
12+
...globals.browser,
13+
}
14+
},
15+
rules: {
16+
"@typescript-eslint/camelcase": "off",
17+
"@typescript-eslint/explicit-function-return-type": "off",
18+
"@typescript-eslint/no-use-before-define": "off",
19+
"@typescript-eslint/explicit-module-boundary-types": "off",
20+
"@typescript-eslint/no-explicit-any": "warn"
21+
},
22+
},
23+
{
24+
files: ["scripts/**/*"],
25+
languageOptions: {
26+
'sourceType': 'commonjs',
27+
globals: {
28+
...globals.nodeBuiltin
29+
}
30+
},
31+
},
32+
{
33+
files: [ "docs/scripts/**/*", "docs/*.config.js"],
34+
languageOptions: {
35+
'sourceType': 'commonjs',
36+
globals: {
37+
...globals.node
38+
}
39+
},
40+
},
41+
{
42+
ignores: [
43+
"packages/vee-validate/dist/*",
44+
"packages/yup/dist/*",
45+
"packages/zod/dist/*",
46+
"packages/valibot/dist/*",
47+
"packages/joi/dist/*",
48+
"packages/rules/dist/*",
49+
"packages/i18n/dist/*",
50+
"packages/nuxt/dist/*",
51+
]
52+
}
53+
);

package.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,51 @@
2222
},
2323
"devDependencies": {
2424
"@changesets/cli": "^2.27.1",
25-
"@commitlint/cli": "^18.4.3",
26-
"@commitlint/config-conventional": "^18.4.3",
25+
"@commitlint/cli": "^19.3.0",
26+
"@commitlint/config-conventional": "^19.2.2",
27+
"@eslint/js": "^9.2.0",
2728
"@rollup/plugin-commonjs": "^25.0.7",
2829
"@rollup/plugin-json": "^6.1.0",
2930
"@rollup/plugin-node-resolve": "^15.2.3",
3031
"@rollup/plugin-replace": "^5.0.5",
31-
"@rollup/plugin-typescript": "^11.1.5",
32-
"@types/node": "^20.10.4",
33-
"@typescript-eslint/eslint-plugin": "^6.14.0",
34-
"@typescript-eslint/parser": "^6.14.0",
35-
"@vitest/coverage-v8": "^1.0.4",
36-
"@vue/devtools-api": "^6.5.1",
32+
"@rollup/plugin-typescript": "^11.1.6",
33+
"@types/node": "^20.12.8",
34+
"@vitest/coverage-v8": "^1.6.0",
35+
"@vue/devtools-api": "^6.6.1",
3736
"chalk": "^5.3.0",
38-
"eslint": "^8.55.0",
37+
"eslint": "^9.2.0",
3938
"eslint-config-prettier": "^9.1.0",
4039
"eslint-config-standard": "^17.1.0",
41-
"eslint-plugin-import": "^2.29.0",
42-
"eslint-plugin-n": "^16.4.0",
43-
"eslint-plugin-prettier": "^5.0.1",
40+
"eslint-plugin-import": "^2.29.1",
41+
"eslint-plugin-n": "^17.4.0",
42+
"eslint-plugin-prettier": "^5.1.3",
4443
"eslint-plugin-promise": "^6.1.1",
45-
"filesize": "^10.1.0",
44+
"filesize": "^10.1.1",
4645
"flush-promises": "^1.0.2",
4746
"fs-extra": "^11.2.0",
47+
"globals": "^15.1.0",
4848
"gzip-size": "^7.0.0",
49-
"husky": "^8.0.3",
50-
"jsdom": "^23.0.1",
49+
"husky": "^9.0.11",
50+
"jsdom": "^24.0.0",
5151
"klona": "^2.0.6",
52-
"lint-staged": "^15.2.0",
53-
"prettier": "^3.1.1",
54-
"prettier-plugin-astro": "^0.12.2",
52+
"lint-staged": "^15.2.2",
53+
"prettier": "^3.2.5",
54+
"prettier-plugin-astro": "^0.13.0",
5555
"raf-stub": "^3.0.0",
56-
"rollup": "^4.9.0",
56+
"rollup": "^4.17.2",
5757
"rollup-plugin-dts": "^6.1.0",
58-
"terser": "^5.26.0",
58+
"terser": "^5.31.0",
5959
"tslint-config-prettier": "^1.18.0",
6060
"type-fest": "^4.8.3",
6161
"typescript": "5.3.3",
62-
"vite-tsconfig-paths": "^4.2.2",
63-
"vitest": "^1.0.4",
64-
"vue": "^3.3.11",
65-
"yup": "^1.3.2"
62+
"typescript-eslint": "^7.8.0",
63+
"vite-tsconfig-paths": "^4.3.2",
64+
"vitest": "^1.6.0",
65+
"vue": "^3.4.26",
66+
"yup": "^1.4.0"
6667
},
6768
"peerDependencies": {
68-
"vue": "^3.3.11"
69+
"vue": "^3.4.26"
6970
},
7071
"lint-staged": {
7172
"*.ts": [

packages/rules/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable camelcase */
2-
31
import alpha from './alpha';
42
import alpha_dash from './alpha_dash';
53
import alpha_num from './alpha_num';

packages/rules/src/one_of.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const oneOfValidator = (value: unknown, list: unknown[]): boolean => {
1010
}
1111

1212
return Array.from(list).some(item => {
13-
// eslint-disable-next-line
1413
return item == value;
1514
});
1615
};

packages/rules/src/url.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const urlValidator = (value: unknown, params: [string | RegExp | undefined] | {
1111
}
1212

1313
try {
14-
// eslint-disable-next-line no-new
1514
new URL(value as string);
1615
} catch {
1716
return false;

packages/rules/tests/dimensions.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ beforeEach(() => {
2828
};
2929
});
3030

31-
// eslint-disable-next-line
3231
test('validates image dimensions', async () => {
3332
let result = await validate(helpers.file('file.jpg', 'image/jpeg', 10), { width: 150, height: 100 });
3433
expect(result).toBe(true);

0 commit comments

Comments
 (0)