Skip to content

Commit db83c7b

Browse files
committed
chore: fix lint
1 parent db82fb1 commit db83c7b

File tree

11 files changed

+33
-34
lines changed

11 files changed

+33
-34
lines changed

eslint.config.mjs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import { sxzz } from '@sxzz/eslint-config'
22
import reactivityFunction from './dist/eslint.js'
33

4-
export default [
5-
...sxzz({
6-
rules: {
7-
'unused-imports/no-unused-vars': 'off',
8-
'unused-imports/no-unused-imports': 'off',
9-
'import/no-default-export': 'off',
10-
},
11-
}),
12-
reactivityFunction({
13-
ignores: ['**/*.md/**'],
14-
rules: {
15-
'reactivity-function': 1,
16-
},
17-
}),
18-
]
4+
export default sxzz()
5+
.overrideRules({
6+
'unused-imports/no-unused-vars': 'off',
7+
'unused-imports/no-unused-imports': 'off',
8+
'import/no-default-export': 'off',
9+
})
10+
.append(
11+
reactivityFunction({
12+
ignores: ['**/*.md/**'],
13+
rules: {
14+
'reactivity-function': 1,
15+
},
16+
}),
17+
)

playground/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="tsx">
2-
import { type Ref, inject, provide, ref, toRefs, watch } from 'vue'
32
import { useBase64 } from '@vueuse/core'
3+
import { inject, provide, ref, toRefs, watch, type Ref } from 'vue'
44
import { useUserStore } from '../store/user'
55
66
const { token, login } = $toRefs(useUserStore())

playground/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createApp } from 'vue'
21
import { createPinia } from 'pinia'
2+
import { createApp } from 'vue'
33
import App from './App.vue'
44

55
const pinia = createPinia()

playground/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from 'vite'
2-
import Inspect from 'vite-plugin-inspect'
31
import Vue from '@vitejs/plugin-vue'
42
import VueJsx from '@vitejs/plugin-vue-jsx'
3+
import { defineConfig } from 'vite'
4+
import Inspect from 'vite-plugin-inspect'
55
import VueReactivityFunction from '../src/vite'
66

77
export default defineConfig({

src/astro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import unplugin from '.'
21
import type { Options } from './core/options'
2+
import unplugin from '.'
33

44
export default (options: Options) => ({
55
name: 'unplugin-vue-reactivity-function',

src/core/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2-
type BaseOptions,
32
REGEX_NODE_MODULES,
43
REGEX_SUPPORTED_EXT,
4+
type BaseOptions,
55
} from '@vue-macros/common'
66

77
export interface Options extends Pick<BaseOptions, 'include' | 'exclude'> {

src/core/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable node/prefer-global/process */
22
import { walk } from 'estree-walker'
3-
import type { Node } from 'oxc-parser'
43
import type { Reference, Scope } from '@typescript-eslint/scope-manager'
4+
import type { Node } from 'oxc-parser'
55

66
export function getReferences(scope: Scope, id: Node): Reference[] {
77
return scope.childScopes.reduce(
@@ -74,7 +74,7 @@ export function getRequire() {
7474
try {
7575
// @ts-expect-error check api
7676
if (globalThis.process?.getBuiltinModule) {
77-
const module = process.getBuiltinModule('module')
77+
const module = process.getBuiltinModule('node:module')
7878
// unenv has implemented `getBuiltinModule` but has yet to support `module.createRequire`
7979
if (module?.createRequire) {
8080
return (require = module.createRequire(import.meta.url))

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type UnpluginInstance, createUnplugin } from 'unplugin'
1+
import { createUnplugin, type UnpluginInstance } from 'unplugin'
22
import plugin from './raw'
33
import type { Options } from './core/options'
44

src/raw.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1+
import { analyze } from '@typescript-eslint/scope-manager'
12
import {
2-
HELPER_PREFIX,
3-
MagicStringAST,
4-
REGEX_SETUP_SFC,
5-
REGEX_SRC_FILE,
63
createFilter,
74
generateTransform,
85
getLang,
6+
HELPER_PREFIX,
97
importHelperFn,
8+
MagicStringAST,
109
parseSFC,
10+
REGEX_SETUP_SFC,
11+
REGEX_SRC_FILE,
1112
} from '@vue-macros/common'
12-
import { analyze } from '@typescript-eslint/scope-manager'
1313
import { walk } from 'estree-walker'
14-
import { type Options, resolveOption } from './core/options'
14+
import { resolveOption, type Options } from './core/options'
1515
import {
1616
collectRefs,
1717
getOxcParser,

src/volar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { analyze } from '@typescript-eslint/scope-manager'
2+
import { walk } from 'estree-walker'
13
import {
2-
type Code,
34
allCodeFeatures,
45
createPlugin,
56
replaceSourceRange,
7+
type Code,
68
} from 'ts-macro'
7-
import { analyze } from '@typescript-eslint/scope-manager'
8-
import { walk } from 'estree-walker'
99
import {
1010
collectRefs,
1111
getOxcParser,

0 commit comments

Comments
 (0)