Skip to content

Commit eb0d0ab

Browse files
committed
chore: build with vite
1 parent e9e7000 commit eb0d0ab

File tree

12 files changed

+1925
-7373
lines changed

12 files changed

+1925
-7373
lines changed

.eslintignore

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

.eslintrc.cjs

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

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

babel.config.cjs

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

eslint.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import js from '@eslint/js';
2+
import prettier from 'eslint-config-prettier';
3+
import globals from 'globals';
4+
import ts from 'typescript-eslint';
5+
6+
/** @type {import('eslint').Linter.Config[]} */
7+
export default [
8+
js.configs.recommended,
9+
...ts.configs.recommended,
10+
prettier,
11+
{
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
},
17+
},
18+
},
19+
{
20+
ignores: ['dist/'],
21+
},
22+
{
23+
rules: {
24+
'@typescript-eslint/no-explicit-any': 'off',
25+
},
26+
},
27+
];

package.json

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
"author": "Gerald <[email protected]>",
66
"license": "MIT",
77
"scripts": {
8-
"ci": "run-s lint test",
9-
"lint": "eslint src",
10-
"dev": "rollup -wc",
11-
"clean": "del-cli dist",
12-
"build:js": "rollup -c",
13-
"build:types": "tsc",
14-
"build": "run-s ci clean build:js build:types",
15-
"test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
8+
"ci": "pnpm run lint && pnpm run test",
9+
"lint": "eslint",
10+
"dev": "vite",
11+
"clean": "rm -rf dist",
12+
"build": "pnpm run ci && vite build",
13+
"test": "vitest --run",
1614
"prepare": "husky install",
17-
"prepublishOnly": "run-s build"
15+
"prepublishOnly": "pnpm run build"
1816
},
1917
"type": "module",
2018
"module": "./dist/index.js",
@@ -37,28 +35,33 @@
3735
"registry": "https://registry.npmjs.org/"
3836
},
3937
"dependencies": {
40-
"@babel/runtime": "^7.23.7",
41-
"@rollup/pluginutils": "^5.1.0",
38+
"@rollup/pluginutils": "^5.3.0",
4239
"estree-walker": "^3.0.3",
43-
"is-reference": "^3.0.2",
44-
"magic-string": "^0.30.7"
40+
"is-reference": "^3.0.3",
41+
"magic-string": "^0.30.21"
4542
},
4643
"devDependencies": {
47-
"@gera2ld/plaid": "~2.7.0",
48-
"@gera2ld/plaid-rollup": "~2.7.0",
49-
"@gera2ld/plaid-test": "^2.6.0",
50-
"@types/node": "^20.10.6",
51-
"cross-env": "^7.0.3",
52-
"del-cli": "^5.1.0",
53-
"husky": "^8.0.3"
44+
"@eslint/js": "^9.39.1",
45+
"@types/estree": "^1.0.8",
46+
"@types/node": "^24.10.1",
47+
"acorn": "^8.15.0",
48+
"eslint": "^9.39.1",
49+
"eslint-config-prettier": "^10.1.8",
50+
"globals": "^16.5.0",
51+
"husky": "^9.1.7",
52+
"prettier": "^3.6.2",
53+
"rollup": "^4.53.3",
54+
"typescript": "^5.9.3",
55+
"typescript-eslint": "^8.48.0",
56+
"vite": "^7.2.4",
57+
"vite-plugin-dts": "^4.5.4",
58+
"vitest": "^4.0.13"
59+
},
60+
"peerDependencies": {
61+
"rollup": "^4.0.0"
5462
},
5563
"repository": "[email protected]:violentmonkey/rollup-plugin-userscript.git",
5664
"engines": {
5765
"node": ">=18"
58-
},
59-
"jest": {
60-
"extensionsToTreatAsEsm": [
61-
".ts"
62-
]
6366
}
6467
}

0 commit comments

Comments
 (0)