Shared ESLint configuration.
Use the following command to install @risedle/eslint-config
:
# npm
npm install --save-dev --save-exact eslint typescript @risedle/eslint-config@latest
# pnpm
pnpm add --save-dev --save-exact eslint typescript @risedle/eslint-config@latest
Add the following fields in your .eslintrc.js
:
module.exports = {
extends: ["@risedle/eslint-config"],
ignorePatterns: ["dist/*", ".eslintrc.js"],
};
Adjust the ignorePatterns
based on your project requirements.
Then add the following script in your package.json
:
{
"scripts": {
"lint": "eslint ."
}
}
You can use pnpm lint
or npm run lint
to run the linter.