@egomobile/eslint-config-ego
v0.18.0
Published
ESLint shareable config for the e.GO style.
Downloads
7
Readme
eslint-config-ego
ESLint shareable config for the e.GO style guide
Installation
$ npm install --save-dev eslint @egomobile/eslint-config-ego
Usage
Once the eslint-config-ego
package is installed, you can use it by specifying ego
in the extends
section of your ESLint configuration.
Create a .eslintrc.js
file in the root folder of your project and use the following skeleton:
module.exports = {
"extends": "ego",
"rules": {
// Additional, per-project rules...
}
}
As optional feature, you can add script entry, called lint
e.g., to your package.json
:
{
"scripts": {
"lint": "eslint -c .eslintrc.js --ext .ts <mySrcFolder>"
}
}
Visual Studio Code
First install ESLint extension for Visual Studio Code by Dirk Baeumer.
Then setup your settings.json
inside your .vscode
subfolder by adding the following entries:
{
"editor.formatOnSave": true,
"editor.tabSize": 4,
"eslint.quiet": false,
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
To keep sure, to have the extension installed, create a extensions.json
file inside the same folder, if needed, and add the following entry as recommendation:
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
License
MIT © e.GO Mobile, Aachen, Germany