You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current ESLint config is based on eslint-config-standard, which have the following issues:
it hasn't been updated recently, which leads to inconsistent peer deps range. This is causing peer deps issues when working with npm v7, which is preventing us from running the CI with node v16 (see chore: add tests for Node 16 #350)
this config aims to fix style issues too, which we are not interested in since we use prettier
In order to improve this, it would be better to switch to eslint-config-kentcdodds, fixing whichever new code violations we get from this new config.
Additionally, it would be nice to address the following changes too:
Forbid @typescript-eslint/experimental-utils/dist/ts-eslint imports with no-restricted-imports. We shouldn't import from /dist subfolder, but we have some of them across the codebase (I guess from IDE auto imports). Instead, we need to import the corresponding object from @typescript-eslint/experimental-utils.
Install and setup recommended rules from eslint-plugin-unicorn. It has really nice rules that would make our codebase more consistent. Most of them are autofixable.
Changes to address
replace eslint-config-standard by eslint-config-kentcdodds
forbid @typescript-eslint/experimental-utils/dist imports with no-restricted-imports
add eslint-plugin-unicorn to the codebase
fix issues generated by previous changes
The text was updated successfully, but these errors were encountered:
Belco90
added
the
chore
Changes that affect the build system, CI config or other changes that don't modify src/test files
label
May 14, 2021
Belco90
changed the title
Migrate ESLint config
Migrate codebase ESLint config
May 14, 2021
* chore: replace ESLint standard config by kentcdodds
* chore: auto fix new errors
* chore: fix new errors reported
* chore: forbid imports from @typescript-eslint/experimental-utils/dist
* chore: fix last errors related to imports
* chore: update prettier
* chore: bump eslint plugins
* chore: fix prettier version
* chore: bump eslint and eslint-config-kentcdodds
* chore: remove custom path groups for import/order rule
* chore: switch import/no-import-module-exports rule off
This rule is causing an ESLint error which prevents the rest of the
project to be linted.
* chore: update @babel/new-cap rule reference
* chore: format files
* refactor: update block to avoid unnecessary condition
* refactor: get necessary condition back
Closes#384
Our current ESLint config is based on
eslint-config-standard
, which have the following issues:In order to improve this, it would be better to switch to
eslint-config-kentcdodds
, fixing whichever new code violations we get from this new config.Additionally, it would be nice to address the following changes too:
@typescript-eslint/experimental-utils/dist/ts-eslint
imports withno-restricted-imports
. We shouldn't import from/dist
subfolder, but we have some of them across the codebase (I guess from IDE auto imports). Instead, we need to import the corresponding object from@typescript-eslint/experimental-utils
.recommended
rules fromeslint-plugin-unicorn
. It has really nice rules that would make our codebase more consistent. Most of them are autofixable.Changes to address
eslint-config-standard
byeslint-config-kentcdodds
@typescript-eslint/experimental-utils/dist
imports withno-restricted-imports
addeslint-plugin-unicorn
to the codebaseThe text was updated successfully, but these errors were encountered: