Install the eslint-plugin-davinci package as a devDependency by running pnpm add -D @davincihealthcare/eslint-plugin-davinci
In the eslint configuration file (e.g: .eslintrc.js
) paste the following:
/** @type {import("eslint").Linter.Config} */
(
module.exports = {
root: true,
extends: [
'plugin:@davincihealthcare/davinci/recommended',
],
}
);
If you're using Turbo monorepo, add the following string to the extends
array: 'eslint-config-turbo'
In the scripts
section of the package.json
add a lint
script containing the following: "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"