Last active
February 11, 2019 15:13
-
-
Save markusand/c7762de23c06184356d6f9e012e65b2b to your computer and use it in GitHub Desktop.
Custom eslint rules to override some AirBnB's defaults
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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