Recommended ESLint Shareable Config for TypeScript
@eslint-recommended/eslint-config-typescript
is using following configurations and plugins.
- eslint-config-love (fka eslint-config-standard-with-typescript)
- eslint-plugin-unicorn
- eslint-plugin-sonarjs
- @eslint-community/eslint-plugin-eslint-comments
- eslint-plugin-jsdoc
- eslint-plugin-tsdoc
- eslint-plugin-regexp
- Node.js v20 or later
- ESLint v8
npm:
npm i -D @eslint-recommended/eslint-config-typescript
Yarn:
yarn add -D @eslint-recommended/eslint-config-typescript
pnpm:
pnpm add -D @eslint-recommended/eslint-config-typescript
Add @eslint-recommended/typescript
to the extends
section of your ESLint configuration file.
JavaScript:
module.exports = {
extends: [
'@eslint-recommended/typescript'
// add other rulesets here if needed
]
}
YAML:
extends:
- @eslint-recommended/typescript
# add other rulesets here if needed
JSON:
{
"extends": [
"@eslint-recommended/typescript"
// add other rulesets here if needed
]
}
You can use below badge to show that your project is using ESLint Recommended.
Markdown:
[![ESLint Recommended](https://img.shields.io/badge/eslint-recommended-%234B32C3)](https://github.com/eslint-recommended)
HTML:
<a href="https://github.com/eslint-recommended"><img src="https://img.shields.io/badge/eslint-recommended-%234B32C3" alt="ESLint Recommended"></a>