eslint-config-hubside-2

1.2.0 • Public • Published

eslint-config-hubside

This package provides Hubside's extensible eslint config files.

Usage

Several config files are available in this package:

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.

  1. Install all peerDependencies listed in package.json

  2. Install eslint-config-airbnb-base if you're not using eslint-config-hubside/react, eslint-config-airbnb otherwise (see optionalDependencies listed in package.json)

  3. Add "extends": "hubside" to your .eslintrc

eslint-config-hubside/i18n

This brings extra config for projects with i18n json files.

  1. Install dependencies as described for the base config

  2. Install the following optional dependency: eslint-config-i18n-json

  3. Add "extends": ["hubside", "hubside/i18n"] to your .eslintrc

  4. As the error messages from eslint-config-i18n-json need a special formatter, you can use the re-export from eslint-config-hubside in the eslint --format option as follows :

eslint --ext .json --format node_modules/eslint-config-hubside/i18n-formatter.js

eslint-config-hubside/react

This brings extra config for react projects.

  1. Install dependencies as described for the base config

  2. Install the following optional dependencies: eslint-config-airbnb, eslint-plugin-react-hooks

  3. Add "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.

  1. Install dependencies as described for the base config

  2. Install the following optional dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser

  3. Add "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.

  1. Install dependencies as described for the base config

  2. Install the following optional dependency: eslint-plugin-jest

  3. Add "extends": ["hubside", "hubside/jest"] to your .eslintrc

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-hubside-2

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

9.44 kB

Total Files

9

Last publish

Collaborators

  • jerber