diff --git a/.eslintrc.js b/.eslintrc.js index d642a972..68cccde8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -57,5 +57,27 @@ module.exports = { }, ], 'space-before-function-paren': 'off', + + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + // 'vue/html-self-closing': 'off', + 'vue/require-default-prop': 'off', + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], }, }; diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 00000000..3e556ef3 --- /dev/null +++ b/.yarnclean @@ -0,0 +1,48 @@ +# test directories +__tests__ +test +tests +powered-test + +# asset directories +docs +doc +website +images +assets + +# examples +example +examples + +# code coverage directories +coverage +.nyc_output + +# build scripts +Makefile +Gulpfile.js +Gruntfile.js + +# configs +appveyor.yml +circle.yml +codeship-services.yml +codeship-steps.yml +wercker.yml +.tern-project +.gitattributes +.editorconfig +.*ignore +.eslintrc +.jshintrc +.flowconfig +.documentup.json +.yarn-metadata.json +.travis.yml + +# misc +*.md + +!istanbul-reports/lib/html/assets +!istanbul-api/node_modules/istanbul-reports/lib/html/assets diff --git a/package.json b/package.json index 49f887f4..3a9d8905 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", "clean:lib": "npx rimraf node_modules", "typecheck": "vuedx-typecheck .", - "lint:eslint": "eslint --fix --ext \"src/**/*.{vue,less,css,scss}\"", + "lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap" @@ -63,7 +63,7 @@ "@types/zxcvbn": "^4.4.0", "@typescript-eslint/eslint-plugin": "^4.14.1", "@typescript-eslint/parser": "^4.14.1", - "@vitejs/plugin-legacy": "^1.2.1", + "@vitejs/plugin-legacy": "^1.2.2", "@vitejs/plugin-vue": "^1.1.2", "@vitejs/plugin-vue-jsx": "^1.0.2", "@vue/compiler-sfc": "^3.0.5", @@ -93,7 +93,7 @@ "stylelint-order": "^4.1.0", "ts-node": "^9.1.1", "typescript": "^4.1.3", - "vite": "2.0.0-beta.50", + "vite": "2.0.0-beta.52", "vite-plugin-html": "^2.0.0-beta.6", "vite-plugin-mock": "^2.0.0-rc.2", "vite-plugin-purge-icons": "^0.6.0", diff --git a/src/components/Application/src/AppLocalePicker.vue b/src/components/Application/src/AppLocalePicker.vue index 986b709c..48204d86 100644 --- a/src/components/Application/src/AppLocalePicker.vue +++ b/src/components/Application/src/AppLocalePicker.vue @@ -20,7 +20,6 @@ import { defineComponent, ref, watchEffect, unref, computed } from 'vue'; import { Dropdown, DropMenu } from '/@/components/Dropdown'; - import { GlobalOutlined } from '@ant-design/icons-vue'; import { useLocale } from '/@/locales/useLocale'; import { useLocaleSetting } from '/@/hooks/setting/useLocaleSetting'; @@ -33,7 +32,7 @@ import Icon from '/@/components/Icon'; export default defineComponent({ name: 'AppLocalPicker', - components: { GlobalOutlined, Dropdown, Icon }, + components: { Dropdown, Icon }, props: { // Whether to display text showText: propTypes.bool.def(true), diff --git a/src/components/Application/src/AppProvider.vue b/src/components/Application/src/AppProvider.vue index ddf8c6ce..b976a3cf 100644 --- a/src/components/Application/src/AppProvider.vue +++ b/src/components/Application/src/AppProvider.vue @@ -1,5 +1,5 @@ diff --git a/src/components/Drawer/src/BasicDrawer.vue b/src/components/Drawer/src/BasicDrawer.vue index 848b0c63..3e2e0b77 100644 --- a/src/components/Drawer/src/BasicDrawer.vue +++ b/src/components/Drawer/src/BasicDrawer.vue @@ -8,7 +8,7 @@ @close="onClose" > @@ -18,11 +18,11 @@ v-loading="getLoading" :loading-tip="loadingText || t('common.loadingText')" > - + @@ -57,8 +57,8 @@ import { useAttrs } from '/@/hooks/core/useAttrs'; export default defineComponent({ - inheritAttrs: false, components: { Drawer, ScrollContainer, DrawerFooter, DrawerHeader }, + inheritAttrs: false, props: basicProps, emits: ['visible-change', 'ok', 'close', 'register'], setup(props, { emit }) { diff --git a/src/components/Drawer/src/components/DrawerFooter.vue b/src/components/Drawer/src/components/DrawerFooter.vue index 5940d0ce..25bd587b 100644 --- a/src/components/Drawer/src/components/DrawerFooter.vue +++ b/src/components/Drawer/src/components/DrawerFooter.vue @@ -1,11 +1,11 @@ diff --git a/src/components/Drawer/src/components/DrawerHeader.vue b/src/components/Drawer/src/components/DrawerHeader.vue index 3fcfb329..adc22233 100644 --- a/src/components/Drawer/src/components/DrawerHeader.vue +++ b/src/components/Drawer/src/components/DrawerHeader.vue @@ -1,6 +1,6 @@ @@ -33,6 +33,7 @@ showDetailBack: propTypes.bool, title: propTypes.string, }, + emits: ['close'], setup(_, { emit }) { const { prefixCls } = useDesign('basic-drawer-header'); diff --git a/src/components/Dropdown/src/Dropdown.vue b/src/components/Dropdown/src/Dropdown.vue index 7f7ac4ba..941fe866 100644 --- a/src/components/Dropdown/src/Dropdown.vue +++ b/src/components/Dropdown/src/Dropdown.vue @@ -1,7 +1,7 @@