Skip to content
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
@FerrielMelarpis

Description

@FerrielMelarpis

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 tslint-loader. investigate typescript-eslint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions