Skip to content

Instantly share code, notes, and snippets.

@markusand
Last active February 11, 2019 15:13
Show Gist options
  • Save markusand/c7762de23c06184356d6f9e012e65b2b to your computer and use it in GitHub Desktop.
Save markusand/c7762de23c06184356d6f9e012e65b2b to your computer and use it in GitHub Desktop.
Custom eslint rules to override some AirBnB's defaults
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-tabs': 'off',
'indent': ['error', 'tab', {
'SwitchCase': 1
}],
'max-len': ['error', {
'code': 100,
'ignoreTrailingComments': true,
'ignoreUrls': true,
'ignoreStrings': true
}],
'no-param-reassign': ['error', {
'props': true,
'ignorePropertyModificationsFor': [
'acc', // for reduce accumulators
'state', // for Vuex store
]
}],
'no-shadow': ['error', { 'allow': ['response', 'data'] }],
'object-curly-newline': ['error', { 'multiline': true }],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment