eslint-config-ts-guard
v1.6.0
Published
ESLint configuration files (shareable configs) to guard from problems in different areas of JavaScript and TypeScript development.
Downloads
83
Maintainers
Readme
eslint-config-ts-guard
Set of configuration files (shareable configs) for ESLint to guard/protect from problems in different areas of JavaScript and TypeScript development.
Extends eslint-config-guard.
Includes:
ts-guard
- configuration for TypeScript-related rules; extendsguard/optimum-next
andplugin:@typescript-eslint/recommended
;ts-guard/ext
- configuration for TypeScript-related type-aware rules; extendsts-guard
andplugin:@typescript-eslint/recommended-requiring-type-checking
; to use the configuration you should specifyparserOptions.project
in ESLint config file (see details).ts-guard/test
- appropriate for use in tests (relaxes some rules from other configs); extendsguard/test
;ts-guard/test-jest
- appropriate for use in Jest tests; extendsts-guard/test
andguard/test-jest
;ts-guard/test-mocha
- appropriate for use in Mocha tests; extendsts-guard/test
andguard/test-mocha
.
The following files re-export corresponding configs from eslint-config-guard:
ts-guard/guard
- re-exportsguard
;ts-guard/editor
- re-exportsguard/editor
;ts-guard/esnext
- re-exportsguard/esnext
;ts-guard/ext-style
- re-exportsguard/ext-style
;ts-guard/indent
- re-exportsguard/indent
;ts-guard/jsdoc
- re-exportsguard/jsdoc
;ts-guard/no-prettier
- re-exportsguard/no-prettier
;ts-guard/node
- re-exportsguard/node
;ts-guard/optimum
- re-exportsguard/optimum
;ts-guard/optimum-next
- re-exportsguard/optimum-next
;ts-guard/proper-arrows
- re-exportsguard/proper-arrows
;ts-guard/react
- re-exportsguard/react
;ts-guard/style
- re-exportsguard/style
.
Installation
Besides eslint-config-ts-guard
you should install @typescript-eslint/eslint-plugin
:
npm install eslint-config-ts-guard @typescript-eslint/eslint-plugin --save-dev
If you are going to use ts-guard/node
you should install eslint-plugin-node
:
npm install eslint-plugin-node --save-dev
If you are going to use ts-guard/proper-arrows
you should install @getify/eslint-plugin-proper-arrows
:
npm install @getify/eslint-plugin-proper-arrows --save-dev
If you are going to use ts-guard/react
you should install eslint-plugin-react
:
npm install eslint-plugin-react --save-dev
Usage
In a .eslintrc.json
file:
{
"extends": [
"ts-guard",
"ts-guard/node"
]
}
In a package.json
:
{
"eslintConfig": {
"extends": [
"ts-guard/ext",
"ts-guard/proper-arrows",
"ts-guard/react"
]
}
}
License
Copyright (c) 2020-2021 Denis Sikuler
Licensed under the MIT license.