Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@equisoft/eslint-config-react

Package Overview
Dependencies
Maintainers
13
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equisoft/eslint-config-react

Equisoft's React ESLint config, based on eslint-config-airbnb

  • 2.0.0-alpha.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
249
increased by162.11%
Maintainers
13
Weekly downloads
 
Created
Source

Equisoft's ESLint configuration

This project hosts Equisoft's ESLint configuration for React projects.

The rules of this ESLint configuration uses AirBnB's packages, with some small overrides to make up Equisoft's flavor.

For Node projects, you should instead look at @equisoft/eslint-config which does not include React rules.

Versioning

The versioning of this project respects semver. That means your project's package.json can caret (^) import it.

Installation

Install the libraries in your project:

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

Then create a .eslintrc.json file that uses Equisoft's configuration:

{
  "extends": ["@equisoft/eslint-config-react"]
}

Finally create a script in your package.json to easily run ESLint:

{
  "scripts": {
    "eslint": "eslint src",
    "eslint:ci": "yarn eslint --format junit -o build/tests/eslint/junit.xml"
  }
}

Now you can use yarn eslint to validate the code style of your Javascript files!

Continuous Integration

We strongly suggest that you enforce code style checks on your CI. For example, on CircleCI you can add a configuration similar to this one to your .circleci/config.yml:

orbs:
  eq: equisoft/build-tools@latest

jobs:
  eslint:
    executor: node
    steps:
      - eq/with-yarn-cache
      - run:
          name: ESLint
          command: yarn eslint:ci
      - store_test_results:
          path: build/tests

Migrating an existing codebase

ESLint supports exclusion of globs in .eslintignore. One way to gradually migrate a legacy code base to this configuration is to exclude all source files and add conforming files one at a time. To achieve this, add this to your .eslintignore:

src/**/*.js
!src/contacts/**/*.js

Note how an entry prefixed by ! is added to re-include some source files.

For more information on this technique, you can read the ESLint documentation.

Keywords

FAQs

Package last updated on 23 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc