0.6.10 • Published 2 months ago

@bagaar/eslint-config v0.6.10

Weekly downloads
1
License
MIT
Repository
github
Last release
2 months ago

Bagaar EsLint Config

Bagaar Logo

@bagaar/eslint-config is built and maintained by Bagaar.

NPM Version Conventional Commits

EsLint config for Bagaar projects.

Table of Contents

Installation

NPM

npm install @bagaar/eslint-config --save-dev

Yarn

yarn add @bagaar/eslint-config --dev

pnpm

pnpm add @bagaar/eslint-config --save-dev

Usage

Extend your local config with the default export of @bagaar/eslint-config:.

// .eslintrc.js

const config = require('@bagaar/eslint-config');

module.exports = {
  ...config,
  root: true,
};

The config value here is just a plain JS object so it can be customised at will. The config will contain different rules based on which dependencies are present, all peerdependencies are therefore optional.

If you want to extend instead of override a property, be sure to spread the original values as well, for example:

// .eslintrc.js

const config = require('@bagaar/eslint-config');

module.exports = {
  ...config,
  root: true,
  overrides: [
    ...config.overrides,
    {
      files: ['./index.js'],
      rules: {
        "no-console": 'off',
      }
    },
  ]
};

To print out the generated config to the console, set the env var DEBUG=true. e.g.:

// package.json
...
  "scripts": {
    "lint": "eslint . --cache",
    "lint:debug": "DEBUG=true eslint .",
  },
...

License

This project is licensed under the MIT License.

0.6.10

2 months ago

0.6.9

2 months ago

0.6.8

2 months ago

0.6.7

3 months ago

0.6.6

3 months ago

0.6.5

3 months ago

0.6.4

3 months ago

0.6.3

3 months ago

0.6.2

3 months ago

0.6.1

4 months ago

0.6.0

4 months ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

6 years ago