diff --git a/.eslintrc.js b/.eslintrc.js
index 672132ef..722fe5a8 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -3,9 +3,13 @@ module.exports = {
"browser": true,
"es6": true
},
- "extends": "eslint:recommended",
- "parser": "babel-eslint",
+ "extends": [
+ "eslint:recommended",
+ "plugin:vue/recommended"
+ ],
+ "plugins": ["vue"],
"parserOptions": {
+ "parser": "babel-eslint",
"ecmaVersion": 8,
"sourceType": "module"
},
@@ -62,6 +66,7 @@ module.exports = {
"no-useless-constructor": ["error"],
"no-useless-rename": ["error"],
"no-var": ["error"],
+ "no-cond-assign": ["warn"],
"object-shorthand": ["warn"],
"prefer-arrow-callback": ["warn", {"allowUnboundThis": true}],
"prefer-const": ["warn", {"ignoreReadBeforeAssign": true}],
@@ -72,7 +77,7 @@ module.exports = {
"yield-star-spacing": ["warn"],
"indent": [
- "error",
+ "warn",
"tab",
{
"SwitchCase": 1
@@ -89,6 +94,20 @@ module.exports = {
"avoidEscape": true,
"allowTemplateLiterals": true
}
+ ],
+ "vue/html-indent": [
+ "warn",
+ "tab"
+ ],
+ "vue/max-attributes-per-line": "off",
+ "vue/require-prop-types": "off",
+ "vue/require-default-prop": "off",
+ "vue/html-closing-bracket-newline": [
+ "error",
+ {
+ "singleline": "never",
+ "multiline": "always"
+ }
]
}
};
\ No newline at end of file
diff --git a/README.md b/README.md
index 4a92dcdb..270f4973 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
FrankerFaceZ
============
-Copyright (c) 2017 Dan Salvato LLC
+Copyright (c) 2018 Dan Salvato LLC
Licensed under the Apache License, Version 2.0. See LICENSE.
@@ -13,17 +13,40 @@ FrankerFaceZ uses node.js to manage development dependencies and to run an HTTP
server for development. To get everything you need:
1. Install node.js and npm
-2. Run ```npm install``` within the FrankerFaceZ directory.
+2. Run `npm install` within the FrankerFaceZ directory.
-From there, you can use npm to build the extension from source simply by
-running ```npm run build```. For development, you can instruct gulp to watch
-the source files for changes and re-build automatically with ```npm start```
+From there, you can use npm to build FrankerFaceZ from source simply by
+running `npm run build`. For development, you can instruct gulp to watch
+the source files for changes and re-build automatically with `npm start`
FrankerFaceZ comes with a local development server that listens on port 8000
and it serves up local development copies of files, falling back to the CDN
when a local copy of a file isn't present.
To make FrankerFaceZ load from your local development server, you must set
-the local storage variable ```ffzDebugMode``` to true. Just run the following
-in your console on Twitch: ```localStorage.ffzDebugMode = true;```
+the local storage variable `ffzDebugMode` to true. Just run the following
+in your console on Twitch: `localStorage.ffzDebugMode = true;`
+
+It should be noted that this project is not a browser extension that you
+would load in your browser's extensions system. You still need the FrankerFaceZ
+extension or user-script for your browser.
+
+
+Editor Settings
+===============
+
+Please make sure that your editor is configured to use tabs rather than spaces
+for indentation and that lines are ended with `\n`. It's recommended that you
+configure linting support for your editor as well.
+
+If you're using Visual Studio Code, make sure to install the ESLint extension
+and add the following to your workspace settings:
+
+```json
+{
+ "eslint.validate": [
+ "javascript",
+ "vue"
+ ]
+}```
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index d159ca59..a97c842c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3037,6 +3037,15 @@
}
}
},
+ "eslint-plugin-vue": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-4.4.0.tgz",
+ "integrity": "sha512-UHeE0aTEv9A/9xe8J6X7rDLMbwV6GuQFKAscMyLEv49Y4wK4KwQiifr2X0MsNsVlmccrDUyjI9KO4DuFTkPP9A==",
+ "dev": true,
+ "requires": {
+ "vue-eslint-parser": "2.0.3"
+ }
+ },
"eslint-scope": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
@@ -9358,6 +9367,20 @@
"loose-envify": "1.3.1"
}
},
+ "vue-eslint-parser": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",
+ "integrity": "sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw==",
+ "dev": true,
+ "requires": {
+ "debug": "3.1.0",
+ "eslint-scope": "3.7.1",
+ "eslint-visitor-keys": "1.0.0",
+ "espree": "3.5.4",
+ "esquery": "1.0.0",
+ "lodash": "4.17.4"
+ }
+ },
"vue-hot-reload-api": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz",
diff --git a/package.json b/package.json
index d3a09a3b..e6f6a979 100755
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"main": "script.js",
"scripts": {
"start": "webpack-dev-server --config webpack.web.dev.js",
+ "eslint": "eslint \"src/**/*.{js,vue}\"",
"build": "webpack --config webpack.web.prod.js --define process.env.NODE_ENV='production'",
"build:babel": "webpack --config webpack.web.babel.js --define process.env.NODE_ENV='production'",
"build:prod": "webpack --config webpack.web.prod.js --define process.env.NODE_ENV='production'",
@@ -22,6 +23,7 @@
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^0.28.10",
"eslint": "^4.18.2",
+ "eslint-plugin-vue": "^4.4.0",
"extract-loader": "^1.0.2",
"file-loader": "^1.1.11",
"less": "^2.7.3",
diff --git a/src/modules/main_menu/components/badge-visibility.vue b/src/modules/main_menu/components/badge-visibility.vue
index de12c528..46f31e7d 100644
--- a/src/modules/main_menu/components/badge-visibility.vue
+++ b/src/modules/main_menu/components/badge-visibility.vue
@@ -1,62 +1,84 @@
-
-
-
- {{ t('setting.badge-inheritence', 'These values are being overridden by another profile and may not take effect.') }}
-
-
-
-
-
- {{ sec.title }}
-
-
-
+
+
+
+
+ {{ sec.title }}
+
+
+
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/main_menu/components/feedback-page.vue b/src/modules/main_menu/components/feedback-page.vue
index 0d186850..a3ab7a46 100644
--- a/src/modules/main_menu/components/feedback-page.vue
+++ b/src/modules/main_menu/components/feedback-page.vue
@@ -1,35 +1,32 @@
-
-
Feedback
+
+
Feedback
-
-
- Please keep in mind that FrankerFaceZ v4 is under heavy development.
-
-
+
+
+ Please keep in mind that FrankerFaceZ v4 is under heavy development.
+
+
-
- Okay, still here? Great! You can provide feedback and bug reports by
-
+
- When creating a GitHub issue, please check that someone else hasn't
- already created one for what you'd like to discuss or report.
-
-
-
+
+ When creating a GitHub issue, please check that someone else hasn't
+ already created one for what you'd like to discuss or report.
+
+
\ No newline at end of file
diff --git a/src/modules/main_menu/components/filter-editor.vue b/src/modules/main_menu/components/filter-editor.vue
index 17b81dc5..b060cfee 100644
--- a/src/modules/main_menu/components/filter-editor.vue
+++ b/src/modules/main_menu/components/filter-editor.vue
@@ -1,55 +1,55 @@
-
-
-
-
-
-
-
-
-
- Channel
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+ Channel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
\ No newline at end of file
diff --git a/src/modules/main_menu/components/menu-container.vue b/src/modules/main_menu/components/menu-container.vue
index 0f9f397a..fb10b9e6 100644
--- a/src/modules/main_menu/components/menu-container.vue
+++ b/src/modules/main_menu/components/menu-container.vue
@@ -1,21 +1,21 @@
-
\ No newline at end of file
diff --git a/src/modules/main_menu/components/profile-selector.vue b/src/modules/main_menu/components/profile-selector.vue
index 26fe851a..6cf14c4e 100644
--- a/src/modules/main_menu/components/profile-selector.vue
+++ b/src/modules/main_menu/components/profile-selector.vue
@@ -1,79 +1,84 @@
-
- {{ t('setting.profiles.active', 'This profile is active.') }}
+
+
+ {{ t('setting.profiles.active', 'This profile is active.') }}
+
-
-
{{ t(p.i18n_key, p.title, p) }}
-
- {{ t(p.desc_i18n_key, p.description, p) }}
+
{{ t(p.i18n_key, p.title, p) }}
+
+ {{ t(p.desc_i18n_key, p.description, p) }}
+
-
-
-
+
+
+
-
\ No newline at end of file
diff --git a/src/modules/main_menu/components/setting-select-box.vue b/src/modules/main_menu/components/setting-select-box.vue
index 9b050152..8e8e7af3 100644
--- a/src/modules/main_menu/components/setting-select-box.vue
+++ b/src/modules/main_menu/components/setting-select-box.vue
@@ -1,49 +1,55 @@
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
-
+
\ No newline at end of file
diff --git a/src/modules/main_menu/components/setting-text-box.vue b/src/modules/main_menu/components/setting-text-box.vue
index cdaabef5..eb39203d 100644
--- a/src/modules/main_menu/components/setting-text-box.vue
+++ b/src/modules/main_menu/components/setting-text-box.vue
@@ -1,46 +1,48 @@
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
-
+
\ No newline at end of file
diff --git a/src/sites/twitch-twilight/modules/host-options.vue b/src/sites/twitch-twilight/modules/host-options.vue
index 8d4055c7..0f34f3fe 100644
--- a/src/sites/twitch-twilight/modules/host-options.vue
+++ b/src/sites/twitch-twilight/modules/host-options.vue
@@ -1,154 +1,193 @@
-
-
- {{ t('metadata.host.setting.team-hosting.description',
- 'Automatically host random channels from your team when you\'re not live. ' +
+
+
+
+
+
+
+ {{ t('metadata.host.setting.team-hosting.description',
+ "Automatically host random channels from your team when you're not live. " +
'Team channels will be hosted before any channels in your host list.') }}
-
-