This custom ESLint package provides a tailored set of linting rules designed to ensure code consistency, best practices, and enforceable style guides across all JavaScript and TypeScript projects within the Cliclack ecosystem.
- Node.js
- NPM (Node Package Manager) or yarn
Ensure both are installed on your machine before proceeding.
To install all the dependencies, run:
npm install @cliclack/config-eslint @eslint/compat @next/eslint-plugin-next @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-next eslint-config-prettier eslint-config-react eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh eslint-plugin-simple-import-sort prettier typescript --save-dev
The lint command is defined in the package.json file:
{
"scripts": {
"lint": "eslint --fix"
}
}
Add the following code to the eslint.config.mjs file
import base from "@cliclack/config-eslint/base";
export default [
...base,
{
ignores: ["node_modules/", "dist/"],
},
];
├── src
│ └── code.ts # The source code file
└── package.json # Project configuration and scripts
└── eslint.config.mjs # Project configuration and scripts
To lint the workspace run the following command
npm run lint
This project is licensed under the MIT License.
Marko Ramšak, Matija Ramšak, Biserka Zinreich