2.1.2 • Published 7 years ago

eslint-config-sk22 v2.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

eslint-config-sk22

npm David GitHub stars

based on eslint-config-airbnb

Installation

Add eslint-config-sk22 with all peer dependencies to your project. (Just like in eslint-config-airbnb).

This can be done using install-peerdeps

install-peerdeps --dev eslint-config-sk22

Add the --yarn flag to your install-peerdeps command if you prefer to use yarn instead of npm.

Differences

in opposite to Airbnb JavaScript Style Guide

using babel as parser

parser: 'babel-eslint'

no semicolons

semi: ['error', 'never'] (instead of always)

const increment = n => n + 1
const object = {
  value: increment(0)
}

no comma dangle

comma-dangle: ['error', 'never'] (instead of always-multiline)

const object = {
  foo: 'bar',
  baz: 'quux'
}

arrow function parens only as needed

arrow-parens: ['error', 'as-needed'] (instead of requireForBlockBody)

const add = (a, b) => a + b // parens needed
const identity = _ => _ // no parens allowed
const prepare = str => { // no parens allowed
  const beautified = beautify(str)
  return beautified.trim()
}

allow console

no-console: 'off' (instead of no-console: 'warn')

console.log('ServiceWorker successfully registered')

js filename extension for jsx

react/jsx-filename-extension: ['error', { extensions: ['.js'] }] (instead of .jsx)

const ListItem = props => (<li {...props} />)
export default ListItem
// -> filename must end with .js

kebab-case for file naming

filenames/match-regex: ['error', '^([a-z0-9]+)(-[a-z0-9]+)*$'] (instead of PascalCase for React components)

const ListItem = props => (<li {...props} />)
export default ListItem
// -> filename could be list-item.js
2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago