0.0.16 • Published 12 months ago
@huenei/eslint v0.0.16

Extend ESLint Configuration
This guide explains how to extend an existing ESLint configuration in your project. By extending a shared or base configuration, you can standardize linting rules across multiple projects while still allowing for customizations.
Installation
npm install @huenei/eslintPrerequisites
Ensure you have the following installed:
- Node.js: Version 22.6.0 or later.
- npm or yarn: For managing dependencies.
- ESLint: Install locally in your project:
npm install eslint --save-devUsage
Customize ESLint Config file
Add the extended configuration to the config file.
eslint.config.js
import eslint from "@huenei/eslint"
/** @type {import('eslint').Linter.Config[]} */
export default [
...eslint,
]Run ESLint in your project
Add a script to your package.json:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}Then run
npm run lintCustomizing the Configuration
You can override or add specific rules or add more extensions to tailor the ESLint configuration to your project's needs. Place these overrides under the rules section in your .eslint.config.js file.
import eslint from "@huenei/eslint"
/** @type {import('eslint').Linter.Config[]} */
export default [
...eslint,
{
rules: {
indent: ["warn", 2], // Override rule
},
},
];