vuejs / eslint-config-typescript

eslint-config-typescript for vue projects
MIT License
115 stars 27 forks source link

Why @ vue/typescript, it will error checking my vue script without ts lang #16

Open Binote opened 3 years ago

Binote commented 3 years ago

When I use js components in a TS project, why check the JS script in a VUE file

编辑器截图

comp.vue

<script>
export default {
// Missing return type on function. eslint(@typescript-eslint/explicit-module-boundary-types)
  data(){}
}
</script>

.eslintrc.js

module.exports = {
    root: true,
    env: {
        node: true,
    },
    "plugins": ["@typescript-eslint"],
    extends: [
        '@vue/typescript/recommended',
    ],
    parserOptions: {
        parser: '@typescript-eslint/parser',
        ecmaVersion: 2020,
    },
};
koooge commented 3 years ago

https://github.com/vuejs/vue-eslint-parser/issues/49

SlyDave commented 3 years ago

49 was closed in #116 but doesn't fix the issue expressed here.

Only Githubissues.

  • Githubissues is a development platform for aggregating issues.