Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.05 KB

README.md

File metadata and controls

68 lines (51 loc) · 1.05 KB

Eslint config

Opinionated configuration for eslint & prettier.

Usage

Install via npm:

npm install @sladg/eslint-config-base@latest --save-dev

Use latest to ensure you are always up-to-date with current configuration.

In your config file.

Next

In .eslintrc.js:

module.exports = {
  extends: ["@sladg/eslint-config-base/next"]
  rules: {
    "no-console": "off",
  },
}

Node

In .eslintrc.js:

module.exports = {
  extends: ["@sladg/eslint-config-base/node"]
  rules: {
    "no-console": "off",
  },
}

Prettier

Prettier is part of Eslint's configuration, see: https://github.com/prettier/eslint-plugin-prettier#options

You can configure it with prettier/prettier rule in your .eslintrc.js:

module.exports = {
  rules: {
    "prettier/prettier": [
      "error",
      {
        singleQuote: true,
        trailingComma: "all",
        arrowParens: "always",
      },
    ],
  },
}