based on eslint-config-airbnb
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.
in opposite to Airbnb JavaScript Style Guide
semi: ['error', 'never']
(instead of always
)
const increment = n => n + 1
const object = {
value: increment(0)
}
comma-dangle: ['error', 'never']
(instead of always-multiline
)
const object = {
foo: 'bar',
baz: 'quux'
}
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()
}
no-console: 'off'
(instead of no-console: 'warn'
)
console.log('ServiceWorker successfully registered')
react/jsx-filename-extension: ['error', { extensions: ['.js'] }]
(instead of .jsx
)
const ListItem = props => (<li {...props} />)
export default ListItem
// -> filename must end with .js
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