Skip to content

Instantly share code, notes, and snippets.

@patroza
Last active April 9, 2020 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patroza/75a38515057cdeb32b361208043ff275 to your computer and use it in GitHub Desktop.
Save patroza/75a38515057cdeb32b361208043ff275 to your computer and use it in GitHub Desktop.
ESLint for matechs-effect
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
}
}
]
}
};
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "no-inferred-empty-object-type"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "no-unnecessary-callback-wrapper"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "number-literal-format"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "one-line"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prefer-switch"
tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "prefer-while"
✨ 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