New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope typescript settings to *.ts files #82
Comments
Note that I'm not sure how and if that will affect typescript |
Also, the current use of typescript plugin is rather minimal. Only the typescript parser from typescript plugin is enabled but otherwise, no rules are utilized (besides one). It would make sense to at least extend the base config from that plugin. That would also take care of setting the EDIT: Actually extending base configuration from typescript plugin wouldn't work as that would override the parser and break vue plugin. So rules would need to be copied over and scoped to .ts/.tsx extensions instead. |
And typescript config doesn't even follow base Nuxt rules like no semi and single quotes (amongst others). Is that on purpose to diverge from JS/Vue style used in base config? |
In:
https://github.com/nuxt/eslint-config/blob/dc55bbf218c8627d3c4ef73656a32730dd2a9d3c/packages/eslint-config-typescript/index.js#L1-L12
all typescript-specific settings should be in an override block and scoped to
*.ts
extension:One of the many reasons why it should be so is that when enabling some typescript rules, like
@typescript-eslint/no-unused-vars
, you are supposed to disable eslint's ownno-unused-vars
rule (see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md#options) and you don't want to do that in general, only for *.ts.Also, current way overrides
parserOptions.parser
which it would ideally not do for all file types since other might want to usebabel-parser
rather (although I haven't found specific issues with current solution).The text was updated successfully, but these errors were encountered: