Skip to content

Commit 5279b2e

Browse files
committed
refactor: lint
1 parent 620450b commit 5279b2e

33 files changed

+2268
-446
lines changed

.github/workflows/emoji-helper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ jobs:
1010
steps:
1111
- uses: actions-cool/emoji-helper@040b841cb25e2e6f50151c73b5ce12fee57019d2 # v1.0.0
1212
with:
13-
type: 'release'
13+
type: release
1414
emoji: '+1, laugh, heart, hooray, rocket, eyes'

.github/workflows/issue-reply.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.event.label.name == 'help wanted'
1313
uses: actions-cool/issues-helper@45d75b6cf72bf4f254be6230cb887ad002702491 # v3.6.3
1414
with:
15-
actions: 'create-comment'
15+
actions: create-comment
1616
issue-number: ${{ github.event.issue.number }}
1717
body: |
1818
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
@@ -21,7 +21,7 @@ jobs:
2121
if: github.event.label.name == 'need reproduction'
2222
uses: actions-cool/issues-helper@45d75b6cf72bf4f254be6230cb887ad002702491 # v3.6.3
2323
with:
24-
actions: 'create-comment'
24+
actions: create-comment
2525
issue-number: ${{ github.event.issue.number }}
2626
body: |
2727
Hello @${{ github.event.issue.user.login }}. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link [codesandbox](https://codesandbox.io/s/magical-vaughan-byzhk?file=/src/App.jsx) or provide your GitHub repository.

.prettierignore

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

.prettierrc

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

eslint.config.js

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,11 @@
1-
// @ts-check
2-
import { builtinModules } from 'node:module'
3-
import tseslint from 'typescript-eslint'
4-
import importX from 'eslint-plugin-import-x'
5-
import eslint from '@eslint/js'
6-
import eslintConfigPrettier from 'eslint-config-prettier'
1+
import { sxzz } from '@sxzz/eslint-config'
72

8-
export default tseslint.config(
9-
eslint.configs.recommended,
3+
export default sxzz(
4+
{},
105
{
11-
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
12-
extends: [...tseslint.configs.recommended],
13-
plugins: {
14-
import: importX,
15-
},
16-
17-
languageOptions: {
18-
parserOptions: {
19-
sourceType: 'module',
20-
ecmaFeatures: {
21-
jsx: true,
22-
},
23-
},
24-
},
25-
266
rules: {
27-
eqeqeq: ['warn', 'always', { null: 'never' }],
28-
'no-debugger': ['error'],
29-
'no-empty': ['warn', { allowEmptyCatch: true }],
30-
'prefer-const': [
31-
'warn',
32-
{
33-
destructuring: 'all',
34-
},
35-
],
36-
'@typescript-eslint/ban-ts-comment': 'off',
37-
'@typescript-eslint/no-var-requires': 'off',
38-
'@typescript-eslint/no-non-null-assertion': 'off',
39-
'@typescript-eslint/no-explicit-any': 'off',
40-
'@typescript-eslint/consistent-type-imports': [
41-
'error',
42-
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
43-
],
44-
45-
'import/no-nodejs-modules': [
46-
'error',
47-
{ allow: builtinModules.map((mod) => `node:${mod}`) },
48-
],
49-
'import/no-duplicates': 'error',
50-
'import/order': 'error',
51-
'sort-imports': [
52-
'error',
53-
{
54-
ignoreCase: false,
55-
ignoreDeclarationSort: true,
56-
ignoreMemberSort: false,
57-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
58-
allowSeparatedGroups: false,
59-
},
60-
],
7+
'import/no-default-export': 'off',
8+
'unicorn/filename-case': 'off',
619
},
6210
},
63-
eslintConfigPrettier,
64-
{
65-
ignores: ['**/dist/', '**/coverage/'],
66-
},
6711
)

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"private": true,
55
"packageManager": "[email protected]",
66
"type": "module",
7+
"keywords": [
8+
"vue",
9+
"jsx"
10+
],
11+
"license": "MIT",
712
"scripts": {
813
"dev": "pnpm -C packages/jsx-explorer run dev",
914
"build": "tsdown",
@@ -14,15 +19,11 @@
1419
"typecheck": "tsc",
1520
"release": "bumpp -r"
1621
},
17-
"license": "MIT",
18-
"keywords": [
19-
"vue",
20-
"jsx"
21-
],
2222
"devDependencies": {
2323
"@babel/plugin-syntax-typescript": "^7.27.1",
24-
"@eslint/js": "^9.37.0",
2524
"@rollup/plugin-babel": "^6.0.4",
25+
"@sxzz/eslint-config": "^7.3.2",
26+
"@sxzz/prettier-config": "^2.2.5",
2627
"@types/babel__core": "^7.20.5",
2728
"@types/babel__helper-module-imports": "^7.18.3",
2829
"@types/babel__helper-plugin-utils": "^7.10.3",
@@ -31,15 +32,13 @@
3132
"@vue/babel-plugin-jsx": "workspace:*",
3233
"bumpp": "^10.3.1",
3334
"eslint": "^9.37.0",
34-
"eslint-config-prettier": "^10.1.8",
35-
"eslint-plugin-import-x": "^4.16.1",
3635
"jsdom": "^27.0.0",
3736
"prettier": "3.6.2",
38-
"tsdown": "^0.15.6",
37+
"tsdown": "^0.16.7",
3938
"tslib": "^2.8.1",
4039
"typescript": "~5.9.3",
41-
"typescript-eslint": "^8.45.0",
4240
"vite": "^7.1.9",
4341
"vitest": "^3.2.4"
44-
}
42+
},
43+
"prettier": "@sxzz/prettier-config"
4544
}

