This repository was archived by the owner on Nov 8, 2021. It is now read-only.
This repository was archived by the owner on Nov 8, 2021. It is now read-only.
Integrate linting with official ESLint TypeScript plugin #18
Closed
Description
When you opt-in to eslint feature of quasar-cli, it will inject the eslint-loader
to the webpack config. Problem is even if the <script>
uses lang="ts"
on a SFC, it will still run against it.
// quasar.conf.js
extendWebpack(cfg) {
cfg.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /node_modules/,
});
},
Sample error when using vue-property-decorator
33:11 error Parsing error: Unexpected token
17 | export default class UserList extends Vue {
18 | @Prop({ type: Array, default: () => [] })
> 19 | readonly users: any[];
| ^
Cannot recognize readonly
as a keyword since it is only recognized by typescript.
Not sure if the best option is to use investigate tslint-loader
.typescript-eslint
Metadata
Metadata
Assignees
Labels
No labels