Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: remove eslint-config-kentcdodds
`eslint-config-kentcdodds` uses some outdated packages which block us from upgrading TypeScript dependencies.
  • Loading branch information
lesha1201 committed Dec 6, 2023
commit b6443b689218dba7f088ea65dc2df183a9a43e24
32 changes: 31 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
'kentcdodds',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint-config-kentcdodds uses some outdated packages which block us from upgrading TypeScript dependencies properly. It didn't bring many rules so decided just use eslint:recommended, plugin:import/recommended and configure some rules manually.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change! We should apply it anyway.

'eslint:recommended',
'plugin:import/recommended',
'plugin:jest/recommended',
'plugin:jest-formatting/recommended',
'prettier',
Expand Down Expand Up @@ -33,6 +38,12 @@ module.exports = {
},
},
],
'import/first': 'error',
'import/no-empty-named-blocks': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-mutable-exports': 'error',
'import/no-named-default': 'error',
'import/no-relative-packages': 'warn',
},
overrides: [
{
Expand All @@ -46,6 +57,7 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
Expand All @@ -54,6 +66,24 @@ module.exports = {
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-use-before-define': 'off',

// Import
// Rules enabled by `import/recommended` but are better handled by
// TypeScript and @typescript-eslint.
'import/default': 'off',
'import/export': 'off',
'import/namespace': 'off',
'import/no-unresolved': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
typescript: {
alwaysTryTypes: true,
},
},
},
},
],
Expand Down
Loading