packages/babel-helper-vue-transform-on/index.d.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ declare function transformOn(
22
obj: Record<string, any>,
33
): Record<`on${string}`, any>
44

5-
export { transformOn as default, transformOn as 'module.exports' }
5+
export default transformOn
6+
export { transformOn as 'module.exports' }

packages/babel-helper-vue-transform-on/index.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ function transformOn(obj) {
66
return result
77
}
88

9-
export { transformOn as default, transformOn as 'module.exports' }
9+
export default transformOn
10+
export { transformOn as 'module.exports' }
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "@vue/babel-helper-vue-transform-on",
33
"version": "2.0.1",
4-
"type": "module",
54
"description": "to help transform on",
6-
"author": "Amour1688 <[email protected]>",
5+
"type": "module",
76
"license": "MIT",
8-
"exports": {
9-
".": "./index.mjs",
10-
"./package.json": "./package.json"
11-
},
127
"repository": {
138
"type": "git",
149
"url": "git+https://github.com/vuejs/babel-plugin-jsx.git",
1510
"directory": "packages/babel-helper-vue-transform-on"
11+
},
12+
"author": "Amour1688 <[email protected]>",
13+
"exports": {
14+
".": "./index.mjs",
15+
"./package.json": "./package.json"
1616
}
1717
}

packages/babel-plugin-jsx/README-zh_CN.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install @vue/babel-plugin-jsx -D
1717

1818
配置 Babel
1919

20-
```js
20+
```json
2121
{
2222
"plugins": ["@vue/babel-plugin-jsx"]
2323
}
@@ -102,7 +102,7 @@ const App = {
102102
```
103103

104104
```jsx
105-
import { withModifiers, defineComponent } from 'vue'
105+
import { defineComponent, withModifiers } from 'vue'
106106

107107
const App = defineComponent({
108108
setup() {
@@ -169,13 +169,13 @@ const App = {
169169
```
170170
171171
```jsx
172-
<input v-model={[val, ['modifier']]} />
172+
<input v-model={[val, ['modifier']]} />;
173173
// 或者
174174
<input v-model_modifier={val} />
175175
```
176176
177177
```jsx
178-
<A v-model={[val, 'argument', ['modifier']]} />
178+
<A v-model={[val, 'argument', ['modifier']]} />;
179179
// 或者
180180
<input v-model:argument_modifier={val} />
181181
```
@@ -227,7 +227,7 @@ h(A, {
227227
modifier: true,
228228
},
229229
'onUpdate:modelValue': ($event) => (foo = $event),
230-
bar: bar,
230+
bar,
231231
barModifiers: {
232232
modifier: true,
233233
},
@@ -284,7 +284,7 @@ const App = {
284284
285285
// or
286286
287-
const App = {
287+
const App2 = {
288288
setup() {
289289
const slots = {
290290
default: () => <div>A</div>,
@@ -295,7 +295,7 @@ const App = {
295295
}
296296
297297
// 或者,当 `enableObjectSlots` 不是 `false` 时,您可以使用对象插槽
298-
const App = {
298+
const App3 = {
299299
setup() {
300300
return () => (
301301
<>

0 commit comments

Comments
 (0)