Quickstart
Using the @nhtio/eslint-config is simple and easy. Just follow the steps below:
Prerequisites
- Node.js version 22 or higher.
Installation
You can install @nhtio/eslint-config directly from your preferred package manager
sh
npm i @nhtio/eslint-config@latest -Dsh
pnpm add @nhtio/eslint-config@latest -Dsh
yarn add @nhtio/eslint-config@latest -DThen create the eslint configuration file at the root of your project:
javascript
import { recommended } from '@nhtio/eslint-config/recommended'
export default recommended;javascript
const recommended = require('@nhtio/eslint-config/recommended')
module.exports = recommended;Optionally, you can add the following to the scripts property of your package.json:
json
{
...
"scripts": {
...
"lint": "eslint .",
...
}
...
}Customization
If you would like to append custom rules to the configuration, you can use the configure function from the @nhtio/eslint-config package as follows:
javascript
import { configure } from '@nhtio/eslint-config'
export default configure(
// your rules here
);javascript
const configure = require('@nhtio/eslint-config')
module.exports = configure(
// your rules here
);