1.0.1 • Published 1 year ago

@la-ots/eslint-config v1.0.1

Weekly downloads
-
License
CC0-1.0
Repository
github
Last release
1 year ago

@la-ots/eslint-config

Standard rules for Javascript using ESLint implemented as a common configuration.

Installation

npm install --save-dev @la-ots/eslint-config

Configure settings

Create .eslintrc.js file with the following content:

module.exports = {
  extends: "@la-ots/eslint-config",
  rules: {
    // add any overrides if required
  },
};

Using with Prettier

If you're using this plugin with Prettier, add "prettier" at the end of your extends list:

module.exports = {
  extends: ["@la-ots/eslint-config", "prettier"],
  rules: {
    // add any overrides if required
  },
};

Running linters

Add the following scripts to your package.json:

{
  "scripts": {
    "lint:js": "eslint **/*.js",
    "lint:js:fix": "eslint **/*.js --fix"
  }
}

Execute scripts:

npm run lint:js