Skip to content

Commit

Permalink
Add rule configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ypresto committed Jun 22, 2021
1 parent dc2ab43 commit 5b441a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ module.exports = {

/* Override recommended */
'@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true, argsIgnorePattern: '^_' }],
// Keep enabled and allow namespace declaration in source (not definition) files.
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],

/* Disable rules in recommended */
// I think it is too strict to enforce Record<string, unknown> instead of {} (especially for default prop type parameter).
'@typescript-eslint/ban-types': 'off',
// Some API needs snake case type, and rarely violated
'@typescript-eslint/camelcase': 'off',
// Too explicit
'@typescript-eslint/explicit-function-return-type': 'off',
// It enforces all exported funcs to have explicit return type. Too explicit.
'@typescript-eslint/explicit-module-boundary-types': 'off',
// Empty function is used to match to interface definition while it is actually no-op.
'@typescript-eslint/no-empty-function': 'off',
// Rewriting `interface Foobar extends Baz {}` to `type Foobar = Baz` is blah
Expand Down

0 comments on commit 5b441a1

Please sign in to comment.