add some eslint-config - works fine for js now, reindent main

This commit is contained in:
Anton Schubert 2017-08-30 13:28:19 +02:00
parent 3ceb1a2c1a
commit 311e911523
4 changed files with 205 additions and 188 deletions

View File

@ -1,8 +1,23 @@
{
"parserOptions": {
"parser": "babel-eslint",
"rules": {
"ecmaVersion": 6,
"sourceType": "module",
"impliedStrict": true
},
"env": {
"browser": true,
"es6": true
},
"plugins": [
"html"
]
"html",
],
extends: [
"eslint:recommended",
"plugin:vue/recommended"
],
"rules": {
"indent": ["error", 4],
"no-console": 0
},
}

View File

@ -21,6 +21,7 @@
"eslint": "^4.5.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.2.0",
"eslint-plugin-vue": "^3.12.0",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"vue-hot-reload-api": "^2.1.0",

View File

@ -148,7 +148,7 @@ function objectToPersist(obj, key) {
} catch (error) {
console.error(error);
}
};
}
function persistToObject(key) {
try {

View File

@ -47,6 +47,7 @@ module.exports = {
},
module: {
loaders: [{
enforce: "pre",
test: /\.(vue|js)$/,
loader: 'eslint-loader',
exclude: /node_modules/