Created
December 3, 2019 11:39
-
-
Save matthewblewitt/7e024ac51601eeedbbf5ed2d600902c9 to your computer and use it in GitHub Desktop.
Vue CLI + ESLint + Prettier + Fix on save
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
module.exports = { | |
root: true, | |
env: { | |
node: true | |
}, | |
extends: [ | |
"plugin:vue/recommended", | |
"eslint:recommended", | |
"prettier/vue", | |
"plugin:prettier/recommended" | |
], | |
rules: {}, | |
parserOptions: { | |
parser: "babel-eslint" | |
} | |
}; |
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
{ | |
"name": "awesome-linting", | |
"version": "0.1.0", | |
"private": true, | |
"scripts": { | |
"serve": "vue-cli-service serve", | |
"build": "vue-cli-service build", | |
"lint": "vue-cli-service lint" | |
}, | |
"dependencies": { | |
"core-js": "^3.4.3", | |
"vue": "^2.6.10" | |
}, | |
"devDependencies": { | |
"@vue/cli-plugin-babel": "^4.1.0", | |
"@vue/cli-plugin-eslint": "^4.1.0", | |
"@vue/cli-service": "^4.1.0", | |
"babel-eslint": "^10.0.3", | |
"eslint": "^5.16.0", | |
"eslint-config-prettier": "^6.7.0", | |
"eslint-loader": "^3.0.2", | |
"eslint-plugin-prettier": "^3.1.1", | |
"eslint-plugin-vue": "^5.2.3", | |
"prettier": "^1.19.1", | |
"vue-template-compiler": "^2.6.10" | |
}, | |
"browserslist": [ | |
"> 1%", | |
"last 2 versions" | |
] | |
} |
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
module.exports = { | |
chainWebpack: config => { | |
config.module | |
.rule("eslint") | |
.use("eslint-loader") | |
.options({ | |
fix: true | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment