подрубил плагин eslint-plugin-prettier

This commit is contained in:
Norbaev 2024-06-25 17:16:56 +05:00
parent 599a93fe5b
commit 6ea385f1eb
8 changed files with 282 additions and 144 deletions

View File

@ -8,8 +8,8 @@ module.exports = {
parser: '@babel/eslint-parser',
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
// requireConfigFile: false,
babelOptions: { configFile: './babel.config.cjs' },
requireConfigFile: false,
// babelOptions: { configFile: './babel.config.cjs' },
},
env: {
@ -32,6 +32,7 @@ module.exports = {
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
// 'standard'
'plugin:prettier/recommended',
],
plugins: [

138
client/package-lock.json generated
View File

@ -31,9 +31,11 @@
"@quasar/app-webpack": "^3.13.2",
"dotenv": "^16.3.1",
"eslint": "^8.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-webpack-plugin": "^3.1.1",
@ -3203,6 +3205,18 @@
"node": ">= 8"
}
},
"node_modules/@pkgr/core": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
"dev": true,
"engines": {
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/unts"
}
},
"node_modules/@polka/url": {
"version": "1.0.0-next.25",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz",
@ -6757,6 +6771,18 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-config-prettier": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
"integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"dev": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
"peerDependencies": {
"eslint": ">=7.0.0"
}
},
"node_modules/eslint-config-standard": {
"version": "17.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz",
@ -6985,6 +7011,36 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
},
"node_modules/eslint-plugin-prettier": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
"integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.6"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint-plugin-prettier"
},
"peerDependencies": {
"@types/eslint": ">=8.0.0",
"eslint": ">=8.0.0",
"eslint-config-prettier": "*",
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
"@types/eslint": {
"optional": true
},
"eslint-config-prettier": {
"optional": true
}
}
},
"node_modules/eslint-plugin-promise": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz",
@ -7537,6 +7593,12 @@
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"node_modules/fast-diff": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
"dev": true
},
"node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@ -12824,6 +12886,18 @@
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prettier-linter-helpers": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
"integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
"dev": true,
"dependencies": {
"fast-diff": "^1.1.2"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/pretty-error": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz",
@ -14185,6 +14259,22 @@
"node": ">= 4.7.0"
}
},
"node_modules/synckit": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
"integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
"dev": true,
"dependencies": {
"@pkgr/core": "^0.1.0",
"tslib": "^2.6.2"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/unts"
}
},
"node_modules/tabbable": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",
@ -17733,6 +17823,12 @@
"fastq": "^1.6.0"
}
},
"@pkgr/core": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
"dev": true
},
"@polka/url": {
"version": "1.0.0-next.25",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz",
@ -20489,6 +20585,13 @@
}
}
},
"eslint-config-prettier": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
"integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"dev": true,
"requires": {}
},
"eslint-config-standard": {
"version": "17.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz",
@ -20652,6 +20755,16 @@
}
}
},
"eslint-plugin-prettier": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
"integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.6"
}
},
"eslint-plugin-promise": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz",
@ -20949,6 +21062,12 @@
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"fast-diff": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
"dev": true
},
"fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@ -24529,6 +24648,15 @@
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true
},
"prettier-linter-helpers": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
"integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
"dev": true,
"requires": {
"fast-diff": "^1.1.2"
}
},
"pretty-error": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz",
@ -25534,6 +25662,16 @@
"resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.3.tgz",
"integrity": "sha512-80MSxonyTxrGcaWj9YgvvhD8OG0B9/9IVZP33vhIEvyWvmKjnQDBieO+29wKvMx285sAtvZyrWBdkxaw6+D3aw=="
},
"synckit": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
"integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
"dev": true,
"requires": {
"@pkgr/core": "^0.1.0",
"tslib": "^2.6.2"
}
},
"tabbable": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",

View File

@ -40,9 +40,11 @@
"@quasar/app-webpack": "^3.13.2",
"dotenv": "^16.3.1",
"eslint": "^8.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-webpack-plugin": "^3.1.1",

