From e5b84d736831ff37fb4238a0edc9b178d3b81f38 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Sun, 3 Dec 2023 19:02:03 +0100 Subject: [PATCH 1/7] (ci) add linting with ESLint remove unused variables --- .eslintrc.json | 29 ++++ .gitlab-ci.yml | 5 + Makefile | 3 + components/Footer.vue | 2 +- components/Support.vue | 2 +- nuxt.config.js | 2 +- package.json | 5 +- plugins/.eslintrc.json | 5 + plugins/datepicker.js | 2 +- plugins/globals.js | 4 +- plugins/track.js | 7 +- server/analyseLinks.js | 2 +- server/calendarBot.js | 4 +- server/cards.js | 2 +- server/index.js | 2 +- server/pesel.js | 2 +- server/routes/admin.js | 2 +- server/routes/census.js | 6 +- server/routes/nouns.js | 4 +- server/routes/profile.js | 5 +- server/routes/pronounce.js | 2 +- server/routes/translations.js | 1 - src/classes.js | 1 - src/contact.js | 2 +- src/links.js | 4 +- src/stats.js | 32 ---- test/buildPronoun.test.js | 2 +- yarn.lock | 314 ++++++++++++++++++++++++++++++---- 28 files changed, 349 insertions(+), 104 deletions(-) create mode 100644 .eslintrc.json create mode 100644 plugins/.eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..87056a457 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "env": { + "es2021": true, + "node": true + }, + "root": true, + "extends": [ + "eslint:recommended" + ], + "ignorePatterns": ["data", "dist", "new", "static"], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "curly": "warn", + "eqeqeq": "warn", + "no-constant-condition": "warn", + "no-empty": "warn", + "no-prototype-builtins": "warn", + "no-template-curly-in-string": "error", + "no-unused-vars": ["error", {"argsIgnorePattern": "^_", "varsIgnorePattern": "^_"}], + "no-useless-escape": "warn", + "no-useless-rename": "warn", + "object-shorthand": "warn", + "prefer-const": "warn", + "prefer-template": "warn" + } +} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2547e3fb0..2801f881c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,11 @@ before_script: - make switch LANG=en - yarn install --immutable --immutable-cache --check-cache --cache-folder .yarn +lint: + stage: test + script: + - yarn lint + unit-tests: stage: test script: diff --git a/Makefile b/Makefile index e827e444f..5e8642068 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ install: yarn node server/migrate.js +lint: + yarn lint + test: yarn test diff --git a/components/Footer.vue b/components/Footer.vue index d8dfc5907..774271d7c 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -193,7 +193,7 @@ export default { data() { return { links: groupBy([...getContactLinks(this.config), ...getSocialLinks(this.config)], l => l.group), - supportLinks: [...getSupportLinks(this.config)], + supportLinks: [...getSupportLinks()], versionFrontend: process.env.VERSION, versionBackend: undefined, adsVisible: false, diff --git a/components/Support.vue b/components/Support.vue index 519883ec6..6c626c560 100644 --- a/components/Support.vue +++ b/components/Support.vue @@ -30,7 +30,7 @@ export default { data() { return { - links: [...getSupportLinks(this.config)], + links: [...getSupportLinks()], } }, } diff --git a/nuxt.config.js b/nuxt.config.js index cd71e9867..76289ab74 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -215,7 +215,7 @@ export default { plugins: postCssPlugins, } }, - extend (config, ctx) { + extend (config) { config.module.rules.push({ test: /\.csv|\.tsv$/, loader: 'csv-loader', diff --git a/package.json b/package.json index 4136d8ab1..5d4bb3a76 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "nuxt start", "export": "nuxt export", "serve": "nuxt serve", + "lint": "eslint .", "test": "node --experimental-vm-modules $(yarn bin jest)" }, "dependencies": { @@ -23,11 +24,9 @@ "avris-generator": "^0.8.2", "avris-sorter": "^0.0.3", "aws-sdk": "^2.1425.0", - "body-parser": "^1.20.2", "canvas": "^2.11.2", "cookie-parser": "^1.4.5", "cookie-universal-nuxt": "^2.1.4", - "csurf": "^1.11.0", "dotenv": "^8.2.0", "express": "^4.17.1", "express-session": "^1.17.1", @@ -92,6 +91,8 @@ "clipboard": "^2.0.6", "css-loader": "^5.2.7", "csv-loader": "^3.0.3", + "eslint": "^8.55.0", + "globals": "^13.24.0", "jest": "^29.7.0", "postcss": "^8.2.15", "postcss-import": "^13.0.0", diff --git a/plugins/.eslintrc.json b/plugins/.eslintrc.json new file mode 100644 index 000000000..b99c1118d --- /dev/null +++ b/plugins/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "env": { + "browser": true + } +} diff --git a/plugins/datepicker.js b/plugins/datepicker.js index efdb9373c..6a5683f60 100644 --- a/plugins/datepicker.js +++ b/plugins/datepicker.js @@ -1,6 +1,6 @@ import Vue from 'vue' import VuejsDatePicker from 'vuejs-datepicker' -export default ({ app }) => { +export default () => { Vue.component('datepicker', VuejsDatePicker); } diff --git a/plugins/globals.js b/plugins/globals.js index 7a5b56306..9bfc300df 100644 --- a/plugins/globals.js +++ b/plugins/globals.js @@ -48,7 +48,7 @@ export default ({ app, store }) => { Vue.prototype.$loadScript = (name, src) => { if (!process.client || document.querySelectorAll(`script.${name}-script`).length > 0) { - return new Promise((resolve, reject) => { resolve(); }); + return new Promise((resolve) => { resolve(); }); } let resolveFn; let rejectFn; @@ -83,7 +83,7 @@ export default ({ app, store }) => { return decodeTime(ulid) / 1000; } - app.router.afterEach((to, from) => { + app.router.afterEach(() => { if (typeof window !== 'undefined' && window.fusetag) { window.fusetag.pageInit(); } diff --git a/plugins/track.js b/plugins/track.js index 188bb7e3d..54e287641 100644 --- a/plugins/track.js +++ b/plugins/track.js @@ -1,14 +1,9 @@ -function defaultHandler({plausible, to, from}) { +function defaultHandler({plausible, to}) { console.debug("[analytics] Tracking default handler: %O", to); plausible.trackPageview({ url: to.toString() }) } -function eventHandler(eventName) { - return function ({plausible, to, from}) { - plausible.trackEvent(eventName, {}, {}); - } -} /** * @param {(value: URL) => URL} redactor * @param {(ctx) => void} base diff --git a/server/analyseLinks.js b/server/analyseLinks.js index 440331090..66c6c6314 100644 --- a/server/analyseLinks.js +++ b/server/analyseLinks.js @@ -18,7 +18,7 @@ const timer = ms => new Promise( res => setTimeout(res, ms)); } const results = await Promise.all(chunk.map(({url}) => Promise.race([ analyser.analyse(url), - new Promise((resolve, reject) => + new Promise((resolve) => setTimeout(() => resolve({url: url, error: new Error('timeout')}), 12000) ), ]))); diff --git a/server/calendarBot.js b/server/calendarBot.js index 95819ba9d..fb2a90327 100644 --- a/server/calendarBot.js +++ b/server/calendarBot.js @@ -73,8 +73,6 @@ const imageTmpPath = `${tmpDir}/calendar-tmp.png`; const lastPostId = {}; -const timer = ms => new Promise( res => setTimeout(res, ms)); - (async () => { if (process.argv.length !== 4) { console.error('Missing parameters. Usage: node server/calendarBot.js '); @@ -85,7 +83,7 @@ const timer = ms => new Promise( res => setTimeout(res, ms)); console.log(locales[locale].name); try { - const { day, message, image } = await (await fetch(locales[locale].url + '/api/calendar/today')).json(); + const { message, image } = await (await fetch(locales[locale].url + '/api/calendar/today')).json(); console.log('<<<', message, '>>>'); if (!message) { continue; } diff --git a/server/cards.js b/server/cards.js index 2b7de7e31..4811d71d2 100644 --- a/server/cards.js +++ b/server/cards.js @@ -79,7 +79,7 @@ const shoot = async (db, mode) => { continue; } - const s3putResponse = await s3.putObject({ + await s3.putObject({ Key: key, Body: buffer, ContentType: 'image/png', diff --git a/server/index.js b/server/index.js index e02d99ffe..e2a17f3ea 100644 --- a/server/index.js +++ b/server/index.js @@ -142,7 +142,7 @@ app.use(calendarRoute); app.use(translationsRoute); app.use(subscriptionRoute); -app.use(function (err, req, res, next) { +app.use(function (err, req, res) { console.error(formatError(err, req)); res.status(500).send('Unexpected server error'); req.db.close(); diff --git a/server/pesel.js b/server/pesel.js index 66d96f249..7f37f724c 100644 --- a/server/pesel.js +++ b/server/pesel.js @@ -53,7 +53,7 @@ const popularUnisex = {}; const allFirstUnisex = {}; const popularFirstUnisex = {}; -_each(pesel, (counts, name) => { +_each(pesel, (counts) => { counts['balanceBoth'] = calculateBalance(counts.K[0] + counts.K[1], counts.M[0] + counts.M[1]); counts['balanceFirst'] = calculateBalance(counts.K[0], counts.M[0]); counts['balanceBothPop'] = counts['balanceBoth'] * (counts.K[0] + counts.K[1] + counts.M[0] + counts.M[1]); diff --git a/server/routes/admin.js b/server/routes/admin.js index 82dcde8da..30a46421b 100644 --- a/server/routes/admin.js +++ b/server/routes/admin.js @@ -156,7 +156,7 @@ router.get('/admin/stats', handleErrorAsync(async (req, res) => { const stats = await fetchStats(req); - for (let [locale, localeStats] of Object.entries(stats)) { + for (let locale of Object.keys(stats)) { if (locale === '_' || locale === 'calculatedAt') { continue; } if (!req.isGranted('panel', locale)) { diff --git a/server/routes/census.js b/server/routes/census.js index fb25219ae..602fc2730 100644 --- a/server/routes/census.js +++ b/server/routes/census.js @@ -187,7 +187,7 @@ router.get('/census/export', handleErrorAsync(async (req, res) => { } const report = []; - for (let {answers, writins, troll} of await req.db.all(SQL` + for (let {answers, writins} of await req.db.all(SQL` SELECT answers, writins FROM census WHERE locale = ${global.config.locale} AND edition = ${global.config.census.edition} @@ -203,7 +203,7 @@ router.get('/census/export', handleErrorAsync(async (req, res) => { for (let question of config.census.questions) { if (question.type === 'checkbox') { const answerForAggregate = new Set(); - for (let [option, comment] of question.options) { + for (let [option, _comment] of question.options) { const checked = (answers[i.toString()] || []).includes(option); answer[`${i}_${option}`] = checked ? 1 : ''; if (checked) { @@ -257,7 +257,7 @@ router.post('/census/moderation/decide', handleErrorAsync(async (req, res) => { return res.status(401).json({error: 'Unauthorised'}); } - const queue = await req.db.get(SQL` + await req.db.get(SQL` UPDATE census SET troll = ${parseInt(req.body.decision)} WHERE id = ${req.body.id} `); diff --git a/server/routes/nouns.js b/server/routes/nouns.js index ad4fc6dcc..46f10fbbe 100644 --- a/server/routes/nouns.js +++ b/server/routes/nouns.js @@ -190,9 +190,9 @@ router.get('/nouns/:id.png', async (req, res) => { } let maxItems = 0; - ['masc', 'fem', 'neutr'].forEach((form, column) => { + ['masc', 'fem', 'neutr'].forEach((form) => { let items = 0; - for (let [key, symbol] of [['', '⋅'], ['Pl', '⁖']]) { + for (let key of ['', 'Pl']) { items += noun[form + key].split('|').filter(x => x.length).length; } if (items > maxItems) { diff --git a/server/routes/profile.js b/server/routes/profile.js index b20028d8c..2826f59ab 100644 --- a/server/routes/profile.js +++ b/server/routes/profile.js @@ -21,7 +21,6 @@ import multer from "multer"; const __dirname = new URL('.', import.meta.url).pathname; -const escapeRegExp = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // https://stackoverflow.com/a/6969486/3297012 const normalise = s => decodeURIComponent(s.trim().toLowerCase()); const normaliseWithLink = s => normalise(s.replace(/^@/, '').replace(new RegExp('^https://.*?/@'), '')) @@ -976,13 +975,13 @@ router.post('/profile/import', multer({limits: {fileSize: 10 * 1024 * 1024}}).an return res.status(400).json({error: 'profile.backup.error.signature'}); } - const {version, profiles, images} = JSON.parse(Buffer.from(payload, 'base64').toString('utf-8')); + const {profiles, images} = JSON.parse(Buffer.from(payload, 'base64').toString('utf-8')); const s3 = new S3(awsConfig); for (let [id, sizes] of Object.entries(images)) { for (let [size, content] of Object.entries(sizes)) { try { - const data = await s3.headObject({ + await s3.headObject({ Key: `images/${id}-${size}.png`, }).promise(); continue; diff --git a/server/routes/pronounce.js b/server/routes/pronounce.js index da3b1b657..e2dc91b45 100644 --- a/server/routes/pronounce.js +++ b/server/routes/pronounce.js @@ -59,7 +59,7 @@ router.get('/pronounce/:voice/:pronoun*', handleErrorAsync(async (req, res) => { Engine: voice.engine, }).promise(); - const s3putResponse = await s3.putObject({ + await s3.putObject({ Key: key, Body: pollyResponse.AudioStream, ContentType: pollyResponse.ContentType, diff --git a/server/routes/translations.js b/server/routes/translations.js index 2db9c9259..a0e9b079a 100644 --- a/server/routes/translations.js +++ b/server/routes/translations.js @@ -131,7 +131,6 @@ router.get('/translations/contributors', handleErrorAsync(async (req, res) => { `)) { const author_info = await req.db.get(SQL`SELECT username, roles FROM users WHERE id=${author_id}`); if (!author_info) { continue; } - const { username, roles } = author_info; contributors.push({ username: author_info.username, isMember: !!author_info.roles, diff --git a/src/classes.js b/src/classes.js index 0ce652470..5798aac4e 100644 --- a/src/classes.js +++ b/src/classes.js @@ -765,7 +765,6 @@ export class NounDeclension { decline(word, plural) { const plurality = plural ? 'plural' : 'singular'; - const rep = Object.keys(this[plurality])[0]; const base = word.substring(0, word.length - this.matches(word, plural)); const options = this[plurality]; diff --git a/src/contact.js b/src/contact.js index 5e45242d6..b83b3f56f 100644 --- a/src/contact.js +++ b/src/contact.js @@ -176,6 +176,6 @@ export function* getSocialLinks(config) { yield* getLink(socialLinks, 'shop'); } -export function* getSupportLinks(config) { +export function* getSupportLinks() { yield* getLink(supportLinks, 'all'); } diff --git a/src/links.js b/src/links.js index 887f8818a..5ff3a82bc 100644 --- a/src/links.js +++ b/src/links.js @@ -17,7 +17,7 @@ export class LinkAnalyser { let $document; try { const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), 10000); + setTimeout(() => controller.abort(), 10000); const htmlString = await (await fetch(url, {signal: controller.signal})).text(); $document = new JSDOM(htmlString, { virtualConsole: new VirtualConsole() }); } catch (e) { @@ -60,7 +60,7 @@ export class LinkAnalyser { try { const fallback = new URL('/favicon.ico', url); const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), 1000); + setTimeout(() => controller.abort(), 1000); const res = await fetch(fallback, {signal: controller.signal}); if (res.ok) { return fallback; diff --git a/src/stats.js b/src/stats.js index fb158ecd3..430f8b4f9 100644 --- a/src/stats.js +++ b/src/stats.js @@ -7,38 +7,6 @@ import expectedTranslations from '../locale/expectedTranslations.js'; import fs from 'fs'; import Suml from 'suml'; -// TODO all the duplication... -const buildDict = (fn, ...args) => { - const dict = {}; - for (let [key, value] of fn(...args)) { - dict[key] = value; - } - return dict; -} - -const zip = (list, reverse) => { - return buildDict(function* () { - for (let [k, v] of list) { - yield reverse ? [v, k] : [k, v]; - } - }); -} - -const sortByValue = (obj, reverse = false, firstN = -1) => { - let list = []; - for (let i in obj) { - if (obj.hasOwnProperty(i)) { - list.push([parseInt(obj[i]), i]); - } - } - list = list.sort((a, b) => reverse ? b[0] - a[0] : a[0] - b[0]); - if (firstN >= 0) { - list = list.slice(0, firstN); - } - - return zip(list, true); -} - const deepGet = (obj, path) => { let value = obj; for (let part of path.split('.')) { diff --git a/test/buildPronoun.test.js b/test/buildPronoun.test.js index c44a8b0e1..93c0cd979 100644 --- a/test/buildPronoun.test.js +++ b/test/buildPronoun.test.js @@ -1,4 +1,4 @@ -import { jest } from '@jest/globals'; +import { beforeEach, describe, expect, jest, test } from '@jest/globals'; // workaround to be independent of the current selected locale jest.unstable_mockModule('../data/pronouns/morphemes.js', () => { diff --git a/yarn.lock b/yarn.lock index fa61f3209..e0574cdc8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -1535,6 +1540,38 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.55.0.tgz#b721d52060f369aa259cf97392403cb9ce892ec6" + integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA== + "@fortawesome/fontawesome-pro@git+ssh://git@gitlab.com:Avris/FontAwesomePro.git": version "5.13.1" resolved "git+ssh://git@gitlab.com:Avris/FontAwesomePro.git#f00db606f659dca78b143b7bcab5671b2cb459a8" @@ -1544,6 +1581,25 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== +"@humanwhocodes/config-array@^0.11.13": + version "0.11.13" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" + integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== + dependencies: + "@humanwhocodes/object-schema" "^2.0.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" + integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1828,7 +1884,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -2449,6 +2505,11 @@ dependencies: "@types/node" "*" +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + "@vue/babel-helper-vue-jsx-merge-props@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2" @@ -2877,6 +2938,11 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^8.0.0, acorn-walk@^8.0.2: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" @@ -2892,6 +2958,11 @@ acorn@^8.0.4, acorn@^8.1.0, acorn@^8.7.1, acorn@^8.8.2: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.9.0: + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + agent-base@5: version "5.1.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" @@ -3508,24 +3579,6 @@ body-parser@1.20.1: type-is "~1.6.18" unpipe "1.0.0" -body-parser@^1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -4322,7 +4375,7 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-type@~1.0.4, content-type@~1.0.5: +content-type@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -4520,7 +4573,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -4883,7 +4936,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0, debug@^4.3.1, debug@^4.3.3: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -4934,6 +4987,11 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + deepmerge@^4.2.2: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" @@ -5083,6 +5141,13 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -5525,11 +5590,84 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.55.0: + version "8.55.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8" + integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.55.0" + "@humanwhocodes/config-array" "^0.11.13" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.1.0, esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -5542,7 +5680,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -5798,6 +5936,11 @@ fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -5831,6 +5974,13 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + file-loader@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" @@ -5968,11 +6118,25 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -6334,6 +6498,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -6367,6 +6538,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^13.19.0, globals@^13.24.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -6436,6 +6614,11 @@ grant@^5.4.21: jwk-to-pem "^2.0.5" jws "^4.0.0" +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -7197,7 +7380,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -7233,6 +7416,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -7874,6 +8062,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -7921,6 +8116,11 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -7946,6 +8146,11 @@ json-schema@0.4.0: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -8048,6 +8253,13 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -8117,6 +8329,14 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + lilconfig@^2.0.3, lilconfig@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" @@ -8250,6 +8470,11 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -8680,7 +8905,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9320,6 +9545,18 @@ optimize-css-assets-webpack-plugin@^6.0.1: last-call-webpack-plugin "^3.0.0" postcss "^8.2.1" +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -10521,6 +10758,11 @@ prebuild-install@^7.1.1: tar-fs "^2.0.0" tunnel-agent "^0.6.0" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prepend-http@^1.0.0, prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -10825,16 +11067,6 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - rc9@^2.0.1, rc9@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/rc9/-/rc9-2.1.1.tgz#6614c32db7731b44cd48641ce68f373c3ee212a9" @@ -12302,6 +12534,11 @@ text-segmentation@^1.0.3: dependencies: utrie "^1.0.2" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + thread-loader@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-3.0.4.tgz#c392e4c0241fbc80430eb680e4886819b504a31b" @@ -12509,6 +12746,13 @@ twitter@^1.7.1: deep-extend "^0.5.0" request "^2.72.0" +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" From 8d599d5a0fbbf7db7514196602c8ebf1db169955 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Tue, 12 Dec 2023 20:14:28 +0100 Subject: [PATCH 2/7] (ci) add linting plugin for Vue --- .eslintrc.json | 15 +++++++++-- components/Account.vue | 3 +-- components/InclusiveSubmitForm.vue | 2 +- components/Login.vue | 1 - components/ModeSwitch.vue | 2 +- components/TranslationMode.vue | 2 +- locale/de/nouns/NounsExtra.vue | 2 -- package.json | 3 ++- routes/adminUsers.vue | 8 +++--- routes/census.vue | 2 +- routes/design.vue | 6 ----- routes/inclusive.vue | 2 -- routes/pronoun.vue | 2 +- routes/terminology.vue | 3 --- yarn.lock | 40 ++++++++++++++++++++++++------ 15 files changed, 57 insertions(+), 36 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 87056a457..0f48ff5d5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,8 @@ }, "root": true, "extends": [ - "eslint:recommended" + "eslint:recommended", + "plugin:vue/recommended" ], "ignorePatterns": ["data", "dist", "new", "static"], "parserOptions": { @@ -24,6 +25,16 @@ "no-useless-rename": "warn", "object-shorthand": "warn", "prefer-const": "warn", - "prefer-template": "warn" + "prefer-template": "warn", + "vue/html-closing-bracket-spacing": ["warn", {"selfClosingTag": "never"}], + "vue/html-indent": ["warn", 4], + "vue/html-self-closing": ["warn", {"html": {"void": "always", "normal": "never"}}], + "vue/max-attributes-per-line": ["warn", {"singleline": 4}], + "vue/multi-word-component-names": "off", + "vue/no-use-v-if-with-v-for": ["warn"], + "vue/require-v-for-key": "warn", + "vue/script-indent": ["warn", 4], + "vue/valid-template-root": "warn", + "vue/valid-v-for": "warn" } } diff --git a/components/Account.vue b/components/Account.vue index 67e6473cb..a20804858 100644 --- a/components/Account.vue +++ b/components/Account.vue @@ -209,7 +209,6 @@ diff --git a/routes/census.vue b/routes/census.vue index 47117dd5c..98f051339 100644 --- a/routes/census.vue +++ b/routes/census.vue @@ -191,7 +191,7 @@ }), writins: buildDict(function* () { let i = 0; - for (let question of questions) { + for (let _question of questions) { yield [i, ''] i++; } diff --git a/routes/privacy.vue b/routes/privacy.vue index 3e046fa40..46b0e4b2e 100644 --- a/routes/privacy.vue +++ b/routes/privacy.vue @@ -29,7 +29,7 @@

privacy.content.turnstile

privacy.content.publift -

+ privacy.content.gtm

privacy.content.logsBackups

@@ -41,7 +41,7 @@ export default { methods: { revokeCookieConsent() { - googlefc.callbackQueue.push(googlefc.showRevocationMessage); + window.googlefc.callbackQueue.push(window.googlefc.showRevocationMessage); }, }, } diff --git a/routes/profileCard.vue b/routes/profileCard.vue index 2496089f4..2920d7d1e 100644 --- a/routes/profileCard.vue +++ b/routes/profileCard.vue @@ -1,5 +1,5 @@