ESLint config - @cuimingda/typescript
Installation
yarn add -D eslint @cuimingda/eslint-config-typescript
yarn add -D typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
Configuration
.eslintrc.js
Use @cuimingda/typescript
instead of plugin:@typescript-eslint/recommended
, it will enable all ESLint rules for Typescript.
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"@cuimingda/typescript",
],
overrides: [
{
files: ["*.ts"],
parserOptions: {
project: "./tsconfig.json",
},
},
]
};