npm.devtool.tech
👏 You can access tslint-config-eslint package with using tslintConfigEslint variable in browser devtools!
Yet another TSLint Configuration which disables all rules which has been handled by `eslint` or `@typescript-eslint`.

basic

package
Npm Version
Node Version

popularity

Star
Npm Weekly Downloads
Jsdeliver Month Downloads
Dependents Pkg
Dependents Repo

size

Code Size
Publish Size
Install Size
Minified Size
Gzip Size

quality

Open Issues
Tree Shaking Support
Type Support
Last Commit

health

Package health
Dependency Count
Outdated Dep
Vulnerablities

tslint-config-eslint

GitHub Workflow Status Codacy Grade type-coverage npm GitHub release

David Peer David David Dev

Conventional Commits JavaScript Style Guide Code Style: Prettier changesets

Yet another TSLint Configuration which disables all rules which has been handled by eslint, @typescript-eslint/eslint-plugin, eslint-plugin-sonarjs or eslint-plugin-sonar.

TSLint will be deprecated some time in 2019, but it has not been finished. So maybe you're using ESLint with it together, then it would be terrible to lint codes twice, especially for those rules which has equivalent rules from eslint, @typescript-eslint, eslint-plugin-sonarjs or eslint-plugin-sonar.

And also @angular-eslint for Angular.

You may tried something like tslint-to-eslint-config to help you to migrate, while this package/configuration will help you to use ESLint quickly without remove or refactor your original tslint.json heavily.

TOC

Usage

Install

# yarn
yarn add -D tslint-config-eslint

# npm
npm i -D tslint-config-eslint

Configuration

Basic config

For ESLint core and @typescript-eslint/eslint-plugin

{
  // put this config at the last, so it will take highest priority
  "extends": ["your original configs", "tslint-config-eslint"]
}

Additional configs

{
  "extends": [
    "your original configs",
    // if you're using tslint with `prettier`
    "tslint-config-eslint/prettier",
    // if you're using tslint with `eslint-plugin-sonarjs`
    "tslint-config-eslint/sonarjs",
    // if you're using tslint with `eslint-plugin-sonar`
    "tslint-config-eslint/sonar"
  ]
}

JS API

const {
  CORE_REPLACEMENTS,
  TS_REPLACEMENTS,
  SONARJS_REPLACEMENTS,
  SONAR_REPLACEMENTS,
} = require('tslint-config-eslint/rules')

Rules List

tslint core

old rulenew rule
no-for-inguard-for-in
no-param-reassignno-parameter-reassignment
ban-comma-operatorno-sequences
foringuard-for-in
function-constructorno-new-func
import-blacklistno-restricted-imports
label-positionno-extra-label
no-argno-caller
no-conditional-assignmentno-cond-assign
no-duplicate-superconstructor-super
no-duplicate-switch-caseno-duplicate-case
no-duplicate-variableno-redeclare
no-dupe-args
no-invalid-template-stringsno-template-curly-in-string
no-shadowed-variableno-shadow
no-string-throwno-throw-literal
no-submodule-importsno-restricted-imports
no-switch-case-fall-throughno-fallthrough
no-unused-expressionno-unused-expressions
no-var-keywordno-var
prefer-conditional-expressionno-cond-assign
switch-defaultdefault-case
triple-equalseqeqeq
typeof-comparevalid-typeof
completed-docsvalid-jsdoc
cyclomatic-complexitycomplexity
max-file-line-countmax-lines
object-literal-sort-keyssort-keys
object-literal-key-quotesquote-props
object-literal-shorthandobject-shorthand
one-variable-per-declarationone-var
prefer-default-lastdefault-case-last
prefer-function-over-methodclass-methods-use-this
space-within-parensspace-in-parens
unnecessary-elseno-else-return
max-line-lengthmax-len
no-consecutive-blank-linesno-multiple-empty-lines
no-trailing-whitespaceno-trailing-spaces
quotemarkquotes
trailing-commacomma-dangle
curlycurly
no-bitwiseno-bitwise
no-consoleno-console
no-emptyno-empty
no-evalno-eval
no-invalid-thisno-invalid-this
no-restricted-globalsno-restricted-globals
no-return-awaitno-return-await
no-sparse-arraysno-sparse-arrays
no-unsafe-finallyno-unsafe-finally
prefer-object-spreadprefer-object-spread
radixradix
max-classes-per-filemax-classes-per-file
no-duplicate-importsno-duplicate-imports
no-magic-numbers@typescript-eslint/no-magic-numbers
prefer-constprefer-const
newline-per-chained-callnewline-per-chained-call
prefer-templateprefer-template
space-before-function-parenspace-before-function-paren
arrow-parensarrow-parens
indentindent
linebreak-stylelinebreak-style
newline-before-returnnewline-before-return
new-parensnew-parens
no-irregular-whitespaceno-irregular-whitespace
use-isnanuse-isnan
await-promise@typescript-eslint/await-thenable
class-name@typescript-eslint/class-name-casing
no-angle-bracket-type-assertion@typescript-eslint/consistent-type-assertions
no-object-literal-type-assertion@typescript-eslint/consistent-type-assertions
interface-over-type-literal@typescript-eslint/consistent-type-definitions
@typescript-eslint/no-type-alias
member-access@typescript-eslint/explicit-member-accessibility
interface-name@typescript-eslint/interface-name-prefix
no-any@typescript-eslint/no-explicit-any
no-floating-promises@typescript-eslint/no-floating-promises
@typescript-eslint/no-misused-promises
no-unnecessary-class@typescript-eslint/no-extraneous-class
no-this-assignment@typescript-eslint/no-this-alias
use-default-type-parameter@typescript-eslint/no-unnecessary-type-arguments
no-unused-variable@typescript-eslint/no-unused-vars
no-use-before-declare@typescript-eslint/no-use-before-define
unnecessary-constructor@typescript-eslint/no-useless-constructor
callable-types@typescript-eslint/prefer-function-type
no-internal-module@typescript-eslint/prefer-namespace-keyword
no-async-without-await@typescript-eslint/require-await
semicolon@typescript-eslint/semi
no-reference@typescript-eslint/triple-slash-reference
no-reference-import@typescript-eslint/triple-slash-reference
typedef-whitespace@typescript-eslint/type-annotation-spacing
no-unbound-method@typescript-eslint/unbound-method
adjacent-overload-signatures@typescript-eslint/adjacent-overload-signatures
array-type@typescript-eslint/array-type
ban-ts-ignore@typescript-eslint/ban-ts-ignore
ban-types@typescript-eslint/ban-types
member-ordering@typescript-eslint/member-ordering
no-empty-interface@typescript-eslint/no-empty-interface
no-for-in-array@typescript-eslint/no-for-in-array
no-inferrable-types@typescript-eslint/no-inferrable-types
no-misused-new@typescript-eslint/no-misused-new
no-namespace@typescript-eslint/no-namespace
no-non-null-assertion@typescript-eslint/no-non-null-assertion
no-parameter-properties@typescript-eslint/no-parameter-properties
no-require-imports@typescript-eslint/no-require-imports
no-unnecessary-qualifier@typescript-eslint/no-unnecessary-qualifier
no-unnecessary-type-assertion@typescript-eslint/no-unnecessary-type-assertion
no-var-requires@typescript-eslint/no-var-requires
prefer-for-of@typescript-eslint/prefer-for-of
prefer-readonly@typescript-eslint/prefer-readonly
promise-function-async@typescript-eslint/promise-function-async
restrict-plus-operands@typescript-eslint/restrict-plus-operands
strict-boolean-expressions@typescript-eslint/strict-boolean-expressions
typedef@typescript-eslint/typedef
unified-signatures@typescript-eslint/unified-signatures

tslint-sonarts

old rulenew rule
no-big-functionsonar/sonar-max-lines-per-function
no-empty-destructuringno-empty-pattern
no-empty-nested-blocksno-empty
no-multiline-string-literalsno-multi-str
no-self-assignmentno-self-assign
no-statements-same-lineno-same-line-conditional
no-unconditional-jumpno-redundant-jump
no-unused-arrayno-unused-collection
parameters-max-numbermax-params
prefer-optionalno-redundant-optional
consecutive-overloads@typescript-eslint/adjacent-overload-signatures
no-useless-cast@typescript-eslint/no-unnecessary-type-assertion
no-extra-semicolonno-extra-semi
@typescript-eslint/no-extra-semi
no-all-duplicated-branchessonarjs/no-all-duplicated-branches
cognitive-complexitysonarjs/cognitive-complexity
max-switch-casessonarjs/max-switch-cases
no-collapsible-ifsonarjs/no-collapsible-if
no-collection-size-mischecksonarjs/no-collection-size-mischeck
no-duplicate-stringsonarjs/no-duplicate-string
no-duplicated-branchessonarjs/no-duplicated-branches
no-element-overwritesonarjs/no-element-overwrite
no-gratuitous-expressionssonar/no-gratuitous-expressions
no-identical-conditionssonarjs/no-identical-conditions
no-identical-expressionssonarjs/no-identical-expressions
no-identical-functionssonarjs/no-identical-functions
no-inverted-boolean-checksonarjs/no-inverted-boolean-check
no-redundant-booleansonarjs/no-redundant-boolean
no-redundant-jumpsonarjs/no-redundant-jump
no-small-switchsonarjs/no-small-switch
no-same-line-conditionalsonarjs/no-same-line-conditional
no-use-of-empty-return-valuesonarjs/no-use-of-empty-return-value
no-useless-catchsonarjs/no-useless-catch
prefer-immediate-returnsonarjs/prefer-immediate-return
prefer-promise-shorthandsonarjs/prefer-promise-shorthand
prefer-type-guardsonarjs/prefer-type-guard
mccabe-complexitysonar/cyclomatic-complexity
no-empty-arraysonar/no-empty-collection
no-ignored-initial-valuesonar/no-parameter-reassignment
no-inconsistent-returnsonar/no-inconsistent-returns
no-invariant-returnsonar/no-invariant-returns
no-misspelled-operatorsonar/non-existent-operator
use-primitive-typesonar/no-primitive-wrappers
arguments-ordersonar/arguments-order
bool-param-defaultsonar/bool-param-default
deprecationsonar/deprecation
max-union-sizesonar/max-union-size
no-accessor-field-mismatchsonar/no-accessor-field-mismatch
no-alphabetical-sortsonar/no-alphabetical-sort
no-array-deletesonar/no-array-delete
no-commented-codesonar/no-commented-code
no-dead-storesonar/no-dead-store
no-duplicate-in-compositesonar/no-duplicate-in-composite
no-hardcoded-credentialssonar/no-hardcoded-credentials
no-ignored-returnsonar/no-ignored-return
no-in-misusesonar/no-in-misuse
no-invalid-awaitsonar/no-invalid-await
no-misleading-array-reversesonar/no-misleading-array-reverse
no-nested-incdecsonar/no-nested-incdec
no-nested-switchsonar/no-nested-switch
no-nested-template-literalssonar/no-nested-template-literals
no-redundant-parenthesessonar/no-redundant-parentheses
no-return-type-anysonar/no-return-type-any
no-try-promisesonar/no-try-promise
no-undefined-argumentsonar/no-undefined-argument
no-unenclosed-multiline-blocksonar/no-unenclosed-multiline-block
no-unthrown-errorsonar/no-unthrown-error
no-useless-incrementsonar/no-useless-increment
no-useless-intersectionsonar/no-useless-intersection
no-variable-usage-before-declarationsonar/no-variable-usage-before-declaration
use-type-aliassonar/use-type-alias

codelyzer

old rulenew rule
template-accessibility-alt-text@angular-eslint/template/accessibility-alt-text
template-accessibility-elements-content@angular-eslint/template/accessibility-elements-content
template-accessibility-label-for@angular-eslint/template/accessibility-label-for
template-accessibility-tabindex-no-positive@angular-eslint/template/accessibility-tabindex-no-positive
template-accessibility-table-scope@angular-eslint/template/accessibility-table-scope
template-accessibility-valid-aria@angular-eslint/template/accessibility-valid-aria
template-banana-in-box@angular-eslint/template/banana-in-box
template-click-events-have-key-events@angular-eslint/template/click-events-have-key-events
template-conditional-complexity@angular-eslint/template/conditional-complexity
template-cyclomatic-complexity@angular-eslint/template/cyclomatic-complexity
template-i18n@angular-eslint/template/i18n
template-mouse-events-have-key-events@angular-eslint/template/mouse-events-have-key-events
template-no-any@angular-eslint/template/no-any
template-no-autofocus@angular-eslint/template/no-autofocus
template-no-call-expression@angular-eslint/template/no-call-expression
template-no-distracting-elements@angular-eslint/template/no-distracting-elements
template-no-negated-async@angular-eslint/template/no-negated-async
template-use-track-by-function@angular-eslint/template/use-track-by-function
import-destructuring-spacingobject-curly-spacing
use-pipe-decoratorN/A
component-class-suffix@angular-eslint/component-class-suffix
component-max-inline-declarations@angular-eslint/component-max-inline-declarations
component-selector@angular-eslint/component-selector
contextual-decorator@angular-eslint/contextual-decorator
contextual-lifecycle@angular-eslint/contextual-lifecycle
directive-class-suffix@angular-eslint/directive-class-suffix
directive-selector@angular-eslint/directive-selector
no-attribute-decorator@angular-eslint/no-attribute-decorator
no-conflicting-lifecycle@angular-eslint/no-conflicting-lifecycle
no-forward-ref@angular-eslint/no-forward-ref
no-host-metadata-property@angular-eslint/no-host-metadata-property
no-input-prefix@angular-eslint/no-input-prefix
no-input-rename@angular-eslint/no-input-rename
no-inputs-metadata-property@angular-eslint/no-inputs-metadata-property
no-lifecycle-call@angular-eslint/no-lifecycle-call
no-output-native@angular-eslint/no-output-native
no-output-on-prefix@angular-eslint/no-output-on-prefix
no-output-rename@angular-eslint/no-output-rename
no-outputs-metadata-property@angular-eslint/no-outputs-metadata-property
no-pipe-impure@angular-eslint/no-pipe-impure
no-queries-metadata-property@angular-eslint/no-queries-metadata-property
pipe-prefix@angular-eslint/pipe-prefix
prefer-on-push-component-change-detection@angular-eslint/prefer-on-push-component-change-detection
prefer-output-readonly@angular-eslint/prefer-output-readonly
relative-url-prefix@angular-eslint/relative-url-prefix
use-component-selector@angular-eslint/use-component-selector
use-component-view-encapsulation@angular-eslint/use-component-view-encapsulation
use-injectable-provided-in@angular-eslint/use-injectable-provided-in
use-lifecycle-interface@angular-eslint/use-lifecycle-interface
use-pipe-transform-interface@angular-eslint/use-pipe-transform-interface

ng-tslint

old rulenew rule
member-naming@typescript-eslint/naming-convention

Forthcoming

Forthcoming configs include:

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT © JounQin@1stG.me