@octetstream/eslint-config
AirBnb-based ESlint config, tweaked for my needs.
Last updated 4 years ago by octetstream .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @octetstream/eslint-config 
SYNC missed versions from official npm registry.

@octetstream/eslint-config

AirBnb-based ESlint config, tweaked for my needs.

Installation

pnpm add --dev @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

Current Tags

  • 6.0.2                                ...           latest (4 years ago)

13 Versions

  • 6.0.2                                ...           4 years ago
  • 6.0.1                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 5.0.0                                ...           5 years ago
  • 4.0.0                                ...           7 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.0                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.2                                ...           9 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |