Skip to content

Commit

Permalink
fix(comp:all,pro:all,cdk:all): add eslint import check (#922)
Browse files Browse the repository at this point in the history
fix unresolved imports
  • Loading branch information
sallerli1 committed May 24, 2022
1 parent f6652ff commit 8bbbec1
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 23 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module.exports = {
plugins: ['jsdoc', 'import'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
Expand All @@ -22,6 +24,18 @@ module.exports = {
tsx: true,
},
},
settings: {
'import/resolver': {
'eslint-import-resolver-custom-alias': {
alias: {
'@idux': './packages',
'@tests': './tests',
},
extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.vue', '.md'],
packages: ['packages/*'],
},
},
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"cz-conventional-changelog": "^3.3.0",
"esbuild": "^0.14.38",
"eslint": "^8.14.0",
"eslint-import-resolver-custom-alias": "^1.3.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^37.9.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const install = (app: App): void => {
const installer = { install, version }

export default installer
export { install, version }
export { install }

export * from '@idux/cdk/a11y'
export * from '@idux/cdk/breakpoint'
Expand Down
7 changes: 0 additions & 7 deletions packages/components/card/style/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/components/date-picker/style/themes/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
import '@idux/components/style/core/default'
import '@idux/components/_private/overlay/style/themes/default'
import '@idux/components/icon/style/themes/default'
import '@idux-vue2/components/input/style/themes/default'
import '@idux/components/input/style/themes/default'

import './default.less'
2 changes: 1 addition & 1 deletion packages/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const install = (app: App): void => {
const installer = { install, version }

export default installer
export { install, version }
export { install }

export * from '@idux/components/affix'
export * from '@idux/components/alert'
Expand Down
2 changes: 1 addition & 1 deletion packages/components/transfer/style/themes/default.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// style dependencies
import '@idux/components/_private/checkable-list/style/default'
import '@idux/components/_private/checkable-list/style/themes/default'
import '@idux/components/style/core/default'
import '@idux/components/checkbox/style/themes/default'
import '@idux/components/empty/style/themes/default'
Expand Down
2 changes: 1 addition & 1 deletion packages/components/transfer/style/themes/seer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// style dependencies
import '@idux/components/_private/checkable-list/style/seer'
import '@idux/components/_private/checkable-list/style/themes/seer'
import '@idux/components/style/core/seer'
import '@idux/components/checkbox/style/themes/seer'
import '@idux/components/empty/style/themes/seer'
Expand Down
4 changes: 0 additions & 4 deletions packages/components/upload/style/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/pro/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const install = (app: App): void => {
const installer = { install, version }

export default installer
export { install, version }
export { install }

export * from '@idux/pro/layout'
export * from '@idux/pro/transfer'
Expand Down
6 changes: 3 additions & 3 deletions packages/pro/tree/style/themes/default.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// style dependencies
import '@idux/pro/style/core/default'
import '@idux-vue2/components/icon/style/themes/default'
import '@idux-vue2/components/button/style/themes/default'
import '@idux-vue2/components/divider/style/themes/default'
import '@idux/components/icon/style/themes/default'
import '@idux/components/button/style/themes/default'
import '@idux/components/divider/style/themes/default'

import './default.less'
6 changes: 3 additions & 3 deletions packages/pro/tree/style/themes/seer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// style dependencies
import '@idux/pro/style/core/seer'
import '@idux-vue2/components/icon/style/themes/seer'
import '@idux-vue2/components/button/style/themes/seer'
import '@idux-vue2/components/divider/style/themes/seer'
import '@idux/components/icon/style/themes/seer'
import '@idux/components/button/style/themes/seer'
import '@idux/components/divider/style/themes/seer'

import './seer.less'
1 change: 1 addition & 0 deletions packages/site/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { resolve } from 'path'

import vuePlugin from '@vitejs/plugin-vue'
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'
// eslint-disable-next-line import/no-unresolved
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'vite'

Expand Down

0 comments on commit 8bbbec1

Please sign in to comment.