founderlab / eslint-config-founderlab

Eslint config for FounderLab projects. Extends Airbnb's.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FounderLab JavaScript style guide

Based on the Airbnb Style Guide, with no semicolons and a bunch of rules relaxed

Remember to not start lines with a '(' or '[' (or '/' or any operator really).

// bad
function nameMe() {
  const name = 'Skywalker';
  return name;
}

// good
function nameMe() {
  const name = 'Skywalker'
  return name
}

// bad (the leading '[' will be considered part of the last line)
[1,2,3].forEach((num) => {
  console.log(num)
})

// bad (the leading '(' will be considered part of the last line)
(() => {
  const name = 'Skywalker'
  return name
})()

// bad (ugly and looks silly)
;(() => {
  const name = 'Skywalker'
  return name
})()

// good (just name the function and call it)
function nameMe() {
  const name = 'Skywalker'
  return name
}
nameMe()

About

Eslint config for FounderLab projects. Extends Airbnb's.

License:MIT License


Languages

Language:JavaScript 100.0%