Last active
April 9, 2020 22:22
-
-
Save patroza/75a38515057cdeb32b361208043ff275 to your computer and use it in GitHub Desktop.
ESLint for matechs-effect
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
module.exports = { | |
"env": { | |
"browser": true | |
}, | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "tsconfig.json", | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"@typescript-eslint", | |
"@typescript-eslint/tslint" | |
], | |
"rules": { | |
"@typescript-eslint/adjacent-overload-signatures": "error", | |
"@typescript-eslint/ban-types": "error", | |
"@typescript-eslint/consistent-type-assertions": "error", | |
"@typescript-eslint/consistent-type-definitions": "error", | |
"@typescript-eslint/indent": "error", | |
"@typescript-eslint/interface-name-prefix": "off", | |
"@typescript-eslint/member-delimiter-style": [ | |
"off", | |
{ | |
"multiline": { | |
"delimiter": "semi", | |
"requireLast": true | |
}, | |
"singleline": { | |
"delimiter": "semi", | |
"requireLast": false | |
} | |
} | |
], | |
"@typescript-eslint/no-empty-function": "error", | |
"@typescript-eslint/no-explicit-any": "off", | |
"@typescript-eslint/no-inferrable-types": "error", | |
"@typescript-eslint/no-param-reassign": "error", | |
"@typescript-eslint/no-unnecessary-qualifier": "error", | |
"@typescript-eslint/prefer-for-of": "error", | |
"@typescript-eslint/prefer-namespace-keyword": "error", | |
"@typescript-eslint/prefer-readonly": "error", | |
"@typescript-eslint/restrict-plus-operands": "error", | |
"@typescript-eslint/semi": [ | |
"off", | |
"always" | |
], | |
"@typescript-eslint/strict-boolean-expressions": [ | |
"off", | |
{ | |
"allowNullable": true, | |
"ignoreRhs": true | |
} | |
], | |
"@typescript-eslint/unbound-method": "error", | |
"@typescript-eslint/unified-signatures": "error", | |
"arrow-body-style": [ | |
"error", | |
"always" | |
], | |
"camelcase": "off", | |
"class-methods-use-this": "error", | |
"complexity": [ | |
"error", | |
{ | |
"max": 20 | |
} | |
], | |
"curly": "error", | |
"dot-notation": "off", | |
"eol-last": "off", | |
"eqeqeq": [ | |
"error", | |
"always" | |
], | |
"guard-for-in": "error", | |
"id-blacklist": "off", | |
"id-match": "off", | |
"import/no-default-export": "error", | |
"import/no-deprecated": "error", | |
"max-len": [ | |
"off", | |
{ | |
"code": 140 | |
} | |
], | |
"no-bitwise": "error", | |
"no-caller": "error", | |
"no-console": [ | |
"error", | |
{ | |
"allow": [ | |
"log", | |
"warn", | |
"dir", | |
"timeLog", | |
"assert", | |
"clear", | |
"count", | |
"countReset", | |
"group", | |
"groupEnd", | |
"table", | |
"dirxml", | |
"error", | |
"groupCollapsed", | |
"Console", | |
"profile", | |
"profileEnd", | |
"timeStamp", | |
"context" | |
] | |
} | |
], | |
"no-debugger": "error", | |
"no-duplicate-imports": "off", | |
"no-empty": "error", | |
"no-eval": "error", | |
"no-new-wrappers": "error", | |
"no-redeclare": "error", | |
"no-restricted-imports": [ | |
"error", | |
"aws-sdk", | |
"funfix" | |
], | |
"no-sparse-arrays": "error", | |
"no-template-curly-in-string": "error", | |
"no-throw-literal": "error", | |
"no-trailing-spaces": "off", | |
"no-underscore-dangle": "off", | |
"no-unsafe-finally": "error", | |
"no-unused-labels": "error", | |
"no-var": "error", | |
"prefer-const": "error", | |
"prefer-template": "error", | |
"radix": "error", | |
"use-isnan": "error", | |
"@typescript-eslint/tslint/config": [ | |
"error", | |
{ | |
"rules": { | |
"no-inferred-empty-object-type": true, | |
"no-unnecessary-callback-wrapper": true, | |
"number-literal-format": true, | |
"one-line": [ | |
true, | |
"check-catch", | |
"check-else", | |
"check-whitespace" | |
], | |
"prefer-switch": [ | |
true, | |
{ | |
"min-cases": 2 | |
} | |
], | |
"prefer-while": true | |
} | |
} | |
] | |
} | |
}; |
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
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "no-inferred-empty-object-type"[39m | |
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "no-unnecessary-callback-wrapper"[39m | |
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "number-literal-format"[39m | |
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "one-line"[39m | |
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prefer-switch"[39m | |
[33mtslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prefer-while"[39m |
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
✨ 56 rules replaced with their ESLint equivalents. ✨ | |
❗ 4 ESLint rules behave differently from their TSLint counterparts ❗ | |
* no-console: | |
- Custom console methods, if they exist, will no longer be allowed. | |
* camelcase: | |
- Leading and trailing underscores (_) in variable names will now be ignored. | |
* no-underscore-dangle: | |
- Leading or trailing underscores (_) on identifiers will now be forbidden. | |
* @typescript-eslint/strict-boolean-expressions: | |
- String, number, enum, and mixed union types are now forbidden. | |
❓ 6 rules do not yet have ESLint equivalents ❓ | |
See generated log file; defaulting to eslint-plugin-tslint for these rules. | |
⚡ 2 packages are required for new ESLint rules. ⚡ | |
eslint-plugin-import | |
import |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment