JSPM

  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q59135F
  • License MIT

ESLint config used in Bedrock Streaming's React projects

Package Exports

  • @bedrockstreaming/eslint-config-react
  • @bedrockstreaming/eslint-config-react/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bedrockstreaming/eslint-config-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@bedrockstreaming/eslint-config-react

The purpose of this package is simple, simplify the configuration of eslint and prettier in our projects.

It provides:

With that come some little changes from the default config of eslint-config-airbnb and prettier that you can find in index.js file and [here].

Setup

npm install --dev @bedrockstreaming/eslint-config-react

or

yarn add --dev @bedrockstreaming/eslint-config-react

Then you need to add the config in the .eslintrc file of your project. For that create a .eslintrc and add the following lines:

{
  "extends": "@bedrockstreaming/eslint-config-react"
}

And that's all.

If you want to customize some rules, follow the eslint documentation.

Jest / Jasmine Support

If you want, you can add the jest support with the following lines:

{
  "env": {
    "browser": true,
    "jasmine": true
  }
}

Usage

Lint your code:

yarn eslint src/

Rewrite your code, the right way 😈:

yarn prettier-eslint -- --write 'src/**/*.js'

here