Introduction
This package provides .eslintrc.json as an extensible shared config.
What is ESlint ?
ESLint => “Find and fix problems in your JavaScript code”
Installation
You do not need to install it by yourself as it is coming from @dana/tools-cli
package.
Configuration
Create a file named .eslintrc.json
in the root directory of your project with following json
{
"extends": [
"@dana"
]
}
Note
if you already have a .eslintrc.json
just add @dana
to the extends array or add the extends key to your json.
For particular configuration of eslint check here
You can create shortcuts to run linter in your package.json
.
{
"scripts": {
"lint": "wtv lint",
"lintdiff": "wtv lintdiff"
}
}
Usage
Run the following command
npm run lint
Plugins included as dependencies
eslint-config-wtv
βββ eslint
βββ eslint-plugin-disable-features (Contains rules to disable certain features)
βββ eslint-plugin-mocha (ESLint rules for mocha)
βββ eslint-plugin-wtv (ESLint rules for Dana)
βββ eslint-plugin-chai-expect (ESLint plugin that checks for common chai.js expect()
mistakes)