eslint-config-awzzm-ts
v1.6.0
Published
An ESLint configuration for TypeScript
Downloads
36
Readme
TypeScript Configuration
You don't need to install the base configuration (eslint-config-awzzm
)
because this configuration extends it.
npm install --save-dev eslint-config-awzzm-ts
# or
yarn add -D eslint-config-awzzm-ts
Add it to your ESLint configuration:
{
"extends": ["awzzm-ts"] // or awzzm-ts/no-type-information
}
Linting with type information
For some rules, type information is required.
In order to provide this, you need to add two properties to your parserOptions
:
// .eslintrc.js
module.exports = {
// ...
parserOptions: {
tsConfigRootDir: __dirname, // Absolute path of your project's root directory
project: ["./tsconfig.json"] // Relative path of your project's tsconfig.json file
},
// ...
}