View File

@ -1,7 +1,7 @@
const path = require("path");
const webpack = require("webpack");
const nodeExternals = require("webpack-node-externals");
const env = require("dotenv").config({
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const env = require('dotenv').config({
path: `.env.${process.env.NODE_ENV.toLowerCase()}`,
}).parsed;
/* eslint-env node */
@ -14,8 +14,8 @@ const env = require("dotenv").config({
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js
const ESLintPlugin = require("eslint-webpack-plugin");
const { configure } = require("quasar/wrappers");
const ESLintPlugin = require('eslint-webpack-plugin');
const { configure } = require('quasar/wrappers');
module.exports = configure(function (ctx) {
return {
// https://v2.quasar.dev/quasar-cli-webpack/supporting-ts
@ -28,9 +28,9 @@ module.exports = configure(function (ctx) {
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-webpack/boot-files
boot: [
"main",
"directive",
{ path: "store", server: false },
'main',
'directive',
{ path: 'store', server: false },
//{ path: 'directive', server: false },
//'axios'
],
@ -55,7 +55,7 @@ module.exports = configure(function (ctx) {
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build
build: {
vueRouterMode: "history", // available values: 'hash', 'history'
vueRouterMode: 'history', // available values: 'hash', 'history'
env: {
...process.env,
},
@ -81,8 +81,8 @@ module.exports = configure(function (ctx) {
chainWebpack(chain) {
chain
.plugin("eslint-webpack-plugin")
.use(ESLintPlugin, [{ extensions: ["js", "vue"] }]);
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js', 'vue'] }]);
// chain.plugin('normal-module-replacement').use(
// new webpack.NormalModuleReplacementPlugin(/settings$/, function(resource) {
// resource.request = resource.request.replace(/settings$/, `settings/${process.env.NODE_ENV}`);
@ -94,22 +94,22 @@ module.exports = configure(function (ctx) {
// .use(new RobotstxtPlugin(settings.robotsTxt))
chain.module
.rule("images")
.rule('images')
.test(/\.(png|jpe?g|gif|svg|webp|avif|ico)(\?.*)?$/)
.type("javascript/auto")
.use("url-loader")
.loader("url-loader")
.type('javascript/auto')
.use('url-loader')
.loader('url-loader')
.options({
esModule: false,
limit: 16384,
name: `assets/img/[name].[hash:8].[ext]`,
});
chain.module
.rule("videos")
.rule('videos')
.test(/\.(mp4|webm|mov)(\?.*)?$/)
.type("javascript/auto")
.use("url-loader")
.loader("url-loader")
.type('javascript/auto')
.use('url-loader')
.loader('url-loader')
.options({
esModule: false,
limit: 32768,
@ -119,16 +119,16 @@ module.exports = configure(function (ctx) {
extendWebpack(cfg) {
cfg.resolve.alias = {
...cfg.resolve.alias,
"@": path.resolve(__dirname, "./src"),
'@': path.resolve(__dirname, './src'),
};
},
devtool: "source-map",
devtool: 'source-map',
},
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-devServer
devServer: {
server: {
type: "http",
type: 'http',
},
port: 5173,
open: false, // opens browser window automatically
@ -139,7 +139,7 @@ module.exports = configure(function (ctx) {
config: {},
// iconSet: 'material-icons', // Quasar icon set
lang: "ru", // Quasar language pack
lang: 'ru', // Quasar language pack
// For special cases outside of where the auto-import strategy can have an impact
// (like functional components as one of the examples),
@ -149,7 +149,7 @@ module.exports = configure(function (ctx) {
// directives: [],
// Quasar plugins
plugins: ["Meta"],
plugins: ['Meta'],
},
// animations: 'all', // --- includes all animations
@ -194,19 +194,19 @@ module.exports = configure(function (ctx) {
chainWebpackWebserver(chain) {
chain
.plugin("eslint-webpack-plugin")
.use(ESLintPlugin, [{ extensions: ["js"] }]);
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }]);
},
middlewares: [
ctx.prod ? "compression" : "",
"render", // keep this as last one
ctx.prod ? 'compression' : '',
'render', // keep this as last one
],
},
// https://v2.quasar.dev/quasar-cli-webpack/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest'
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
// for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
@ -214,43 +214,43 @@ module.exports = configure(function (ctx) {
chainWebpackCustomSW(chain) {
chain
.plugin("eslint-webpack-plugin")
.use(ESLintPlugin, [{ extensions: ["js"] }]);
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }]);
},
manifest: {
name: "Tugan App",
short_name: "Tugan App",
description: "A Tugan project",
display: "standalone",
orientation: "portrait",
background_color: "#ffffff",
theme_color: "#027be3",
name: 'Tugan App',
short_name: 'Tugan App',
description: 'A Tugan project',
display: 'standalone',
orientation: 'portrait',
background_color: '#ffffff',
theme_color: '#027be3',
icons: [
{
src: "icons/icon-128x128.png",
sizes: "128x128",
type: "image/png",
src: 'icons/icon-128x128.png',
sizes: '128x128',
type: 'image/png',
},
{
src: "icons/icon-192x192.png",
sizes: "192x192",
type: "image/png",
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: "icons/icon-256x256.png",
sizes: "256x256",
type: "image/png",
src: 'icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png',
},
{
src: "icons/icon-384x384.png",
sizes: "384x384",
type: "image/png",
src: 'icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png',
},
{
src: "icons/icon-512x512.png",
sizes: "512x512",
type: "image/png",
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
@ -268,7 +268,7 @@ module.exports = configure(function (ctx) {
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-electron-apps/configuring-electron
electron: {
bundler: "packager", // 'packager' or 'builder'
bundler: 'packager', // 'packager' or 'builder'
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
@ -284,21 +284,21 @@ module.exports = configure(function (ctx) {
builder: {
// https://www.electron.build/configuration/configuration
appId: "tugan",
appId: 'tugan',
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
chainWebpackMain(chain) {
chain
.plugin("eslint-webpack-plugin")
.use(ESLintPlugin, [{ extensions: ["js"] }]);
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }]);
},
chainWebpackPreload(chain) {
chain
.plugin("eslint-webpack-plugin")
.use(ESLintPlugin, [{ extensions: ["js"] }]);
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }]);
},
},
};

View File

@ -8,11 +8,7 @@
custom
>
<div v-if="item.name" class="breadcrumbs__item">
<a
:href="href"
class="breadcrumbs__item-link"
@click="navigate"
>
<a :href="href" class="breadcrumbs__item-link" @click="navigate">
{{ item.name }}
</a>
</div>
@ -26,8 +22,10 @@ export default {
props: {
breadcrumbs: {
type: Array,
default() { return []; }
default() {
return [];
},
},
},
}
};
</script>

View File

@ -32,28 +32,30 @@ export default {
id: 1,
title: 'Топ-10 самых популярных языков программирования в 2023 году',
time: '2',
data: '21 октября'
data: '21 октября',
},
{
id: 2,
title:'Искусственный интеллект меняет мир технологий: возможности и вызовы',
title:
'Искусственный интеллект меняет мир технологий: возможности и вызовы',
time: '2',
data: '21 октября'
data: '21 октября',
},
{
id: 3,
title:'Как кибербезопасность становится ключевым фактором успеха в IT',
title:
'Как кибербезопасность становится ключевым фактором успеха в IT',
time: '2',
data: '21 октября'
data: '21 октября',
},
{
id: 4,
title: '5 советов по выбору правильной технологии для вашего проекта',
time: '2',
data: '21 октября'
}
]
}
}
}
data: '21 октября',
},
],
};
},
};
</script>

View File

@ -1,7 +1,4 @@
import audio from './audio';
import app from './app';
export {
audio,
app
};
export { audio, app };