@jihyunlab/eslint-config
v2.0.8
Published
JihyunLab ESLint config for TypeScript.
Downloads
77
Readme
@jihyunlab/eslint-config
@jihyunlab/eslint-config provides ESLint config for TypeScript.
Installation
npm i --save-dev @jihyunlab/eslint-config eslint @eslint/js @types/eslint__js typescript typescript-eslint
Configuration
Configure ESLint
Create and edit the eslint.config.mjs file.
├─ eslint.config.mjs
└─ ...
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import { jihyunlabEslintConfig } from '@jihyunlab/eslint-config';
export default tsEslint.config(
{
ignores: ['node_modules', 'dist', 'build', 'coverage'],
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommendedTypeChecked,
jihyunlabEslintConfig,
],
}
);
Configure TypeScript for ESLint
Create and edit the tsconfig.eslint.json file.
├─ tsconfig.eslint.json
└─ ...
{
"extends": "./tsconfig.json",
"include": ["**/*.ts", "**/*.tsx", "**/*.cts", "**/*.mts"],
"exclude": ["node_modules", "dist", "build", "coverage"]
}
Credits
Authored and maintained by JihyunLab <[email protected]>
License
Open source licensed as MIT.