Преглед изворни кода

Added eslinting to frontend. Make sure to run 'npm install' inside the frontend directory to fetch the new dependencies.

Cameron Kline пре 7 година
родитељ
комит
f7d08f397b
2 измењених фајлова са 21 додато и 0 уклоњено
  1. 14 0
      frontend/.eslintrc.json
  2. 7 0
      frontend/webpack.config.js

+ 14 - 0
frontend/.eslintrc.json

@@ -0,0 +1,14 @@
+{
+	"rules": {
+		"indent": [2, "tab"]
+	},
+	"parserOptions": {
+		"ecmaVersion": 6,
+		"sourceType": "module"
+	},
+	"plugins": [ "html" ],
+	"settings": {
+		"html/indent": "tab",
+		"html/report-bad-indent": 2
+	}
+}

+ 7 - 0
frontend/webpack.config.js

@@ -8,6 +8,13 @@ module.exports = {
 		filename: 'bundle.js'
 	},
 	module: {
+		preLoaders: [
+			{
+				test: /\.vue$/,
+				loader: 'eslint',
+				exclude: /node_modules/
+			}
+		],
 		// `loaders` is an array of loaders to use.
 		loaders: [
 			{