npm install -D -E @contentful/eslint-config-backend eslint
Add eslint.config.js
at your project root:
const contentfulBackend = require("@contentful/eslint-config-backend");
module.exports = [
contentfulBackend.default,
{
ignores: ["built", "node_modules"],
},
];
Or add the following, if you are using ES Modules:
import contentfulBackend from "@contentful/eslint-config-backend";
export default [
contentfulBackend,
// add your project specific rules here
{
rules: {
"no-unused-vars": "warn",
},
},
];
See src/index.ts for details.
The eslint-config-prettier
is applied at the end and disables all eslint rules that conflict with prettier.