ESLint configuration for developers proficient in TypeScript.
This configuration comes with typescript-eslint
and eslint-stylistic
pre-configured.
Use eslint-stylistic
instead of prettier
for formatting. To learn more, visit the eslint-stylistic
guide.
The following versions of Node.js and TypeScript are required:
- Node.js 20 or higher
- TypeScript 4.7 or higher
This package is pure ESM, and you must configure your project to use the ESM package.
First, install the required packages.
npm install --save-dev eslint @eslint/js @types/eslint__js typescript typescript-eslint @stylistic/eslint-plugin @choi-jack/eslint-config
Next, create an eslint.config.js
config file in the root of your project, and populate it with the following:
// @ts-check
import base from '@choi-jack/eslint-config';
import tseslint from 'typescript-eslint';
export default tseslint.config(
...base,
{
// ...
},
// ...
);
Open a terminal to the root of your project and run the following command:
npx eslint .
ESLint will lint all TypeScript compatible files within the current folder, and will output the results to your terminal.
This guide is based on the following guide: https://typescript-eslint.io/getting-started/
Distributed under the MIT License. See the LICENSE file for more details.