Open
Description
Version
4.5.8
Reproduction link
https://github.com/jeneser/vue-cli-prettier-issue
Environment info
Environment Info:
System:
OS: Linux 4.14 Ubuntu 20.04 LTS (Focal Fossa)
CPU: (16) x64 Intel(R) Xeon(R) CPU @ 2.20GHz
Binaries:
Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.19.0/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.2.1
@vue/babel-helper-vue-transform-on: 1.0.0-rc.2
@vue/babel-plugin-jsx: 1.0.0-rc.3
@vue/babel-plugin-transform-vue-jsx: 1.2.1
@vue/babel-preset-app: 4.5.8
@vue/babel-preset-jsx: 1.2.4
@vue/babel-sugar-composition-api-inject-h: 1.2.1
@vue/babel-sugar-composition-api-render-instance: 1.2.4
@vue/babel-sugar-functional-vue: 1.2.2
@vue/babel-sugar-inject-h: 1.2.2
@vue/babel-sugar-v-model: 1.2.3
@vue/babel-sugar-v-on: 1.2.3
@vue/cli: 4.5.8
@vue/cli-overlay: 4.5.8
@vue/cli-plugin-babel: 4.5.8
@vue/cli-plugin-eslint: 4.5.8
@vue/cli-plugin-router: 4.5.8
@vue/cli-plugin-vuex: 4.5.8
@vue/cli-service: 4.5.8
@vue/cli-service-global: 4.5.8
@vue/cli-shared-utils: 4.5.8
@vue/cli-ui: 4.5.8
@vue/cli-ui-addon-webpack: 4.5.8
@vue/cli-ui-addon-widgets: 4.5.8
@vue/compiler-core: 3.0.2
@vue/compiler-dom: 3.0.2
@vue/compiler-sfc: 3.0.2
@vue/compiler-ssr: 3.0.2
@vue/component-compiler-utils: 3.2.0
@vue/preload-webpack-plugin: 1.1.2
@vue/reactivity: 3.0.2
@vue/runtime-core: 3.0.2
@vue/runtime-dom: 3.0.2
@vue/shared: 3.0.2
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: 5.2.3
typescript: 3.9.7
vue: 2.6.12 (3.0.2)
vue-cli-plugin-apollo: 0.21.3
vue-codemod: 0.0.4
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.4
vue-loader: 15.9.4 (16.0.0-beta.9)
vue-style-loader: 4.1.2
vue-template-compiler: 2.6.12
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
- Create a new project selecting TypeScript and Prettier.
- Run:
yarn run lint
What is expected?
Formatting without any failures.
What is actually happening?
warning: Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any) at src/shims-vue.d.ts:3:44:
1 | declare module "*.vue" {
2 | import type { DefineComponent } from "vue";
> 3 | const component: DefineComponent<{}, {}, any>;
| ^
4 | export default component;
5 | }
6 |
We should pretty much never have to use any
, as never
and unknown
should be able to cover.