eslint-config-hubside-2 v1.2.0
eslint-config-hubside
This package provides Hubside's extensible eslint config files.
Usage
Several config files are available in this package:
eslint-config-hubsideeslint-config-hubside/i18neslint-config-hubside/reacteslint-config-hubside/typescripteslint-config-hubside/typescript-migrationeslint-config-hubside/jest
The first one is the base required config in order to use any of the other configs.
The other ones are "pluggable" configs, so you can choose the one(s) you need and combine them. If your project uses Typescript however, either choose typescript or typescript-migration.
You'll find eslint-config-hubside/i18n-formatter too, a re-export for eslint-plugin-i18n-json's eslint formatter.
eslint-config-hubside
This is the base config. It is required in order to use any of the other hubside eslint configs. Make sure you put it before the others in your config file extends field.
Install all
peerDependencieslisted inpackage.jsonInstall
eslint-config-airbnb-baseif you're not usingeslint-config-hubside/react,eslint-config-airbnbotherwise (seeoptionalDependencieslisted inpackage.json)Add
"extends": "hubside"to your.eslintrc
eslint-config-hubside/i18n
This brings extra config for projects with i18n json files.
Install dependencies as described for the base config
Install the following optional dependency:
eslint-config-i18n-jsonAdd
"extends": ["hubside", "hubside/i18n"]to your.eslintrcAs the error messages from
eslint-config-i18n-jsonneed a special formatter, you can use the re-export fromeslint-config-hubsidein the eslint--formatoption as follows :
eslint --ext .json --format node_modules/eslint-config-hubside/i18n-formatter.jseslint-config-hubside/react
This brings extra config for react projects.
Install dependencies as described for the base config
Install the following optional dependencies:
eslint-config-airbnb,eslint-plugin-react-hooksAdd
"extends": ["hubside", "hubside/react"]to your.eslintrc
eslint-config-hubside/typescript
Use this config in a Typescript project. If your project is migrating to Typescript but is not quite fully migrated yet, use eslint-config-hubside/typescript-migration instead.
Install dependencies as described for the base config
Install the following optional dependencies:
@typescript-eslint/eslint-plugin,@typescript-eslint/parserAdd
"extends": ["hubside", "hubside/typescript"]to your.eslintrc
eslint-config-hubside/typescript-migration
Use this config in a project which is being migrated to Typescript but is not fully migrated yet. If your project is already fully written in Typescript, use eslint-config-hubside/typescript instead.
To use this config, do everything as described for eslint-config-hubside/typescript, but add "extends": ["hubside", "hubside/typescript-migration"] to your .eslintrc instead.
eslint-config-hubside/jest
Use this config for a project that uses Jest. This is basically a wrapper for eslint-plugin-jest's recommended config.
Install dependencies as described for the base config
Install the following optional dependency:
eslint-plugin-jestAdd
"extends": ["hubside", "hubside/jest"]to your.eslintrc