Skip to content

Commit

Permalink
feat: add more rules (read more)
Browse files Browse the repository at this point in the history
- enforce comments
- enforce type imports
- ignore underscore for unused vars
- prefer optional chaining
- prefer nullish coalescing
  • Loading branch information
john-d-pelingo committed Nov 6, 2021
1 parent 25c7080 commit 19aebcf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/eslint-config-typescript/.eslintrc.js
Expand Up @@ -14,8 +14,24 @@ const config = {
'plugin:import/typescript',
],
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
'ts-nocheck': true,
'ts-check': false,
},
],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'import/no-default-export': 'error',
'import/no-deprecated': 'warn',
'import/order': [
Expand Down

0 comments on commit 19aebcf

Please sign in to comment.