add some eslint-config - works fine for js now, reindent main
This commit is contained in:
parent
3ceb1a2c1a
commit
311e911523
21
.eslintrc
21
.eslintrc
@ -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
|
||||
},
|
||||
}
|
@ -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",
|
||||
|
@ -148,7 +148,7 @@ function objectToPersist(obj, key) {
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function persistToObject(key) {
|
||||
try {
|
||||
|
@ -47,6 +47,7 @@ module.exports = {
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
enforce: "pre",
|
||||
test: /\.(vue|js)$/,
|
||||
loader: 'eslint-loader',
|
||||
exclude: /node_modules/
|
||||
|
Loading…
Reference in New Issue
Block a user