Skip to content

sladg/eslint-config-base

Repository files navigation

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",
      },
    ],
  },
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published