Integrate typescript-eslint v2 as soon as becomes stable
IlCallo opened this issue · comments
typescript-eslint/typescript-eslint#501 (comment)
typescript-eslint v2 will be released as stable in a couple of weeks and contains some fixes for problems we noticed while moving away from TSLint
It must be updated after the release
Part of the update should be check new rules defaults (with or without Prettier)
V2 has been released.
There are some problems with Vue template linting, when it comes to JS/TS related directives, which I'm going to link here.
vuejs/vue-eslint-parser#55
vuejs/eslint-plugin-vue#944
typescript-eslint/typescript-eslint#883
Problems root cause is still under investigation.
Steps to execute the upgrade.
.eslintrc.js
'plugin:@typescript-eslint/recommended-requiring-type-checking'
should be added right after 'plugin:@typescript-eslint/recommended'
, into extends
array.
extraFileExtensions: ['.vue']
should be added into parserOptions
Comments about typescript-eslint
v2 release into rules
property can be removed, as well as the @typescript-eslint/indent
rule (style rules have been removed from recommended config).
package.json
@typescript-eslint/eslint-plugin
and "@typescript-eslint/parser
should be updated to latest release
Fix linting problems
async usage where not needed
async
keywork should be removed from all boot files default exports, because it isn't actually used (there is no await
inside any of those AFAIK)
Vuex boilerplate
no-empty-function
complains about actions
, getters
and mutations
files because they have an empty function body.
Adding a simple comment like // your code
will solve this.
Unusued params will error too, I wrapped those into a multiline comment.
export function someAction(/* context */) {
// your code
}
Update: typescript-eslint/typescript-eslint#890
Someone is hopefully taking care of the problem
There are some problems with Vue template linting
Problems have been solved (typescript-eslint/typescript-eslint#1083) since v2.5.0
Fixed by #48