Skip to content

Commit 8ef02d3

Browse files
committed
fix: update import paths for Vue compiler SFC
- Changed import statements in multiple files to use the browser-specific version of the Vue compiler SFC. - Updated the commit message verification script to improve formatting examples. - Cleaned up the tsup configuration by removing unnecessary options and ensuring proper external dependencies. - Added a type declaration file for the new Vue compiler SFC import path.
1 parent 2ba923c commit 8ef02d3

File tree

11 files changed

+418
-641
lines changed

11 files changed

+418
-641
lines changed

eslint.config.js

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

eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import simon from '@antfu/eslint-config'
2+
3+
export default simon({
4+
rules: {
5+
'no-console': 'off',
6+
'ts/ban-types': 'off',
7+
'jsdoc/require-returns-description': 'off',
8+
'no-new-func': 'off',
9+
'unicorn/no-new-array': 'off',
10+
'jsdoc/require-returns-check': 'off',
11+
'jsdoc/check-param-names': 'off',
12+
'no-cond-assign': 'off',
13+
'no-eval': 'off',
14+
'ts/no-unsafe-function-type': 'off',
15+
'regexp/optimal-quantifier-concatenation': 'off',
16+
'regexp/no-misleading-capturing-group': 'off',
17+
'regexp/no-super-linear-backtracking': 'off',
18+
'ts/no-unused-expressions': 'off',
19+
'regexp/no-useless-quantifier': 'off',
20+
'unused-imports/no-unused-vars': 'off',
21+
'regexp/no-unused-capturing-group': 'off',
22+
'regexp/no-obscure-range': 'off',
23+
'regexp/no-dupe-disjunctions': 'off',
24+
'regexp/confusing-quantifier': 'off',
25+
'regexp/no-legacy-features': 'off',
26+
'ts/no-empty-object-type': 'off',
27+
},
28+
ignores: ['**/fixtures', 'test'],
29+
})

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "transform-to-unocss",
3+
"type": "module",
34
"version": "0.0.91",
45
"packageManager": "[email protected]",
56
"description": "The tool that transform css to unocss",
@@ -20,12 +21,12 @@
2021
"exports": {
2122
".": {
2223
"types": "./dist/index.d.ts",
23-
"import": "./dist/index.mjs",
24-
"require": "./dist/index.js"
24+
"import": "./dist/index.js",
25+
"require": "./dist/index.cjs"
2526
}
2627
},
2728
"main": "./dist/index.js",
28-
"module": "./dist/index.mjs",
29+
"module": "./dist/index.js",
2930
"types": "./dist/index.d.ts",
3031
"typesVersions": {
3132
"*": {
@@ -36,7 +37,7 @@
3637
}
3738
},
3839
"bin": {
39-
"tounocss": "./cli.mjs"
40+
"tounocss": "./cli.js"
4041
},
4142
"files": [
4243
"dist"
@@ -56,13 +57,9 @@
5657
"test": "vitest",
5758
"typecheck": "tsc --noEmit"
5859
},
59-
"dependencies": {
60-
"@vue/compiler-sfc": "3.3.4"
61-
},
6260
"devDependencies": {
63-
"@antfu/eslint-config": "^3.16.0",
61+
"@antfu/eslint-config": "^4.12.0",
6462
"@babel/core": "7.21.0",
65-
"@babel/eslint-parser": "7.19.1",
6663
"@babel/plugin-syntax-import-meta": "7.10.4",
6764
"@babel/plugin-transform-typescript": "7.21.0",
6865
"@rollup/pluginutils": "^5.1.4",
@@ -73,6 +70,7 @@
7370
"@types/stylus": "^0.48.43",
7471
"@unocss/preset-uno": "^0.50.8",
7572
"@vue/babel-plugin-jsx": "^1.4.0",
73+
"@vue/compiler-sfc": "3.5.13",
7674
"bumpp": "^8.2.1",
7775
"eslint": "^9.24.0",
7876
"esno": "^0.16.3",
@@ -94,7 +92,7 @@
9492
"tsx": "^3.14.0",
9593
"typescript": "^5.8.3",
9694
"unplugin": "^1.16.1",
97-
"vitest": "^2.1.9"
95+
"vitest": "^3.1.1"
9896
},
9997
"lint-staged": {
10098
"*": [

playground/src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ monaco.languages.registerCompletionItemProvider('html', {
109109
})
110110
const isInStyleSection
111111
= /<style\b/.test(textUntilPosition)
112-
|| /style\s*=\s*"/.test(textUntilPosition)
113-
|| /style\s*=\s*'/.test(textUntilPosition)
112+
|| /style\s*=\s*"/.test(textUntilPosition)
113+
|| /style\s*=\s*'/.test(textUntilPosition)
114114
115115
if (!isInStyleSection)
116116
return { suggestions: [] }
@@ -130,6 +130,7 @@ onMounted(() => {
130130
}
131131
})
132132
useFocus('input') // 自动聚焦input
133+
// eslint-disable-next-line no-restricted-globals
133134
self.MonacoEnvironment = {
134135
getWorker() {
135136
return new HtmlWorker()

0 commit comments

Comments
 (0)