Skip to content

Commit

Permalink
* fix ghost dependencies used by eslint-import-resolver-vite pzmosq…
Browse files Browse the repository at this point in the history
…uito/eslint-import-resolver-vite#22 @ .yarnrc.yml

$ yarn add -D vue-eslint-parser # ghost dependency used in .eslintrc.cjs

* simplify glob in options of rule `import/order` @ .eslintrc.cjs
$ yarn eslint --fix src
@ fe
  • Loading branch information
n0099 committed Feb 11, 2024
1 parent fd41a26 commit 7b067de
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 25 deletions.
12 changes: 6 additions & 6 deletions fe/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ const eslintPluginImport = { // as of [email protected]
{ pattern: '**/*.vue', group: 'internal', position: 'before' }, // vue SFC
{ pattern: '@/**', group: 'internal', position: 'before' },
{ pattern: 'vue*', group: 'external', position: 'before' }, // vue vue-router
{ pattern: '*vue', group: 'external', position: 'before' }, // ant-design-vue
{ pattern: '*vue*/**', group: 'external', position: 'before' }, // @vueuse/core
{ pattern: '*/*vue*/**', group: 'external', position: 'before' }, // @unhead/vue @fortawesome/vue-fontawesome
{ pattern: '{lodash{,-{es,fp}},lodash{,-{es,fp}}/**}', group: 'external', position: 'after' }, // lodash
{ pattern: '{echarts,echarts/**}', group: 'external', position: 'after' },
{ pattern: 'pinia', group: 'external', position: 'before' },
{ pattern: '*vue*{,/**}', group: 'external', position: 'before' }, // ant-design-vue @vueuse/core
{ pattern: '*/*vue*{,/**}', group: 'external', position: 'before' }, // @unhead/vue @fortawesome/vue-fontawesome
{ pattern: 'lodash{,-{es,fp}}{,/**}', group: 'external', position: 'after' }, // lodash
{ pattern: 'echarts{,/**}', group: 'external', position: 'after' },
],
pathGroupsExcludedImportTypes: [],
pathGroupsExcludedImportTypes: [], // https://github.com/import-js/eslint-plugin-import/issues/2897
distinctGroup: false,
alphabetize: { order: 'asc', orderImportKind: 'asc' },
warnOnUnassignedImports: true,
Expand Down
5 changes: 5 additions & 0 deletions fe/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
nodeLinker: pnp
yarnPath: .yarn/releases/yarn-4.1.0.cjs
packageExtensions:
"eslint-import-resolver-vite@*":
dependencies: # https://github.com/pzmosquito/eslint-import-resolver-vite/pull/22
"resolve": "*"
"debug": "*"
1 change: 1 addition & 0 deletions fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"typescript-eslint-parser-for-extra-files": "^0.6.0",
"vite": "^5.1.1",
"vite-bundle-analyzer": "^0.7.0",
"vue-eslint-parser": "^9.4.2",
"vue-tsc": "^1.8.27"
},
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion fe/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { QueryFunctionContext } from '@tanstack/vue-query';
import type { ApiError, ApiForums, ApiPosts, ApiPostsParam, ApiStatsForumPostCount, ApiStatsForumPostCountQueryParam, ApiStatus, ApiStatusQueryParam, ApiUsers, ApiUsersParam } from '@/api/index.d';
import type { QueryFunctionContext } from '@tanstack/vue-query';
import { useQuery } from '@tanstack/vue-query';
import nprogress from 'nprogress';
import { stringify } from 'qs';
Expand Down
2 changes: 1 addition & 1 deletion fe/src/components/Post/PostNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ import { useElementRefsStore } from '@/stores/elementRefs';
import { onUnmounted, ref, watchEffect } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Menu, MenuItem, SubMenu } from 'ant-design-vue';
import { useToggle } from '@vueuse/core';
import { Menu, MenuItem, SubMenu } from 'ant-design-vue';
import type { MenuClickEventHandler } from 'ant-design-vue/lib/menu/src/interface';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import scrollIntoView from 'scroll-into-view-if-needed';
Expand Down
4 changes: 2 additions & 2 deletions fe/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import App from '@/App.vue';
import router from '@/router';
import * as fontAwesomeIcons from '@/shared/fontAwesome';
import '@/styles/style.css';
import { createApp } from 'vue';
import { library } from '@fortawesome/fontawesome-svg-core';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { VueQueryPlugin } from '@tanstack/vue-query';
import { createHead } from '@unhead/vue';
import 'bootstrap';
Expand All @@ -12,7 +13,6 @@ import 'noty/lib/noty.css';
import 'noty/lib/themes/mint.css';
import nprogress from 'nprogress';
import 'nprogress/nprogress.css';
import { createPinia } from 'pinia';

library.add(...Object.values(fontAwesomeIcons));

Expand Down
2 changes: 1 addition & 1 deletion fe/src/views/Status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import { titleTemplate } from '@/shared';
import { commonToolboxFeatures, emptyChartSeriesData } from '@/shared/echarts';
import { onMounted, ref, watchEffect } from 'vue';
import { Switch } from 'ant-design-vue';
import { useIntervalFn } from '@vueuse/core';
import { Switch } from 'ant-design-vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { useHead } from '@unhead/vue';
import * as _ from 'lodash-es';
Expand Down
29 changes: 15 additions & 14 deletions fe/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,18 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:*, debug@npm:^4.3.4":
version: 4.3.4
resolution: "debug@npm:4.3.4"
dependencies:
ms: "npm:2.1.2"
peerDependenciesMeta:
supports-color:
optional: true
checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736
languageName: node
linkType: hard

"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2":
version: 4.3.3
resolution: "debug@npm:4.3.3"
Expand All @@ -2591,18 +2603,6 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:^4.3.4":
version: 4.3.4
resolution: "debug@npm:4.3.4"
dependencies:
ms: "npm:2.1.2"
peerDependenciesMeta:
supports-color:
optional: true
checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736
languageName: node
linkType: hard

"deep-is@npm:^0.1.3":
version: 0.1.4
resolution: "deep-is@npm:0.1.4"
Expand Down Expand Up @@ -4942,7 +4942,7 @@ __metadata:
languageName: node
linkType: hard

"resolve@npm:^1.10.0, resolve@npm:^1.22.4":
"resolve@npm:*, resolve@npm:^1.10.0, resolve@npm:^1.22.4":
version: 1.22.8
resolution: "resolve@npm:1.22.8"
dependencies:
Expand All @@ -4955,7 +4955,7 @@ __metadata:
languageName: node
linkType: hard

"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
"resolve@patch:resolve@npm%3A*#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
dependencies:
Expand Down Expand Up @@ -5521,6 +5521,7 @@ __metadata:
vite: "npm:^5.1.1"
vite-bundle-analyzer: "npm:^0.7.0"
vue: "npm:3.4.14"
vue-eslint-parser: "npm:^9.4.2"
vue-router: "npm:^4.2.5"
vue-tsc: "npm:^1.8.27"
languageName: unknown
Expand Down

0 comments on commit 7b067de

Please sign in to comment.