diff --git a/.markdownlint.json b/.markdownlint.json index 5ef3c6aef7..0387c0e154 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,5 +1,5 @@ { "default": true, - "MD013": { "line_length": 120}, + "MD013": { "line_length": 120 }, "MD041": false -} \ No newline at end of file +} diff --git a/package.json b/package.json index 6f762521c1..3523f09833 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "scripts": { "serve": "cross-env BUILD_ENV=local vue-cli-service serve", "build": "cross-env BUILD_ENV=camptocamp vue-cli-service build --skip-plugins eslint", - "lint": "vue-cli-service lint", + "lint": "prettier --write \"**/*.{ts,js,json,css,scss,less,md,html}\" && vue-cli-service lint", "build:github": "cross-env BUILD_ENV=github vue-cli-service build --skip-plugins eslint", "generate-icons": "node tools/generate-icons.js", - "lint:no-fix": "vue-cli-service lint --no-fix", + "lint:no-fix": "prettier --check \"**/*.{ts,js,json,css,scss,less,md,html}\" && vue-cli-service lint --no-fix", "messages:extract": "node tools/extract-messages.js", "prepare": "husky install && npm run snyk-protect", "snyk-protect": "snyk-protect", diff --git a/public/README.md b/public/README.md index 28dac7cdc5..c6fc46b98a 100644 --- a/public/README.md +++ b/public/README.md @@ -1,2 +1,2 @@ This folder contains [static files](https://cli.vuejs.org/guide/html-and-static-assets.html#static-assets-handling) -referenced in `/src` by absolute path. Actually, it should not contains anything but index.html, and robots.txt. +referenced in `/src` by absolute path. Actually, it should not contains anything but index.html, and robots.txt. diff --git a/public/google2547ab594974f932.html b/public/google2547ab594974f932.html index 611d806c27..96619ad1bc 100644 --- a/public/google2547ab594974f932.html +++ b/public/google2547ab594974f932.html @@ -1 +1 @@ -google-site-verification: google2547ab594974f932.html \ No newline at end of file +google-site-verification: google2547ab594974f932.html diff --git a/public/google7c06555988eb9ae6.html b/public/google7c06555988eb9ae6.html index 49c5386898..daa0844c7a 100644 --- a/public/google7c06555988eb9ae6.html +++ b/public/google7c06555988eb9ae6.html @@ -1 +1 @@ -google-site-verification: google7c06555988eb9ae6.html \ No newline at end of file +google-site-verification: google7c06555988eb9ae6.html diff --git a/src/assets/sass/external-links.scss b/src/assets/sass/external-links.scss index f38afd8f1a..64d74db437 100644 --- a/src/assets/sass/external-links.scss +++ b/src/assets/sass/external-links.scss @@ -26,7 +26,7 @@ $escaped-color-link: '%23#{str-slice(inspect($color-link), 2)}'; @media print { a[href*="//"]::after { - content: " [" attr(href) "]"; + content: ' [' attr(href) ']'; font-size: 0.6em; background: none; padding-right: 0; diff --git a/src/assets/sass/mixins.scss b/src/assets/sass/mixins.scss index ffa1b49b40..ef2684413b 100644 --- a/src/assets/sass/mixins.scss +++ b/src/assets/sass/mixins.scss @@ -10,8 +10,7 @@ :lang(hu) &::after, :lang(it) &::after, :lang(sl) &::after, - :lang(zh) &::after - { + :lang(zh) &::after { content: ':'; } } diff --git a/src/js/apis/forum.js b/src/js/apis/forum.js index d85446302a..ab71fb2453 100644 --- a/src/js/apis/forum.js +++ b/src/js/apis/forum.js @@ -40,7 +40,7 @@ Forum.prototype.getLatest = function (excludeCategoryIds) { }; Forum.prototype.readAnnouncement = function (lang) { - lang = ['zh_CN', 'hu','sl'].includes(lang) ? 'en' : lang; + lang = ['zh_CN', 'hu', 'sl'].includes(lang) ? 'en' : lang; return this.get('/t/annonce-' + lang + '.json'); }; diff --git a/src/js/vue-plugins/gettext-plugin.js b/src/js/vue-plugins/gettext-plugin.js index b36c6cf1d8..fe0938922f 100644 --- a/src/js/vue-plugins/gettext-plugin.js +++ b/src/js/vue-plugins/gettext-plugin.js @@ -71,7 +71,7 @@ function getMessages(lang) { return import(/* webpackChunkName: "translations-es" */ `@/translations/es.json`); } else if (lang === 'hu') { return import(/* webpackChunkName: "translations-hu" */ `@/translations/hu.json`); -} else if (lang === 'zh_CN') { + } else if (lang === 'zh_CN') { return import(/* webpackChunkName: "translations-zh" */ `@/translations/zh_CN.json`); } else if (lang === 'sl') { return import(/* webpackChunkName: "translations-sl" */ `@/translations/sl.json`);