1.6.0 • Published 4 years ago
eslint-config-ts-guard v1.6.0
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-nextandplugin:@typescript-eslint/recommended;ts-guard/ext- configuration for TypeScript-related type-aware rules; extendsts-guardandplugin:@typescript-eslint/recommended-requiring-type-checking; to use the configuration you should specifyparserOptions.projectin 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/testandguard/test-jest;ts-guard/test-mocha- appropriate for use in Mocha tests; extendsts-guard/testandguard/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-devIf you are going to use ts-guard/node you should install eslint-plugin-node:
npm install eslint-plugin-node --save-devIf 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-devIf you are going to use ts-guard/react you should install eslint-plugin-react:
npm install eslint-plugin-react --save-devUsage
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.