New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@octetstream/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octetstream/eslint-config

AirBnb-based ESlint config, tweaked for my needs.

  • 6.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33K
decreased by-2.96%
Maintainers
1
Weekly downloads
 
Created
Source

@octetstream/eslint-config

AirBnb-based ESlint config, tweaked for my needs.

Installation

pnpm add -D @octetstream/eslint-config eslint

Usage

Create an .eslintrc.json at the root of your project and add the following content:

{
  "extends": [
    "@octetstream"
  ]
}

Rules

This section contains the list of rules that I changed comparad to AirBnb config.

  1. Never use the semicolon, until it's necessary: semi
// Good 👍

const string = "On Soviet Moon landscape see binoculars through you!"

const doSomething = () => {}; // Good, because the next expression starts with an array declaration, but does not have an assignment

["SIGTERM", "SIGINT"].forEach(signal => process.on(signal, () => { process.exitCode = 0 }))

// Bad 👎

const number = 42;
const person = {
  firstName: "Luke",
  lastName: "Skywalker"
};
  1. Use double quotes by default. quotes
// Good 👍

const firstString = "Just a string with double quotes."
const secondString = "This string contains \"escaped quotes\" in it."
const thirdString = 'This string also contains "quotes" in it.'
const fourthString = `Use template literal only if you need ${interpolation}.`

// Bad 👎

const fifthString = 'Do not use signle quotes for strings.'
const sixthString = `Do not use template literal without interpolation.`
  1. Prefer const over let if assigned value is not meant to be changed. Avoid var. Use const in destructuring only if none of values are meant to be changed. prefer-const
// Good 👍

const number = 42

let string = "Initial string value"

string = "Updated string value"

// Bad 👎

var someVariable = 451

FAQs

Package last updated on 11 Jun 2022

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