Created
April 24, 2020 04:52
-
-
Save restuu/e63c2161ab21b6fcb448efde0928b452 to your computer and use it in GitHub Desktop.
typescript eslint config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "tsconfig.json", | |
"sourceType": "module" | |
}, | |
"extends": ["plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript"], | |
"plugins": ["@typescript-eslint", "prettier"], | |
"rules": { | |
"@typescript-eslint/adjacent-overload-signatures": "error", | |
"@typescript-eslint/no-empty-function": "error", | |
"@typescript-eslint/no-empty-interface": "off", | |
"@typescript-eslint/no-floating-promises": "error", | |
"@typescript-eslint/no-namespace": "error", | |
"@typescript-eslint/no-unnecessary-type-assertion": "error", | |
"@typescript-eslint/no-use-before-define": "warn", | |
"@typescript-eslint/prefer-for-of": "warn", | |
"@typescript-eslint/triple-slash-reference": "error", | |
"@typescript-eslint/unified-signatures": "warn", | |
"import/no-named-as-default": "off", | |
"import/no-named-as-default-member": "off", | |
"no-console": "off", | |
"constructor-super": "error", | |
"eqeqeq": ["warn", "always"], | |
"no-cond-assign": "error", | |
"no-duplicate-case": "error", | |
"no-duplicate-imports": "error", | |
"no-empty": [ | |
"error", | |
{ | |
"allowEmptyCatch": true | |
} | |
], | |
"no-invalid-this": "error", | |
"no-new-wrappers": "error", | |
"no-param-reassign": "error", | |
"no-redeclare": "error", | |
"no-sequences": "error", | |
"no-shadow": [ | |
"error", | |
{ | |
"hoist": "all" | |
} | |
], | |
"no-throw-literal": "error", | |
"no-unsafe-finally": "error", | |
"no-unused-labels": "error", | |
"no-var": "warn", | |
"no-void": "error", | |
"prefer-const": "warn" | |
}, | |
"settings": { | |
"import/extensions": [".ts", ".js"], | |
"import/resolver": { | |
"node": { | |
"extensions": [".ts", ".js"] | |
} | |
}, | |
"import/parsers": { | |
"@typescript-eslint/parser": [".ts"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment