@commerce7/eslint-config

1.1.6 • Public • Published

Commerce7 ESLint configuration

A shareable config used by all Commerce7 repositories.

How to use a configuration:

Append its identifier to the extends property of the ESLint configuration file:

  • @commerce7/eslint-config: to lint files used everywhere (extended by all configurations below)
  • @commerce7/eslint-config/node: to lint files executed in NodeJS
  • @commerce7/eslint-config/mocha: to lint files executed in Mocha
  • @commerce7/eslint-config/react: to lint files executed in React

For example, in a React application rendered server side and tested with Mocha:

// .eslintrc.js
module.exports = {
  extends: ["@commerce7/eslint-config"],
  overrides: [
    {
      files: ["*/**/*.test.js"],
      extends: [
        "@commerce7/eslint-config/node",
        "@commerce7/eslint-config/mocha",
      ],
    },
    {
      files: ["server/**/*.js"],
      extends: ["@commerce7/eslint-config/node"],
    },
    {
      files: ["src/**/*.js"],
      extends: ["@commerce7/eslint-config/react"],
    },
  ],
};

Readme

Keywords

Package Sidebar

Install

npm i @commerce7/eslint-config

Weekly Downloads

469

Version

1.1.6

License

ISC

Unpacked Size

7.23 kB

Total Files

13

Last publish

Collaborators

  • andrewkamphuis
  • jakehildyc7
  • jasoncommerce7