This project hosts Equisoft's ESLint configuration for TypeScript. It is versatile enough to be used with NodeJS or Web projects.
When using frameworks or libraries, you can augment it with the use of flavors, such as @equisoft/eslint-config-typescript-react.
The versioning of this project respects semver.
That means your project's package.json can caret (^
) import it.
Install the prerequisites.
Install the libraries in your project:
yarn add --dev @equisoft/eslint-config-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript
Then create a .eslintrc.json
file that uses Equisoft's configuration:
{
"extends": ["@equisoft/eslint-config-typescript"]
}
Finally create a script in your package.json
to easily run ESLint:
{
"scripts": {
"eslint": "eslint src",
"eslint:ci": "yarn eslint"
}
}
Now you can use yarn eslint
to validate the code style of your TypeScript files!
See here.
See here.