@akqa-denmark/eslint-config-akqa-dk
v1.2.0
Published
AKQA Denmarks ESLint configs
Downloads
321
Keywords
Readme
@akqa-denmark/eslint-config-akqa-dk
Our recommended ESLint / prettier configurations.
Install
npm install -D @akqa-denmark/eslint-config-akqa-dk
Usage
Pick your flavour
We offer a few constellations of ESLint rules and configs depending on the type of project you are working with:
Base
The base ESLint configuration is for generic React projects (create-react-app
, and custom setups). It extends the following rule sets:
and adds the following plugins:
Next.js
The Next.js ESLint configuration extends on the Base configuration and adds the eslint-plugin-next
core-web-vitals
ruleset.
node.js
The node.js ESLint configuration is for, well what the name implies - node.js projects, it extends the following rule sets:
Setup
After installing and choosing your flavour, all you need to do is configure ESLint.
Add an .eslintrc.js
file to the root of your project / monorepo workspace:
module.exports = {
root: true,
extends: ["@akqa-denmark/akqa-dk"],
// or
// extends: ["@akqa-denmark/akqa-dk/nextjs"],
// extends: ["@akqa-denmark/akqa-dk/node"],
}
Add an .prettierrc.js
file to the root of your project / monorepo workspace:
const prettierConfig = require("@akqa-denmark/eslint-config-akqa-dk/prettier");
module.exports = {
...prettierConfig
};