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

[Feature]: Review and cleanup eslint-config #2052

Open
cpaulve-1A opened this issue Aug 12, 2024 · 2 comments
Open

[Feature]: Review and cleanup eslint-config #2052

cpaulve-1A opened this issue Aug 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request priority:high

Comments

@cpaulve-1A
Copy link
Contributor

cpaulve-1A commented Aug 12, 2024

Context

Pre-requisite

  • Decision around the use of prettier to be taken.

Context
The current eslint-config list many deprecated rules that could be migrated from eslint/typescript-eslint to typescript-eslint and stylistics.
Non exhaustive list contains the following:

  • comma-dangle
  • comma-style
  • dot-location
  • eol-last
  • indent
  • key-spacing
  • linebreak-style
  • max-length
  • new-parens
  • no-mixed-spaces-and-tabs
  • no-multiple-empty-lines
  • no-multi-spaces
  • no-trailing-spaces
  • quotes
  • semi
  • spaced-comment
  • space-in-parens
  • space-unary-ops

Proposal

Review all the current eslint rules.
Depending on the decision about the usage of prettier, replace them with their supported equivalent (typescript-eslint or stylistics) rules or remove them, if they are duplicates of prettier config.

@cpaulve-1A cpaulve-1A added the enhancement New feature or request label Aug 12, 2024
@cpaulve-1A
Copy link
Contributor Author

Note that we should not just cover the stylistic rules but all the deprecated eslint rules (eg. eslint id-blacklist has been replaced with id-denylist)

@guillaumerochelle
Copy link
Contributor

guillaumerochelle commented Aug 22, 2024

Hello,

stylistics.cjs is using @stylistics/eslint-plugin-ts.

I think it would be better to use @stylistic/eslint-plugin, according to the docs:

Stylistic rules for ESLint, works for both JavaScript, TypeScript and JSX.

This plugin provides all rules from:

@stylistic/eslint-plugin-js
@stylistic/eslint-plugin-ts
@stylistic/eslint-plugin-jsx
@stylistic/eslint-plugin-plus

With this plugin, you no longer need to mainly disable JavaScript in favor of TypeScript. Rules work for both languages.

And in the "Project progress" page, it is mentioned that JS/TS/JSX packages will be deprecated in the future.

👉 Fuse JS/TS/JSX rules into a single package, and merge their docs. After this, separate packages for JS/TS/JSX will be deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high
Projects
None yet
Development

No branches or pull requests

4 participants