New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bagaar/eslint-config

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bagaar/eslint-config

EsLint config for Bagaar projects.

0.6.10
latest
Source
npm
Version published
Maintainers
2
Created
Source

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.

Keywords

bagaar

FAQs

Package last updated on 04 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts