From 9108737d55300d8a4f822ba94335d8b53f04854d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 7 Apr 2019 20:33:11 +0300 Subject: Webpack 4, ESLint with Vue, Node-sass, updated dependencies overall. New linting. --- .eslintrc.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 800f9a4f..3c48baa8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,14 +1,17 @@ module.exports = { root: true, - parser: 'babel-eslint', parserOptions: { + parser: 'babel-eslint', sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style - extends: 'standard', + extends: [ + 'standard', + 'plugin:vue/recommended' + ], // required to lint *.vue files plugins: [ - 'html' + 'vue' ], // add your custom rules here rules: { @@ -17,6 +20,7 @@ module.exports = { // allow async-await 'generator-star-spacing': 0, // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'vue/require-prop-types': 0 } } -- cgit v1.2.3-70-g09d2 From b1eea5d830821d2ccb864899cf072f441b23a22b Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 10 Apr 2019 22:04:12 +0300 Subject: all the failing rules --- .eslintrc.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 3c48baa8..489496da 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,6 +21,23 @@ module.exports = { 'generator-star-spacing': 0, // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'vue/require-prop-types': 0 + // Webpack 4 update commit, most of these probably should be fixed and removed in a separate MR + // A lot of errors come from .vue files that are now properly linted + 'vue/valid-v-if': 1, + 'vue/use-v-on-exact': 1, + 'vue/no-parsing-error': 1, + 'vue/require-v-for-key': 1, + 'vue/require-prop-types': 1, + 'vue/no-use-v-if-with-v-for': 1, + 'indent': 1, + 'import/first': 1, // ???? + 'import-first': 1, + 'object-curly-spacing': 1, + 'prefer-promise-reject-errors': 1, + 'eol-last': 1, + 'no-return-await': 1, + 'no-multi-spaces': 1, + 'no-trailing-spaces': 1, + 'no-multiple-empty-lines': 1 } } -- cgit v1.2.3-70-g09d2 From 35fb4ac40e2a2d4e6c264ffe0c7a912c688745d7 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 10 Apr 2019 22:09:39 +0300 Subject: more rules --- .eslintrc.js | 3 +++ 1 file changed, 3 insertions(+) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 489496da..8c95cfb9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -38,6 +38,9 @@ module.exports = { 'no-return-await': 1, 'no-multi-spaces': 1, 'no-trailing-spaces': 1, + 'no-unused-expressions': 1, + 'no-mixed-operators': 1, + 'camelcase': 1, 'no-multiple-empty-lines': 1 } } -- cgit v1.2.3-70-g09d2 From addeb852200688170654d9bd687de75bc5d30a85 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 13 May 2019 21:54:25 +0300 Subject: fix prod build --- .eslintrc.js | 1 + build/webpack.prod.conf.js | 8 ++++-- src/components/login_form/login_form.vue | 29 ++++++++++++++++++++-- .../post_status_form/post_status_form.vue | 2 +- src/components/status/status.vue | 2 +- 5 files changed, 36 insertions(+), 6 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 8c95cfb9..b526df67 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,6 +27,7 @@ module.exports = { 'vue/use-v-on-exact': 1, 'vue/no-parsing-error': 1, 'vue/require-v-for-key': 1, + 'vue/valid-v-for': 1, 'vue/require-prop-types': 1, 'vue/no-use-v-if-with-v-for': 1, 'indent': 1, diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 85ea1bee..e7d25bfe 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -17,17 +17,21 @@ let commitHash = require('child_process') console.log(commitHash) var webpackConfig = merge(baseWebpackConfig, { + mode: 'production', module: { rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, extract: true }) }, devtool: config.build.productionSourceMap ? '#source-map' : false, optimization: { - minimize: true + minimize: true, + splitChunks: { + chunks: 'all' + } }, output: { path: config.build.assetsRoot, filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') + chunkFilename: utils.assetsPath('js/[name].[chunkhash].js') }, plugins: [ // http://vuejs.github.io/vue-loader/workflow/production.html diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue index 27a8e48a..c6be2e00 100644 --- a/src/components/login_form/login_form.vue +++ b/src/components/login_form/login_form.vue @@ -50,6 +50,10 @@ @import '../../_variables.scss'; .login-form { + display: flex; + flex-direction: column; + padding: 0.6em; + .btn { min-height: 28px; width: 10em; @@ -66,9 +70,30 @@ align-items: center; justify-content: space-between; } -} -.login { + .form-group { + display: flex; + flex-direction: column; + padding: 0.3em 0.5em 0.6em; + line-height:24px; + } + + .form-bottom { + display: flex; + padding: 0.5em; + height: 32px; + + button { + width: 10em; + } + + p { + margin: 0.35em; + padding: 0.35em; + display: flex; + } + } + .error { text-align: center; diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index b8b93936..4f014cc5 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -155,7 +155,7 @@ } } -.post-status-form, .login { +.post-status-form { .form-bottom { display: flex; padding: 0.5em; diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 02715253..490e167b 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -627,7 +627,7 @@ a.unmute { flex: 1; } -.timeline > { +.timeline :not(.panel-disabled) > { .status-el:last-child { border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius; border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius); -- cgit v1.2.3-70-g09d2