@algoan/eslint-config
v3.0.0
Published
Algoan ESLint configurations
Readme
Algoan ESLint config
Algoan ESLint configuration shared for NodeJS projects written in TypeScript and using prettier.
Requirements
- ESLint
>= 10(flat config only) - TypeScript
>= 4.8.4 < 6.1 - Prettier
>= 3 - Node.js
^20.19.0 || ^22.13.0 || >= 24
Installation
First, install this module running:
npm install @algoan/eslint-config --save-devThen, create an eslint.config.js file:
const algoan = require('@algoan/eslint-config');
module.exports = [...algoan];Or with ESM (eslint.config.mjs):
import algoan from '@algoan/eslint-config';
export default [...algoan];The configuration applies to .ts, .tsx, .mts and .cts files and expects a tsconfig.json at the root of your project (rules relying on type information use it). To point to another tsconfig, override parserOptions:
const algoan = require('@algoan/eslint-config');
module.exports = [
...algoan,
{
languageOptions: {
parserOptions: {
project: 'tsconfig.eslint.json',
},
},
},
];Usage
In your package.json file, add a script:
{
"lint": "eslint src"
}Migrating from v2
- The configuration is now an ESLint flat config array: replace your
.eslintrc.json("extends": "@algoan/eslint-config") with aneslint.config.jsfile as shown above. - ESLint
>= 10is required. - The
importrules are now provided byeslint-plugin-import-x, registered under the historicalimport/namespace: existing rule overrides such asimport/orderkeep working. - Some rules have been removed, replaced or renamed: see the release notes for the detailed list.
