Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-profiscience

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-profiscience

Shareable ESLint Config for Profisciencē

  • 7.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

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()

Keywords

FAQs

Package last updated on 30 Dec 2021

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