Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

egomobile/eslint-config-ego

This branch is 15 commits ahead of egodigital/eslint-config-ego:master.

Repository files navigation

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"
    ]
}

License

MIT © e.GO Mobile, Aachen, Germany

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%