0.1.2 • Published 2 years ago

eslint-config-marcel v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm last build PRs Welcome

eslint-config-marcel

Personal ESLint settings, which can be (used by anyone)http://eslint.org/docs/developer-guide/shareable-configs.html.

Installation

$ npm i -D eslint eslint-config-marcel

Usage

Once the eslint-config-marcel package is installed, you can use it by specifying marcel 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": "marcel",
  "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 <srcFolder>",
    "lint:fix": "eslint --fix -c .eslintrc.js --ext .ts <srcFolder>"
  }
}

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": 2,
  "eslint.quiet": false,
  "eslint.workingDirectories": ["<srcFolder>"],
  "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 © Marcel Joachim Kloubert

Support

Or visit https://marcel.coffee