From 5b441a1f794233816283d10ef8a9493dd1849e4e Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Tue, 22 Jun 2021 20:18:46 +0900 Subject: [PATCH] Add rule configs --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index c248710..9d59c86 100644 --- a/index.js +++ b/index.js @@ -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 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