Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jihyunlab/eslint-config

JihyunLab ESLint config for TypeScript.
https://github.com/jihyunlab/eslint-config

eslint eslint-config typescript

Last synced: about 1 month ago
JSON representation

JihyunLab ESLint config for TypeScript.

Awesome Lists containing this project

README

        

# @jihyunlab/eslint-config

[![Version](https://img.shields.io/npm/v/@jihyunlab/eslint-config.svg?style=flat-square)](https://www.npmjs.com/package/@jihyunlab/eslint-config?activeTab=versions) [![Downloads](https://img.shields.io/npm/dt/@jihyunlab/eslint-config.svg?style=flat-square)](https://www.npmjs.com/package/@jihyunlab/eslint-config) [![Last commit](https://img.shields.io/github/last-commit/jihyunlab/eslint-config.svg?style=flat-square)](https://github.com/jihyunlab/eslint-config/graphs/commit-activity) [![License](https://img.shields.io/github/license/jihyunlab/eslint-config.svg?style=flat-square)](https://github.com/jihyunlab/eslint-config/blob/master/LICENSE) [![Linter](https://img.shields.io/badge/linter-eslint-blue?style=flat-square)](https://eslint.org) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\
[![Build](https://github.com/jihyunlab/eslint-config/actions/workflows/build.yml/badge.svg)](https://github.com/jihyunlab/eslint-config/actions/workflows/build.yml) [![Lint](https://github.com/jihyunlab/eslint-config/actions/workflows/lint.yml/badge.svg)](https://github.com/jihyunlab/eslint-config/actions/workflows/lint.yml) [![Prettier](https://github.com/jihyunlab/eslint-config/actions/workflows/prettier.yml/badge.svg)](https://github.com/jihyunlab/eslint-config/actions/workflows/prettier.yml)

@jihyunlab/eslint-config provides ESLint config for TypeScript.

## Installation

```bash
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 <>

## License

Open source [licensed as MIT](https://github.com/jihyunlab/eslint-config/blob/master/LICENSE).