@chainsafe/eslint-config

2.2.4 • Public • Published

@chainsafe/eslint-config

Node.js CI npm version

This package provides ChainSafe's .eslintrc as an extensible shared config.

Usage

The provided configuration contains shared ESLint rules for typescript projects across ChainSafe. To use this configuration you'll need .eslintrc.js file in your project root with the following content:

module.exports = {
  extends: "@chainsafe",
}

Monorepo

To make eslint work in monorepo's, make sure tsconfig files are relative to the eslint file. Base eslint file in the root directory should have root: true option set. For example in the package, you would have something like:

const path = require("path")

module.exports = {
    extends: "../../.eslintrc.js",
    parserOptions: {
        project: path.join(__dirname, "tsconfig.json"),
        tsconfigRootDir: path.join(__dirname)
    },
}

With Mocha and Chai

module.exports = {
  extends: "@chainsafe/eslint-config/ts-mocha-chai",
}

Frontend Vanilla

module.exports = {
  extends: "@chainsafe/eslint-config/frontend-vanilla"
}

Frontend React

module.exports = {
  extends: "@chainsafe/eslint-config/frontend-react"
}

Readme

Keywords

none

Package Sidebar

Install

npm i @chainsafe/eslint-config

Weekly Downloads

118

Version

2.2.4

License

MIT

Unpacked Size

31.9 kB

Total Files

16

Last publish

Collaborators

  • wemeetagain
  • mpetrunic