Socket
Book a DemoInstallSign in
Socket

eslint-config-sbs

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-sbs

Side By Side JS ESLint config, following our styleguide

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
3
Maintainers
2
Weekly downloads
 
Created
Source

eslint-config-sbs

This package provides Side By Side .eslintrc as an extensible shared config.

Installation

  • Install the correct versions of each package, which are listed by the command:

    npm info "eslint-config-sbs@latest" peerDependencies
    

    If using npm 5+, use this shortcut

    npx install-peerdeps --dev eslint-config-sbs
    

    If using yarn, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly. Otherwise, run npm info "eslint-config-sbs@latest" peerDependencies to list the peer dependencies and versions, then run yarn add --dev <dependency>@<version> for each listed peer dependency.

Usage

We export two ESLint configurations for your usage.

eslint-config-sbs

Our default export contains all of our ESLint rules, including ECMAScript 6+, FlowJS and React.

It requires eslint, eslint-plugin-import, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-jsx-a11y, eslint-config-prettier eslint-plugin-compat and eslint-plugin-eslint-comments. If you don't need React, see eslint-config-sbs/base.

  • Add "extends": "sbs" to your .eslintrc.

For browser compatibility settings see https://github.com/amilajack/eslint-plugin-compat#3-configure-target-browsers

With Typescript:

Install @typescript-eslint/eslint-plugin, @typescript-eslint/parser and typescript

{
  "extends": ["sbs", "sbs/typescript"],
  "parserOptions": {
    "project": ["./tsconfig.json", "./packages/*/tsconfig.json"]
  }
}

eslint-config-sbs/base

Our default export contains all of our ESLint rules, including ECMAScript 6+ and FlowJS.

It requires eslint, eslint-config-prettier and eslint-plugin-import.

  • Add "extends": "sbs/base" to your .eslintrc

With Typescript:

Install @typescript-eslint/eslint-plugin, @typescript-eslint/parser and typescript

{
  "extends": ["sbs/base", "sbs/typescript"],
  "parserOptions": {
    "project": ["./tsconfig.json", "./packages/*/tsconfig.json"]
  }
}

eslint-config-sbs/script

Same as sbs/base but it allows require statements

It requires eslint, eslint-config-prettier and eslint-plugin-import.

  • Add "extends": "sbs/script" to your .eslintrc

Keywords

eslint

FAQs

Package last updated on 30 Oct 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.