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

Enabling typescript-eslint typed linting #499

Open
2 of 4 tasks
Ingramz opened this issue Sep 17, 2024 · 1 comment
Open
2 of 4 tasks

Enabling typescript-eslint typed linting #499

Ingramz opened this issue Sep 17, 2024 · 1 comment

Comments

@Ingramz
Copy link

Ingramz commented Sep 17, 2024

Describe the feature

Currently, @nuxt/eslint only enables rules of non-typechecked configs (recommended / strict) from typescript-eslint. In addition to these, typescript-eslint also provides advanced rules that depend on TypeScript's type checking API-s which are available via recommended-type-checked and strict-type-checked configs (see https://typescript-eslint.io/getting-started/typed-linting and https://typescript-eslint.io/rules/?=typeInformation).

There are some performance concerns when it comes to naively enabling these configs, namely specifying project or projectService in parserOptions, a prerequisite, can slow down linting speed of a medium sized project from few seconds to several minutes. It is uncertain at the moment whether these slowdowns are unique to this project, Vue or caused by something else.

I think the main question I have is whether @nuxt/eslint would be willing to adopt these configs by default provided that the linting performance bottlenecks are identified. If they deem unsolvable to a satisfactory level, could optionally opting into them made easier for cases such as a CI step, where we can typically afford to spend more time?

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@UfukUstali
Copy link

There are some performance concerns when it comes to naively enabling these configs

While i do agree that due to performance reasons this feature can/maybe should remain disabled by default, having the option to enable it is essential, especially so when even something like this:

"@typescript-eslint/strict-boolean-expressions": [
  "warn",
  {
    allowString: false,
    allowNumber: false,
    allowNullableObject: false,
  },
]

requires it.

I couldn't find a way to enable it currently so if there is, i would appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants