Skip to content

Recommended eslint rules, using TSLint and tslint-eslint-rules

License

Notifications You must be signed in to change notification settings

davidgg/tslint-eslint-rules-recommended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version dependencies total downloads License

tslint-eslint-rules-recommended

Recommended ESLint rules for tslint-eslint-rules. Inspired by ESLint Recommended rules eslint:recommended rules and tslint-eslint-rules project that ports most of them.

🤔 How to use?

Install the dependency

npm i tslint-eslint-rules-recommended --save-dev

Use it in your tslint.json file

{
  "extends": ["tslint-eslint-rules-recommended"]
}

🤓 Available rules

If you want, you can extend or modify the recommended rules:

{
  "extends": ["tslint-eslint-rules-recommended"],
  "rules": {
    "valid-typeof": false
  }
}

In addition to Palantir rules you can use tslint-eslint-rules.

Rules

✅ Recommended rules enabled (ESLint recommended rules) ✅

Rule Origin
no-cond-assign TSLint "no-conditional-assignment"
no-console TSLint "no-console"
no-constant-condition tslint-eslint-rules
no-control-regex tslint-eslint-rules
no-debugger TSLint "no-debugger"
no-duplicate-case tslint-eslint-rules
no-empty-character-class tslint-eslint-rules
no-empty TSLint "no-empty"
no-ex-assign tslint-eslint-rules
no-extra-boolean-cast tslint-eslint-rules
no-extra-semi tslint-eslint-rules
no-fallthrough TSLint "no-switch-case-fall-through"
no-inner-declarations tslint-eslint-rules
no-invalid-regexp tslint-eslint-rules
no-irregular-whitespace tslint-eslint-rules
no-mixed-spaces-and-tabs tslint-eslint-rules
no-redeclare TSLint "no-duplicate-variable"
no-regex-spaces tslint-eslint-rules
no-sparse-arrays tslint-eslint-rules
no-unsafe-finally TSLint "no-unsafe-finally"
no-unused-vars TSLint "no-unused-variable"
use-isnan TSLint "use-isnan"
valid-typeof tslint-eslint-rules
padded-blocks tslint-eslint-rules

You can add more ESLint rules using tslint-eslint-rules project ported rules.

🚫 Next rules are not currently available: 🚫

Rule Reason
constructor-super Not Applicable to TypeScript
for-direction Unavailable
getter-return Unavailable
no-case-declarations Unavailable
no-class-assign Unavailable
no-compare-neg-zero Unavailable
no-const-assign Not Applicable to TypeScript
no-delete-var Not Applicable to TypeScript
no-dupe-args Not Applicable to TypeScript
no-dupe-class-members Not Applicable to TypeScript
no-dupe-keys Not Applicable to TypeScript
no-empty-pattern Unavailable
no-func-assign Not Applicable to TypeScript
no-global-assign Unavailable
no-new-symbol Unavailable
no-obj-calls Not Applicable to TypeScript
no-octal Not Applicable to TypeScript
no-self-assign Unavailable
no-this-before-super Not Applicable to TypeScript
no-undef Not Applicable to TypeScript
no-unreachable Not Applicable to TypeScript
no-unsafe-negation Unavailable
no-unused-labels Unavailable
no-useless-escape Unavailable
require-yield Unavailable

🚧 TSLint Future Notice

TSLint is an active and updated project, but if you are into linters you should read TSLint in 2019 post to know more about the upcoming changes.

I'll continue the maintenance of this repo as long as TSLint is the main TypeScript linter.

License

MIT License - read LICENSE for full details.