@ethereumjs/eslint-config-defaults

Common linting configuration for EthereumJS libraries utilizing:

Usage no npm install needed!

<script type="module">
  import ethereumjsEslintConfigDefaults from 'https://cdn.skypack.dev/@ethereumjs/eslint-config-defaults';
</script>

README

@ethereumjs/eslint-config-defaults

Common linting configuration for EthereumJS libraries utilizing:

Exposed CLI commands:

  • ethereumjs-config-lint
  • ethereumjs-config-lint-fix

Usage

Add .eslintrc.js:

module.exports = {
  extends: "@ethereumjs/eslint-config-defaults"
}

Add prettier.config.js:

module.exports = require('@ethereumjs/eslint-config-defaults/prettier.config.js')

Use CLI commands above in your package.json:

  "scripts": {
    "lint": "ethereumjs-config-lint",
    "lint:fix": "ethereumjs-config-lint-fix",
  }

Getting the most out of linting

This lint package is used as git pre-push hook on EthereumJS VM repo, with the help of Husky.

Note: The name of this package deviates from the standard @ethereumjs/config-xxx, due to an ESLint hard rule on package naming. Reference.