@ascendancyy/eslint-config-eva
v3.1.1
Published
modified airbnb eslint config
Downloads
36
Readme
[EVA] Personal ESLint config
Extends Airbnb's base config.
Differences from Airbnb's base config
operator-linebreak
'operator-linebreak': ['warn', 'before', {
overrides: {
'=': 'none',
'?': 'after',
':': 'after',
},
}]
no-debugger
Allow the use of debugger
when in development.
'no-debugger': process.env.NODE_ENV !== 'development' ? 'error' : 'off'
no-param-reassign
Added state
and el
for vue-router and adjusting html elements
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'accumulator', // for reduce accumulators
'e', // for e.returnvalue
'ctx', // for Koa routing
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
'response', // for Express responses
'$scope', // for Angular 1 scopes
'el', // for el.style
],
}]
no-unused-expressions
'no-unused-expressions': ['error', {
allowShortCircuit: true,
allowTernary: false,
allowTaggedTemplates: false,
}]
import/prefer-default-export
'import/prefer-default-export': 'off'
require-atomic-updates
Not yet enabled in Airbnb's base config
'require-atomic-updates': 'error'
Install
$ npm install -D eslint @ascendancyy/eslint-config-eva
or
$ yarn add -D eslint @ascendancyy/eslint-config-eva
Usage
In ESLint (.eslintrc, .eslintrc.js):
{
"extends": ["@ascendancyy/eslint-config-eva"]
}