AmadeusITGroup / otter

The Otter project is a highly modular framework whose goal is to provide a common platform to accelerate and facilitate the development of runtime customizable Angular based Web Applications
https://amadeusitgroup.github.io/otter/
BSD 3-Clause "New" or "Revised" License
49 stars 38 forks source link

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

Open cpaulve-1A opened 1 month ago

cpaulve-1A commented 1 month ago

Context

Pre-requisite

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:

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 commented 3 weeks ago

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 commented 3 weeks ago

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.