@vadistic/eslint-config
v0.6.4
Published
Personal @vadistic configs
Downloads
5,413
Maintainers
Readme
@vadisitc/eslint-config-base
Personal typescript eslint configs for node & react
- all-in-one
- grouped into nice presets
- easy to maintain
Installation
yarn add -D eslint
yarn add -D @vadistic/eslint-config
Base
@vadistic/eslint-config
or @vadistic/eslint-config/base
Includes:
/es2020
(project settings)/style
(basic eslint rules)/typescript
(basic typescript rules)/import
(plugin import)/jest
(plugin jest)/comments
(plugin eslint-comments)
Alternatively I can just import /es2020
or build config from scratch
All Presets
Presets are grouped configuration of plugins + recommended + my costom overrides
Basic:
@vadistic/eslint-config/es2020
=> configure parser for es2020@vadistic/eslint-config/base
=> basic default preset@vadistic/eslint-config/recommended
=> same as base but only recommended rules
Guidelines:
@vadistic/eslint-config/style
=>eslint
code style rules@vadistic/eslint-config/typescript
=>@typescript-eslint
code style rules
Formating:
@vadistic/eslint-config/prettier
=> enableeslint-plugin-prettier
&eslint-config-prettier
@vadistic/eslint-config/format
=> enable formatting rules (kinda prettier alternative)
Typechecking:
@vadistic/eslint-config/typecheck
=> enable@typescript-eslint
typechecking rules@vadistic/eslint-config/typecheck-off
=> disable all@typescript-eslint
typechecking rules
Plugins:
@vadistic/eslint-config/jsx-a11y
=> enableeslint-plugin-jsx-a11y
@vadistic/eslint-config/jsx-a11y-off
=> disable alleslint-plugin-jsx-a11y
(eg. for airbnb config)@vadistic/eslint-config/import
=> enableeslint-plugin-import
@vadistic/eslint-config/jest
=> enableeslint-plugin-jest
@vadistic/eslint-config/react
=> enableeslint-plugin-react
&eslint-plugin-react-hooks
@vadistic/eslint-config/preact
=> tweak react config for preact compatibility
Example
Default
// .eslintrc
{
"extends": ["@vadistic/eslint-config"]
}
With typechecking rules & prettier
// .eslintrc
{
"extends": [
"@vadistic/eslint-config",
"@vadistic/eslint-config/typecheck",
"@vadistic/eslint-config/prettier"
],
"parserOptions": {
"project": "./tsconfig.json"
}
}