Socket
Book a DemoInstallSign in
Socket

@bondsports/eslint-config

Package Overview
Dependencies
Maintainers
7
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bondsports/eslint-config

eslint configs for bond sports organization

latest
Source
npmnpm
Version
1.1.6
Version published
Maintainers
7
Created
Source

Bond Sports ESLint configs

A collection of ESlint configs for various frameworks and environments.

Available Configs

  • ts-base: base configurations for typescript.
  • react: rules for react (extends react-app).
  • jest: rules for jest.

Installation

$ npm install --save-dev eslint @bondsports/eslint-config

or

$ yarn add --dev eslint @bondsports/eslint-config

Usage

Add the configs you want to the extend section of your eslintConfig of your package.json, or to your .eslintrc configuration file.
Note: make sure to add ts-base last.

 "eslintConfig": {
    "extends": [
        "@bondsports/eslint-config/react",
        "@bondsports/eslint-config/ts-base"
      ]
  }

Then add the path to your TypeScript configuration file to the parserOptions

"eslintConfig": {
    "parserOptions": {
      "project": "./path/to/your/tsconfig.json"
    }
  }

Adding new Configs

Add a new file and name it as you would like. Inside export the ESLint configuration.

module.exports = {
  extends: ['plugin:jest/recommended', 'plugin:jest/style'],
  plugins: ['jest'],
  env: {
    'jest/globals': true,
  },
};

after you finished developing the config, make sure it works by using the --print-config flag of ESLint, in the project you use for testing.

$ npx eslint --print-config index.ts

Dont forget adding the config to this readme :blush:

Issues

If any linting error is appearing twice, or you have any other problem, please open an issue with all the details you have.

FAQs

Package last updated on 23 Apr 2023

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