diff --git a/.eslintrc.js b/.eslintrc.js index 3c48baa8..361cff5f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { root: true, parserOptions: { - parser: 'babel-eslint', + parser: '@babel/eslint-parser', sourceType: 'module' }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style @@ -21,6 +21,7 @@ module.exports = { 'generator-star-spacing': 0, // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'vue/require-prop-types': 0 + 'vue/require-prop-types': 0, + 'vue/multi-word-component-names': 0 } } diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index d667acdd..d8a4228d 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -5,6 +5,8 @@ var projectRoot = path.resolve(__dirname, '../') var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin') var CopyPlugin = require('copy-webpack-plugin'); var { VueLoaderPlugin } = require('vue-loader') +var ESLintPlugin = require('eslint-webpack-plugin'); + var env = process.env.NODE_ENV // check env & config/index.js to decide weither to enable CSS Sourcemaps for the @@ -45,20 +47,6 @@ module.exports = { module: { noParse: /node_modules\/localforage\/dist\/localforage.js/, rules: [ - { - enforce: 'pre', - test: /\.(js|vue)$/, - include: projectRoot, - exclude: /node_modules/, - use: { - loader: 'eslint-loader', - options: { - formatter: require('eslint-friendly-formatter'), - sourceMap: config.build.productionSourceMap, - extract: true - } - } - }, { enforce: 'post', test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files @@ -120,6 +108,10 @@ module.exports = { entry: path.join(__dirname, '..', 'src/sw.js'), filename: 'sw-pleroma.js' }), + new ESLintPlugin({ + extensions: ['js', 'vue'], + formatter: require('eslint-formatter-friendly') + }), new VueLoaderPlugin(), // This copies Ruffle's WASM to a directory so that JS side can access it new CopyPlugin({ diff --git a/package.json b/package.json index e3d41248..a10b6d05 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@babel/plugin-transform-runtime": "7.18.9", "@babel/preset-env": "7.18.9", "@babel/register": "7.18.9", + "@babel/eslint-parser": "7.18.9", "@intlify/vue-i18n-loader": "^5.0.0", "@ungap/event-target": "0.2.3", "@vue/babel-helper-vue-jsx-merge-props": "1.2.1", @@ -57,7 +58,6 @@ "@vue/compiler-sfc": "3.2.37", "@vue/test-utils": "2.0.2", "autoprefixer": "6.7.7", - "babel-eslint": "7.2.3", "babel-loader": "8.2.5", "babel-plugin-lodash": "3.3.4", "chai": "3.5.0", @@ -68,15 +68,14 @@ "cross-spawn": "4.0.2", "css-loader": "0.28.11", "custom-event-polyfill": "1.0.7", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-friendly-formatter": "2.0.7", - "eslint-loader": "2.2.1", + "eslint": "8.20.0", + "eslint-config-standard": "17.0.0", + "eslint-formatter-friendly": "7.0.0", + "eslint-webpack-plugin": "2.7.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "eslint-plugin-vue": "5.2.3", + "eslint-plugin-n": "15.2.4", + "eslint-plugin-promise": "6.0.0", + "eslint-plugin-vue": "9.3.0", "eventsource-polyfill": "0.9.6", "express": "4.18.1", "file-loader": "3.0.1", diff --git a/src/App.vue b/src/App.vue index 7d4a8e1e..0efadaf0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,8 +15,12 @@ class="app-layout container" :class="classes" > -
- - + diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 9e7d7956..e2120f7a 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -56,7 +56,7 @@ - +