eslint-config-profiscience

7.0.1 • Public • Published

eslint-config-profiscience

Basic Rules

  • no semicolons
  • 2 spaces
  • single-quotes
  • strict mode
  • always use braces
  • prefer arrow functions
  • use const and let, prefer const
  • use === and !==
  • no magic numbers (excluding -1 through 2)
  • use object shorthand
  • use destructuring

Functions

Named functions

  • no space after function name
  • 1 space after function parens
function foo(bar, baz) {
  // do work
}

Anonymous (Arrow) Functions

  • 1 space before and after arrow
  • no superfluous return
// good
const foo = (bar, baz) => foo + bar
const foo = (bar, baz) => ({ bar, baz })

// bad
const foo = (bar, baz) => {
  return foo + bar
}
const foo = (bar, baz) => {
  return { bar, baz }
}

Function Chains

Function chains longer than 3 should be broken onto new lines

// good
_(foos)
  .map(transformFoos)
  .filter(applyFilter)
  .value()
_(foos)
  .map(transformFoos)
  .filter(applyFilter)
  .map(transformFoosAgain)
  .value()

// bad
_(foos)
  .map(transformFoos)
  .filter(applyFilter)
  .map(transformFoosAgain)
  .value()

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.0.10latest

Version History

VersionDownloads (Last 7 Days)Published
7.0.10
7.0.00
6.0.06
5.0.20
5.0.10
5.0.00
4.1.101
4.1.91
4.1.80
4.1.71
4.1.60
4.1.50
4.1.40
4.1.31
4.1.20
4.1.10
4.1.00
4.0.120
4.0.110
4.0.100
4.0.90
4.0.80
4.0.70
4.0.60
4.0.50
4.0.20
4.0.30
4.0.10
3.0.00
2.0.42
2.0.30
2.0.20
2.0.10
2.0.00
1.4.20
1.4.10
1.4.00
1.3.10
1.3.00
1.2.10
1.2.00
1.1.20
1.1.10
1.1.00
1.0.20
1.0.10

Package Sidebar

Install

npm i eslint-config-profiscience

Weekly Downloads

12

Version

7.0.1

License

WTFPL

Unpacked Size

16 kB

Total Files

8

Last publish

Collaborators

  • caseywebb