Skip to content

Commit dc30cf2

Browse files
Added unplugin-auto-import package
1 parent 3890791 commit dc30cf2

File tree

16 files changed

+363
-71
lines changed

16 files changed

+363
-71
lines changed

.eslintrc-auto-import.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"globals": {
3+
"CSSProperties": true,
4+
"Component": true,
5+
"ComponentPublicInstance": true,
6+
"ComputedRef": true,
7+
"EffectScope": true,
8+
"InjectionKey": true,
9+
"PropType": true,
10+
"Ref": true,
11+
"VNode": true,
12+
"computed": true,
13+
"createApp": true,
14+
"customRef": true,
15+
"defineAsyncComponent": true,
16+
"defineComponent": true,
17+
"effectScope": true,
18+
"getCurrentInstance": true,
19+
"getCurrentScope": true,
20+
"h": true,
21+
"inject": true,
22+
"isProxy": true,
23+
"isReactive": true,
24+
"isReadonly": true,
25+
"isRef": true,
26+
"markRaw": true,
27+
"nextTick": true,
28+
"onActivated": true,
29+
"onBeforeMount": true,
30+
"onBeforeUnmount": true,
31+
"onBeforeUpdate": true,
32+
"onDeactivated": true,
33+
"onErrorCaptured": true,
34+
"onMounted": true,
35+
"onRenderTracked": true,
36+
"onRenderTriggered": true,
37+
"onScopeDispose": true,
38+
"onServerPrefetch": true,
39+
"onUnmounted": true,
40+
"onUpdated": true,
41+
"provide": true,
42+
"reactive": true,
43+
"readonly": true,
44+
"ref": true,
45+
"resolveComponent": true,
46+
"shallowReactive": true,
47+
"shallowReadonly": true,
48+
"shallowRef": true,
49+
"toRaw": true,
50+
"toRef": true,
51+
"toRefs": true,
52+
"triggerRef": true,
53+
"unref": true,
54+
"useAttrs": true,
55+
"useCssModule": true,
56+
"useCssVars": true,
57+
"useSlots": true,
58+
"useTheme": true,
59+
"watch": true,
60+
"watchEffect": true,
61+
"watchPostEffect": true,
62+
"watchSyncEffect": true
63+
}
64+
}

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
'plugin:@typescript-eslint/recommended',
1010
'@vue/typescript/recommended',
1111
'prettier',
12+
'./.eslintrc-auto-import.json',
1213
],
1314
overrides: [
1415
{
@@ -69,6 +70,7 @@ module.exports = {
6970
'no-const-assign': 'error',
7071
'no-debugger': 0,
7172
'no-new': 0,
73+
'no-undef': 0,
7274
'no-unused-vars': 1,
7375
'no-use-before-define': 0,
7476
'no-useless-escape': 0,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"stylelint-order": "^6.0.3",
113113
"stylelint-scss": "^4.6.0",
114114
"typescript": "^5.0.4",
115+
"unplugin-auto-import": "^0.15.3",
115116
"vite": "^4.3.1",
116117
"vite-plugin-babel": "^1.1.3",
117118
"vite-plugin-eslint": "^1.8.1",

pnpm-lock.yaml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { App, Plugin } from 'vue';
2-
import { VDrilldownTable } from '@/plugin';
3-
import '@/plugin/styles/main.scss';
2+
import { VDrilldownTable } from './plugin';
3+
import './plugin/styles/main.scss';
44

55
const install = (app: App) => {
66
app.component('VDrilldownTable', VDrilldownTable);

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import App from '@/App.vue';
1+
import App from './App.vue';
22
import CodeBlock from 'vue3-code-block';
3-
import VDrilldownTable from '@/index';
3+
import VDrilldownTable from './index';
44
import { createApp } from 'vue';
55
import { createPinia } from "pinia";
6-
import { registerPlugins } from '@/plugins';
6+
import { registerPlugins } from './plugins';
77

88
const app = createApp(App);
99
app.use(VDrilldownTable);

src/plugin/VDrilldownTable.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,6 @@
231231
</template>
232232

233233
<script setup lang="ts">
234-
import { useTheme } from 'vuetify';
235-
import {
236-
computed,
237-
onMounted,
238-
ref,
239-
StyleValue,
240-
useSlots,
241-
watch,
242-
} from 'vue';
243234
import { componentName } from './utils/globals';
244235
import { AllProps } from './utils/props';
245236
import { useGetLevelColors } from './composables/levelColors';

src/plugin/components/HeadersSlot.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
</template>
4040

4141
<script setup lang="ts">
42-
import {
43-
CSSProperties,
44-
} from 'vue';
45-
import { useTheme } from 'vuetify';
4642
import { componentName } from '@/plugin/utils/globals';
4743
import * as DrilldownTypes from '@/types/types';
4844
import { useGetLevelColors } from '@/plugin/composables/levelColors';

0 commit comments

Comments
 (0)