Skip to content

Instantly share code, notes, and snippets.

@hsipeng
Created November 19, 2017 01:20
Show Gist options
  • Save hsipeng/f3fbd38d5517d4033ad99500638003e7 to your computer and use it in GitHub Desktop.
Save hsipeng/f3fbd38d5517d4033ad99500638003e7 to your computer and use it in GitHub Desktop.
eslint ..config
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
/build/
/config/
/dist/
/*.js
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment