This package provides a unified set of ESLint and Prettier rules for all Wanadev's projects. Use this to ensure consistent code style and linting across your repositories.
- Install this package and its peer dependencies in your project:
npm install --save-dev @wanadev/lint eslint prettier
# Also install all required peer dependencies (see below)
- (Optional) Remove any existing
.eslintrc*
and.prettierrc*
files from your project to avoid conflicts.
- Create an
eslint.config.mjs
in your project root with the following content:
import config from '@wanadev/lint/eslint.config.mjs';
export default config;
- Run ESLint as usual:
npx eslint .
- Create a
.prettierrc
in your project root with:
"@wanadev/lint/.prettierrc"
Or, import/extend as needed.
- Run Prettier as usual:
npx prettier --check .
You must install all peer dependencies required by this config (see package.json
).
When this config is updated, update your dependency in each project:
npm update @wanadev/lint