eslint-config-ego

ESLint shareable config for the e.GO style

Usage no npm install needed!

<script type="module">
  import eslintConfigEgo from 'https://cdn.skypack.dev/eslint-config-ego';
</script>

README

eslint-config-ego

npm

ESLint shareable config for the e.GO style guide

Installation

$ npm install --save-dev eslint 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"
    ]
}

Migrate from TSLint

License

MIT © e.GO Digital GmbH, Aachen, Germany