Super Evil TSLint Config Airbnb
A super evil TSLint config for the Airbnb JavaScript Style Guide
This project started as a hard-fork of the tslint-config-airbnb nodejs package, because it lacked some rules and wasn't as strict as Ströer Digital Publishing GmbH wanted it to be.
Rules
For a complete overview of all rules that are applied/enforced by this package, see Rules.md.
Prerequisites
- yarn or npm
- typescript
Exclusions
.d.ts
Files ending with This library excludes all *.d.ts
files from getting linted,
because we usually generate them using third-party-tools.
package.json in root directory
The package.json
file which is located in your project's root directory won't
be linted aswell, because it's usually generated by either npm
or yarn
.
Common pitfalls
tslint.json
configuration file
Using a different Make sure that you're using the exact same TSLint configuration file as described.
.editorconfig
file
Using an If you're using an .editorconfig
file, make sure it applies the same rules
that are part of this package.
Using webpack
If you're using an webpack
, make sure that the configuration file(s) for
webpack don't interfere with the rules that are applied/enforced by this
package.
Check the tslint-loader
section of your webpack config, if you happen to use
linters with webpack.
Installation
You can either install it via yarn (the preferred way), or with npm.
With yarn
yarn add --dev @superevilmegaco/superevil-tslint-config-airbnb
With npm
npm install --save-dev @superevilmegaco/superevil-tslint-config-airbnb
TSLint configuration
Simply put this into your tslint.json
configuration file:
{
"defaultSeverity": "error",
"extends": "@superevilmegaco/superevil-tslint-config-airbnb",
"jsRules": {},
"rules": {}
}
Visual Studio Code
In Visual Studio Code, press
CTRL + SHIFT + P,
then enter Extensions: Install Extensions
and search for TSLint
.
Select the TSLint Plugin and install it.
After the installation completes, reload the IDE.