Created
January 19, 2018 21:41
-
-
Save lloydjatkinson/ed4abdf12955f78d529bb0d5ec46eab4 to your computer and use it in GitHub Desktop.
My .eslintrc.js file for Vue based projects. Uses default Vue recommended settings but enforces use of 4 space indentation and semicolons.
This file contains 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
// https://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint' | |
}, | |
env: { | |
browser: true, | |
}, | |
extends: [ | |
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention | |
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. | |
'plugin:vue/recommended', | |
// https://github.com/standard/standard/blob/master/docs/RULES-en.md | |
'standard' | |
], | |
// required to lint *.vue files | |
plugins: [ | |
'vue' | |
], | |
// add your custom rules here | |
rules: { | |
// 4 space indentation | |
'indent': ['error', 4], | |
//semicolons | |
'semi': [2, 'always'], | |
// remove blank line at end of file | |
'eol-last': 0, | |
// allow async-await | |
'generator-star-spacing': 'off', | |
// allow debugger during development | |
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | |
'vue/html-indent': ['error', 4] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment