diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index cdb5ff5e0..000000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -public/* -!**/.eslintrc.* -migrations -apps -packages \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index fd5c3bbde..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,78 +0,0 @@ -const finalRules = { - /* airbnb config overrides */ - 'react/jsx-filename-extension': [0], - 'import/no-extraneous-dependencies': [0], - 'import/no-named-as-default': [0], // allow component to be the same as the default export - 'class-methods-use-this': [0], - 'no-throw-literal': [0], - 'comma-dangle': [ - 'error', - { - arrays: 'always-multiline', - objects: 'always-multiline', - imports: 'always-multiline', - exports: 'always-multiline', - functions: 'never', - }, - ], - 'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }], - - // Allow prop spreading for React components, but not for html elements - 'react/jsx-props-no-spreading': [ - 2, - { - custom: 'ignore', - explicitSpread: 'ignore', - }, - ], - 'react/jsx-no-bind': [ - 2, - { - allowArrowFunctions: true, - allowFunctions: true, - }, - ], - 'react/no-unstable-nested-components': [ - 2, - { - allowAsProps: true, - }, - ], - 'react/require-default-props': [0], - 'default-param-last': [0], - 'function-call-argument-newline': [0], - 'function-paren-newline': [0], - 'no-promise-executor-return': [0], - 'react/function-component-definition': [0], - 'sonarjs/no-duplicate-string': [0], - 'sonarjs/no-identical-functions': [0], -}; - -const overrides = [ - { - files: ['frontend/**/*'], - env: { - browser: true, - node: true, - }, - }, -]; - -module.exports = { - overrides, - plugins: ['import'], - extends: [ - 'airbnb', - 'plugin:sonarjs/recommended', - 'plugin:no-unsanitized/DOM', - ], - rules: finalRules, - parserOptions: { - ecmaVersion: 2021, - }, - settings: { - 'import/resolver': { - webpack: {} - }, - }, -}; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..5c4ea30a7 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +# Ignore artifacts: +build +coverage + +Ignore All Non JS +**/*.yml +**/*.md +**/*.css +**/*.scss +**/*.njk diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..544138be4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/admin-client/.eslintrc.json b/admin-client/.eslintrc.json deleted file mode 100644 index 9fb41a6aa..000000000 --- a/admin-client/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true - }, - "parserOptions": { - "ecmaVersion": 2021, - "sourceType": "module" - }, - "plugins": ["svelte3"], - "extends": ["airbnb-base"], - "overrides": [ - { - "files": ["**/*.svelte"], - "processor": "svelte3/svelte3", - "rules": { - "import/first": "off", - "import/no-mutable-exports": "off", - "import/prefer-default-export": "off" - } - } - ], - "ignorePatterns": [ - "rollup.config.js", - "jsonTreeView.js" - ] -} diff --git a/admin-client/eslint.config.mjs b/admin-client/eslint.config.mjs new file mode 100644 index 000000000..b30ec0694 --- /dev/null +++ b/admin-client/eslint.config.mjs @@ -0,0 +1,25 @@ +import globals from 'globals'; +import pluginJs from '@eslint/js'; +import eslintPluginSvelte from 'eslint-plugin-svelte'; + +export default [ + { languageOptions: { globals: { ...globals.browser, process: false } } }, + { files: ['**/*.svelte'] }, + { + ignores: ['public/build', 'rollup.config.js'], + }, + pluginJs.configs.recommended, + ...eslintPluginSvelte.configs['flat/recommended'], + { + rules: { + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, +]; diff --git a/admin-client/jest.config.js b/admin-client/jest.config.js deleted file mode 100644 index 1b2f77df9..000000000 --- a/admin-client/jest.config.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - transform: { - '^.+\\.svelte$': 'jest-transform-svelte', - '^.+\\.js$': 'babel-jest', - }, - moduleFileExtensions: ['js', 'svelte'], - testPathIgnorePatterns: ['node_modules'], - bail: false, - verbose: true, - transformIgnorePatterns: ['node_modules'], - setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'], -}; diff --git a/admin-client/package.json b/admin-client/package.json index b55934002..2cb8c13ad 100644 --- a/admin-client/package.json +++ b/admin-client/package.json @@ -13,13 +13,15 @@ "node": "^20.x.x" }, "devDependencies": { + "@eslint/js": "^9.13.0", "@rollup/plugin-commonjs": "^12.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", - "eslint": "^8.53.0", + "eslint": "^9.13.0", "eslint-config-airbnb-base": "^14.2.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-svelte3": "^3.2.0", + "eslint-plugin-svelte": "^2.46.0", + "globals": "^15.11.0", "rollup": "^2.3.4", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-livereload": "^1.0.0", diff --git a/admin-client/src/flows/organizations.js b/admin-client/src/flows/organizations.js index fc04ca63c..281d9a38e 100644 --- a/admin-client/src/flows/organizations.js +++ b/admin-client/src/flows/organizations.js @@ -3,7 +3,6 @@ import { notification } from '../stores'; import { deactivateOrganization, activateOrganization } from '../lib/api'; async function deactivate(id, redirectTo) { - // eslint-disable-next-line no-alert if (!window.confirm('Are you sure you want to deactivate this organization?')) { return null; } try { await deactivateOrganization(id); diff --git a/admin-client/src/helpers/downloadCSV.js b/admin-client/src/helpers/downloadCSV.js index efae06f11..2502dabbe 100644 --- a/admin-client/src/helpers/downloadCSV.js +++ b/admin-client/src/helpers/downloadCSV.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ export const downloadCSV = async (fetchCSV, filename) => { const csv = await fetchCSV(); const blob = new Blob([csv], { type: 'application/octet-stream' }); diff --git a/admin-client/src/helpers/formatter.js b/admin-client/src/helpers/formatter.js index 236f49388..c588c450c 100644 --- a/admin-client/src/helpers/formatter.js +++ b/admin-client/src/helpers/formatter.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { format, formatRelative } from 'date-fns'; export const formatDateTime = (date, relative = false) => { @@ -6,7 +5,7 @@ export const formatDateTime = (date, relative = false) => { return relative ? formatRelative(new Date(date), new Date()) : format(new Date(date), 'yyyy-MM-dd hh:mma'); - } catch (error) { + } catch (_) { return 'N/A'; } }; @@ -14,7 +13,7 @@ export const formatDateTime = (date, relative = false) => { export const formatSha = (commit) => { try { return commit.slice(0, 7); - } catch (error) { + } catch (_) { return 'N/A'; } }; diff --git a/admin-client/src/lib/api.js b/admin-client/src/lib/api.js index 7c3221660..0da72adec 100644 --- a/admin-client/src/lib/api.js +++ b/admin-client/src/lib/api.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ /* global API_URL */ import { notification, session } from '../stores'; import { logout as authLogout } from './auth'; @@ -13,18 +12,15 @@ const defaultOptions = { mode: 'cors', }; -// eslint-disable-next-line no-underscore-dangle function _setSearchString(query = {}) { const search = new URLSearchParams(); - // eslint-disable-next-line array-callback-return Object.keys(query).map((key) => { search.set(key, query[key]); }); return search.toString(); } -// eslint-disable-next-line no-underscore-dangle async function _fetch(path, fetchOpts = {}, apiOpts = { handleError: true }) { const fetchOptions = { ...defaultOptions, ...fetchOpts }; if (!['GET', 'HEAD', 'OPTIONS'].includes(fetchOptions.method)) { @@ -58,7 +54,6 @@ async function _fetch(path, fetchOpts = {}, apiOpts = { handleError: true }) { return request; } -// eslint-disable-next-line no-underscore-dangle async function _fetchAttachedFile(path) { const fetchOptions = { ...defaultOptions }; fetchOptions.headers['x-csrf-token'] = session.csrfToken(); @@ -125,7 +120,6 @@ function fetchBuildLogEventSource(id, onMessage) { const es = new EventSource(`${apiUrl}/admin/builds/${id}/log`, { withCredentials: true }); es.addEventListener('message', onMessage); es.addEventListener('error', (error) => { - // eslint-disable-next-line no-console console.error('EventSource failed:', error); if (es) { es.close(); diff --git a/admin-client/src/lib/jsonTreeView.js b/admin-client/src/lib/jsonTreeView.js index b41a67de6..f407d449a 100644 --- a/admin-client/src/lib/jsonTreeView.js +++ b/admin-client/src/lib/jsonTreeView.js @@ -393,11 +393,6 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { : (n >> (i + 1) << (i + 1)) | (n % (n >> i << i)) | (+b << i); } - function squarebracketify(exp) { - return typeof exp === 'string' - ? exp.replace(/\.([0-9]+)/g, '[$1]') : `${exp}`; - } - function refresh(silent) { const expandable = type == 'object' || type == 'array'; @@ -487,11 +482,11 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { let child; let event; - while (event = domEventListeners.pop()) { + while (event === domEventListeners.pop()) { event.element.removeEventListener(event.name, event.fn); } - while (child = children.pop()) { + while (child === children.pop()) { removeChild(child); } } @@ -668,7 +663,7 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { document.execCommand('selectAll', false, null); } - function itemClicked(field) { + function itemClicked() { self.emit('click', self, !self.withRootName && self.isRoot ? [''] : [self.name], self.value); } @@ -705,7 +700,7 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { const text = element.innerText; try { setValue(text === 'undefined' ? undefined : JSON.parse(text)); - } catch (err) { + } catch (_) { setValue(text); } } @@ -800,28 +795,28 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { } } - function onInsertClick() { - const newName = type == 'array' ? value.length : undefined; - const child = addChild(newName, null); - if (child.parent) { - child.parent.inserting = true; - } - if (type == 'array') { - value.push(null); - child.editValue(); - child.emit('append', self, [value.length - 1], 'value', null, true); - if (child.parent) { - child.parent.inserting = false; - } - } else { - child.editName(); - } - } - - function onDeleteClick() { - self.emit('delete', self, [self.name], self.value, - self.parent.isRoot ? self.parent.oldType : self.parent.type, false); - } + // function onInsertClick() { + // const newName = type == 'array' ? value.length : undefined; + // const child = addChild(newName, null); + // if (child.parent) { + // child.parent.inserting = true; + // } + // if (type == 'array') { + // value.push(null); + // child.editValue(); + // child.emit('append', self, [value.length - 1], 'value', null, true); + // if (child.parent) { + // child.parent.inserting = false; + // } + // } else { + // child.editName(); + // } + // } + + // function onDeleteClick() { + // self.emit('delete', self, [self.name], self.value, + // self.parent.isRoot ? self.parent.oldType : self.parent.type, false); + // } function onChildRename(child, keyPath, oldName, newName, original) { const allow = newName && type != 'array' && !(newName in value) && original; @@ -847,9 +842,8 @@ function JSONTreeView(name_, value_, parent_, isRoot_) { if (self.withRootName || !self.isRoot) { keyPath.unshift(name); - } else if (self.withRootName && self.isRoot) { - keyPath.unshift(name); } + if (oldName !== undefined) { self.emit('rename', child, keyPath, oldName, newName, false); } diff --git a/admin-client/src/pages/domain/Show.svelte b/admin-client/src/pages/domain/Show.svelte index 6584b4362..71fc15345 100644 --- a/admin-client/src/pages/domain/Show.svelte +++ b/admin-client/src/pages/domain/Show.svelte @@ -35,7 +35,6 @@ } async function deprovision() { - // eslint-disable-next-line no-alert if (window.confirm('Are you sure you want to deprovision this domain?')) { domainPromise = deprovisionDomain(id); await domainPromise; @@ -44,7 +43,6 @@ } async function destroy() { - // eslint-disable-next-line no-alert if (!window.confirm('Are you sure you want to destroy this domain?')) { return null; } try { await destroyDomain(id); @@ -126,4 +124,4 @@ {/if} - \ No newline at end of file + diff --git a/admin-client/src/stores/router.js b/admin-client/src/stores/router.js index 077bfe680..bc704a8f8 100644 --- a/admin-client/src/stores/router.js +++ b/admin-client/src/stores/router.js @@ -5,6 +5,6 @@ const initial = {}; const { set, subscribe } = writable(initial); export default { - setContext: ({ page, ...rest }) => set(rest), + setContext: ({ _, ...rest }) => set(rest), subscribe, }; diff --git a/admin-client/yarn.lock b/admin-client/yarn.lock index a5734df99..bbb2e103a 100644 --- a/admin-client/yarn.lock +++ b/admin-client/yarn.lock @@ -32,56 +32,86 @@ dependencies: regenerator-runtime "^0.14.0" -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.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.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" - integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== +"@eslint-community/regexpp@^4.11.0": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== -"@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== +"@eslint/config-array@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" + integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.7.0.tgz#a1bb4b6a4e742a5ff1894b7ee76fbf884ec72bd3" + integrity sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw== + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.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.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9.13.0", "@eslint/js@^9.13.0": + version "9.13.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.13.0.tgz#c5f89bcd57eb54d5d4fa8b77693e9c28dc97e547" + integrity sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@eslint/plugin-kit@^0.2.0": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz#cd14fe2db79fa639839dfef4105e83bad1814482" + integrity sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" + levn "^0.4.1" + +"@humanfs/core@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.0.tgz#08db7a8c73bb07673d9ebd925f2dad746411fcec" + integrity sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw== + +"@humanfs/node@^0.16.5": + version "0.16.5" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.5.tgz#a9febb7e7ad2aff65890fdc630938f8d20aa84ba" + integrity sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg== + dependencies: + "@humanfs/core" "^0.19.0" + "@humanwhocodes/retry" "^0.3.0" "@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.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0", "@humanwhocodes/retry@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" @@ -115,6 +145,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/sourcemap-codec@^1.4.15": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" @@ -136,7 +171,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.8": +"@nodelib/fs.walk@^1.2.3": 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== @@ -202,6 +237,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/fs-extra@^8.0.1": version "8.1.5" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.5.tgz#33aae2962d3b3ec9219b5aca2555ee00274f5927" @@ -217,6 +257,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -241,11 +286,6 @@ 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== - "@uswds/uswds@^3.8.2": version "3.8.2" resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.8.2.tgz#230668293c33f6866995ba9d03d6f42aba251336" @@ -260,7 +300,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.12.0, acorn@^8.9.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.13.0.tgz#2a30d670818ad16ddd6a35d3842dacec9e5d7ca3" + integrity sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w== + +acorn@^8.8.2: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== @@ -275,11 +320,6 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -531,6 +571,11 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + data-view-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" @@ -626,13 +671,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -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" - element-closest@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/element-closest/-/element-closest-2.0.2.tgz#72a740a107453382e28df9ce5dbb5a8df0f966ec" @@ -744,6 +782,13 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-compat-utils@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4" + integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q== + dependencies: + semver "^7.5.4" + eslint-config-airbnb-base@^14.2.0: version "14.2.1" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" @@ -792,10 +837,22 @@ eslint-plugin-import@^2.29.0: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-svelte3@^3.2.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-svelte3/-/eslint-plugin-svelte3-3.4.1.tgz#3618700333c8f8f12e28aec93bf18440d44a61fd" - integrity sha512-7p59WG8qV8L6wLdl4d/c3mdjkgVglQCdv5XOTk/iNPBKXuuV+Q0eFP5Wa6iJd/G2M1qR3BkLPEzaANOqKAZczw== +eslint-plugin-svelte@^2.46.0: + version "2.46.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-svelte/-/eslint-plugin-svelte-2.46.0.tgz#87bcc2820233065f79114012203b082319ff03e9" + integrity sha512-1A7iEMkzmCZ9/Iz+EAfOGYL8IoIG6zeKEq1SmpxGeM5SXmoQq+ZNnCpXFVJpsxPWYx8jIVGMerQMzX20cqUl0g== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@jridgewell/sourcemap-codec" "^1.4.15" + eslint-compat-utils "^0.5.1" + esutils "^2.0.3" + known-css-properties "^0.35.0" + postcss "^8.4.38" + postcss-load-config "^3.1.4" + postcss-safe-parser "^6.0.0" + postcss-selector-parser "^6.1.0" + semver "^7.6.2" + svelte-eslint-parser "^0.43.0" eslint-scope@^7.2.2: version "7.2.2" @@ -805,56 +862,75 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.1.0.tgz#70214a174d4cbffbc3e8a26911d8bf51b9ae9d30" + integrity sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw== + 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.53.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint-visitor-keys@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz#1f785cc5e81eb7534523d85922248232077d2f8c" + integrity sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg== + +eslint@^9.13.0: + version "9.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.13.0.tgz#7659014b7dda1ff876ecbd990f726e11c61596e6" + integrity sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.18.0" + "@eslint/core" "^0.7.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.13.0" + "@eslint/plugin-kit" "^0.2.0" + "@humanfs/node" "^0.16.5" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@humanwhocodes/retry" "^0.3.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" 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" + eslint-scope "^8.1.0" + eslint-visitor-keys "^4.1.0" + espree "^10.2.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" 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: +espree@^10.0.1, espree@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.2.0.tgz#f4bcead9e05b0615c968e85f83816bc386a45df6" + integrity sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g== + dependencies: + acorn "^8.12.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.1.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== @@ -863,10 +939,10 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -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== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -892,7 +968,7 @@ estree-walker@^1.0.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== -esutils@^2.0.2: +esutils@^2.0.2, esutils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== @@ -930,12 +1006,12 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -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== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" fill-range@^7.1.1: version "7.1.1" @@ -952,14 +1028,13 @@ 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== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flatted@^3.2.9: version "3.3.1" @@ -1063,12 +1138,15 @@ glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.19.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" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^15.11.0: + version "15.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.11.0.tgz#b96ed4c6998540c6fb824b24b5499216d2438d6e" + integrity sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw== globalthis@^1.0.3: version "1.0.4" @@ -1104,11 +1182,6 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -1285,11 +1358,6 @@ 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-object@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" @@ -1415,7 +1483,7 @@ keyboardevent-key-polyfill@^1.0.2: resolved "https://registry.yarnpkg.com/keyboardevent-key-polyfill/-/keyboardevent-key-polyfill-1.1.0.tgz#8a319d8e45a13172fca56286372f90c1d4c7014c" integrity sha512-NTDqo7XhzL1fqmUzYroiyK2qGua7sOMzLav35BfNA/mPUSCtw8pZghHFMTYR9JdnJ23IQz695FcaM6EE6bpbFQ== -keyv@^4.5.3: +keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -1427,6 +1495,11 @@ kleur@^3.0.0: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +known-css-properties@^0.35.0: + version "0.35.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.35.0.tgz#f6f8e40ab4e5700fa32f5b2ef5218a56bc853bd6" + integrity sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A== + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -1435,6 +1508,11 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lilconfig@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" + integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== + livereload-js@^3.3.1: version "3.4.1" resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-3.4.1.tgz#ba90fbc708ed1b9a024bb89c4ee12c96ea03d66f" @@ -1497,7 +1575,7 @@ micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +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== @@ -1529,6 +1607,11 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -1690,6 +1773,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== +picocolors@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -1700,6 +1788,41 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== +postcss-load-config@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" + integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== + dependencies: + lilconfig "^2.0.5" + yaml "^1.10.2" + +postcss-safe-parser@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" + integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== + +postcss-scss@^4.0.9: + version "4.0.9" + resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.9.tgz#a03c773cd4c9623cb04ce142a52afcec74806685" + integrity sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A== + +postcss-selector-parser@^6.1.0: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss@^8.4.38, postcss@^8.4.39: + version "8.4.47" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.1.0" + source-map-js "^1.2.1" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -1783,13 +1906,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - rollup-plugin-copy@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/rollup-plugin-copy/-/rollup-plugin-copy-3.5.0.tgz#7ffa2a7a8303e143876fa64fb5eed9022d304eeb" @@ -1889,6 +2005,11 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.5.4, semver@^7.6.2: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -1968,6 +2089,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -2014,13 +2140,6 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -2057,6 +2176,17 @@ svelecte@^3.17.2: dependencies: svelte-tiny-virtual-list "^2.0.0" +svelte-eslint-parser@^0.43.0: + version "0.43.0" + resolved "https://registry.yarnpkg.com/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz#649e80f65183c4c1d1536d03dcb903e0632f4da4" + integrity sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA== + dependencies: + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + postcss "^8.4.39" + postcss-scss "^4.0.9" + svelte-tiny-virtual-list@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/svelte-tiny-virtual-list/-/svelte-tiny-virtual-list-2.1.2.tgz#db826e5915f0374b793798bc8125b8a66fbc6c34" @@ -2116,11 +2246,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -2192,6 +2317,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -2236,6 +2366,11 @@ ws@^7.4.3: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== +yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" diff --git a/api/controllers/domain.js b/api/controllers/domain.js index c3a8dd20b..4742f9979 100644 --- a/api/controllers/domain.js +++ b/api/controllers/domain.js @@ -146,7 +146,7 @@ module.exports = wrapHandlers({ }); } }, - // eslint-disable-next-line sonarjs/cognitive-complexity + async update(req, res) { const { params, body, user } = req; const siteId = parseInt(params.site_id, 10); diff --git a/api/controllers/site-branch-config.js b/api/controllers/site-branch-config.js index 298c37829..4d1fc7494 100644 --- a/api/controllers/site-branch-config.js +++ b/api/controllers/site-branch-config.js @@ -145,6 +145,7 @@ module.exports = wrapHandlers({ const { id, site_id: siteId } = params; const site = await Site.forUser(user) + // eslint-disable-next-line testing-library/await-async-queries .findByPk(siteId) .catch(() => null); diff --git a/api/controllers/user-environment-variable.js b/api/controllers/user-environment-variable.js index 8181eb0f9..63e7565e1 100644 --- a/api/controllers/user-environment-variable.js +++ b/api/controllers/user-environment-variable.js @@ -71,6 +71,7 @@ module.exports = wrapHandlers({ const { params, user } = req; const { id, site_id: siteId } = params; + // eslint-disable-next-line testing-library/await-async-queries const site = await Site.forUser(user).findByPk(siteId) .catch(() => null); diff --git a/api/middlewares/error-handler.js b/api/middlewares/error-handler.js index b15d5361a..3753a8af2 100644 --- a/api/middlewares/error-handler.js +++ b/api/middlewares/error-handler.js @@ -1,6 +1,5 @@ const EventCreator = require('../services/EventCreator'); -// eslint-disable-next-line no-unused-vars function errorHandler(err, req, res, _next) { EventCreator.handlerError(req, err); if (!res.headersSent) { diff --git a/api/middlewares/four-oh-four-handler.js b/api/middlewares/four-oh-four-handler.js index 1e2a7a893..697c97d4d 100644 --- a/api/middlewares/four-oh-four-handler.js +++ b/api/middlewares/four-oh-four-handler.js @@ -1,6 +1,5 @@ const { defaultContext } = require('../utils'); -// eslint-disable-next-line no-unused-vars function fourOhFourHandler(req, res) { const context = defaultContext(req, res); if (req.session.authenticated) { diff --git a/api/responses/serverError.js b/api/responses/serverError.js index 7c2414871..b83f77337 100644 --- a/api/responses/serverError.js +++ b/api/responses/serverError.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ module.exports = (_error = {}, { res }) => { res.status(500); return res.json({ @@ -6,4 +5,3 @@ module.exports = (_error = {}, { res }) => { status: 500, }); }; -/* eslint-enable no-unused-vars */ diff --git a/api/services/GitHub.js b/api/services/GitHub.js index 3d615aef0..a7e61909d 100644 --- a/api/services/GitHub.js +++ b/api/services/GitHub.js @@ -32,13 +32,13 @@ const parseGithubErrorMessage = (error) => { try { githubError = error.response.data.errors[0].message; - } catch (e) { + } catch { try { githubError = error.errors[0].message; - } catch (e2) { + } catch { try { githubError = error.message; - } catch (e3) { /* noop */ } + } catch { /* noop */ } } } diff --git a/api/services/GithubBuildHelper.js b/api/services/GithubBuildHelper.js index 919c28fbd..596ecbbf9 100644 --- a/api/services/GithubBuildHelper.js +++ b/api/services/GithubBuildHelper.js @@ -23,7 +23,7 @@ const getAccessTokenWithCertainPermissions = async (site, siteUsers, permission) } count += 1; return getNextToken(users[count]); - } catch (err) { + } catch { count += 1; return getNextToken(users[count]); } diff --git a/api/services/S3SiteRemover.js b/api/services/S3SiteRemover.js index f3deecd12..38c50f79b 100644 --- a/api/services/S3SiteRemover.js +++ b/api/services/S3SiteRemover.js @@ -8,7 +8,7 @@ const handleError = (err) => { if (!err.message.match(/Not found/)) { throw err; } - } catch (e) { + } catch { throw err; } }; diff --git a/api/utils/validators.js b/api/utils/validators.js index e4d97a4d6..3fa0a3ae7 100644 --- a/api/utils/validators.js +++ b/api/utils/validators.js @@ -1,4 +1,3 @@ -/* eslint-disable max-classes-per-file */ const yaml = require('js-yaml'); const validator = require('validator'); @@ -39,7 +38,7 @@ function isValidJSON(json) { function isValidYaml(yamlString) { try { yaml.load(yamlString); - } catch (e) { + } catch { // for Sequelize validators, we need to throw an error // on invalid values throw new Error('input is not valid YAML'); @@ -57,7 +56,7 @@ function parseSiteConfig(siteConfig, configName = null) { } if ((typeof siteConfig) === 'object') { return siteConfig; } - } catch (e) { + } catch { // on invalid values let msg = 'input is not valid YAML'; if (configName) { diff --git a/e2e/example.spec.js b/e2e/example.spec.js index a7564c4b2..21d40bc54 100644 --- a/e2e/example.spec.js +++ b/e2e/example.spec.js @@ -9,5 +9,6 @@ test('has title', async ({ page }) => { test('use cookie login', async ({ page }) => { await page.goto('/sites'); + // eslint-disable-next-line testing-library/prefer-screen-queries await expect(page.getByText('Your sites')).toBeVisible(); }); diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..05bc6f458 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,94 @@ +import globals from 'globals'; +import pluginJs from '@eslint/js'; +import pluginReact from 'eslint-plugin-react'; +import mochaPlugin from 'eslint-plugin-mocha'; +import eslintConfigPrettier from 'eslint-config-prettier'; +import testingLibrary from 'eslint-plugin-testing-library'; +import jsxA11y from 'eslint-plugin-jsx-a11y'; +import importPlugin from 'eslint-plugin-import'; +// import sonarjsPlugin from 'eslint-plugin-sonarjs'; + +export default [ + { + files: ['**/*.js'], + ignores: ['frontend/**/*.{js,jsx}'], + ...importPlugin.flatConfigs.recommended, + languageOptions: { globals: globals.node, sourceType: 'commonjs' }, + }, + { + ignores: [ + 'test/frontend/**/*.{js,jsx}', + 'public/*', + '!**/.eslintrc.*', + 'migrations', + 'apps', + 'packages', + 'dist', + 'admin-client', + ], + }, + { + ...mochaPlugin.configs.flat.recommended, + rules: { + 'mocha/no-mocha-arrows': 'off', + }, + }, + { + rules: { + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, + { + files: ['frontend/**/*.{js,jsx}'], + settings: { + react: { + version: 'detect', + }, + }, + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + ...globals.browser, + ...globals.mocha, + global: false, + process: false, + }, + }, + }, + pluginReact.configs.flat['jsx-runtime'], + pluginReact.configs.flat.recommended, + jsxA11y.flatConfigs.recommended, + testingLibrary.configs['flat/react'], + pluginJs.configs.recommended, + + // ignore for a future PR to minimize noise + // sonarjsPlugin.configs.recommended, + eslintConfigPrettier, + { + settings: { + react: { + version: 'detect', + }, + }, + rules: { + 'no-await-in-loop': 'error', + 'no-console': 'error', + 'no-param-reassign': 'error', + 'no-plusplus': 'error', + // ignore for a future PR to minimize noise + // 'max-len': ['error', { code: 80, ignoreUrls: true }], + }, + }, +]; diff --git a/frontend/hooks/useBuildDetails.js b/frontend/hooks/useBuildDetails.js index 9b8be5875..61ed0a182 100644 --- a/frontend/hooks/useBuildDetails.js +++ b/frontend/hooks/useBuildDetails.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useBuildLogs.js b/frontend/hooks/useBuildLogs.js index 5105850df..bee28dbc1 100644 --- a/frontend/hooks/useBuildLogs.js +++ b/frontend/hooks/useBuildLogs.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useBuildTaskTypes.js b/frontend/hooks/useBuildTaskTypes.js index 19ad2eabe..1123c19b0 100644 --- a/frontend/hooks/useBuildTaskTypes.js +++ b/frontend/hooks/useBuildTaskTypes.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useBuildTasks.js b/frontend/hooks/useBuildTasks.js index e7beb61ec..3e066371d 100644 --- a/frontend/hooks/useBuildTasks.js +++ b/frontend/hooks/useBuildTasks.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useBuildTasksForSite.js b/frontend/hooks/useBuildTasksForSite.js index 5b41fb27b..ce882fbe1 100644 --- a/frontend/hooks/useBuildTasksForSite.js +++ b/frontend/hooks/useBuildTasksForSite.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useDefaultScanRules.js b/frontend/hooks/useDefaultScanRules.js index 80dc617cb..0e872670e 100644 --- a/frontend/hooks/useDefaultScanRules.js +++ b/frontend/hooks/useDefaultScanRules.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useOrganizationRoles.js b/frontend/hooks/useOrganizationRoles.js index 71840cbb8..88a3f13f2 100644 --- a/frontend/hooks/useOrganizationRoles.js +++ b/frontend/hooks/useOrganizationRoles.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useReportData.js b/frontend/hooks/useReportData.js index 8126b3ec7..cee7adcd4 100644 --- a/frontend/hooks/useReportData.js +++ b/frontend/hooks/useReportData.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useScannableBuild.js b/frontend/hooks/useScannableBuild.js index bb1c4a63b..124b54b95 100644 --- a/frontend/hooks/useScannableBuild.js +++ b/frontend/hooks/useScannableBuild.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useState } from 'react'; import api from '../util/federalistApi'; import alertActions from '../actions/alertActions'; diff --git a/frontend/hooks/useSiteBranchConfigs.js b/frontend/hooks/useSiteBranchConfigs.js index e980933fa..69694f14b 100644 --- a/frontend/hooks/useSiteBranchConfigs.js +++ b/frontend/hooks/useSiteBranchConfigs.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useSiteBuildTasks.js b/frontend/hooks/useSiteBuildTasks.js index 7fd8553b4..c4bbb90c4 100644 --- a/frontend/hooks/useSiteBuildTasks.js +++ b/frontend/hooks/useSiteBuildTasks.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import api from '../util/federalistApi'; diff --git a/frontend/hooks/useSiteDomains.js b/frontend/hooks/useSiteDomains.js index 3f771e970..b55045ef9 100644 --- a/frontend/hooks/useSiteDomains.js +++ b/frontend/hooks/useSiteDomains.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import _ from 'underscore'; @@ -49,12 +48,10 @@ export const useSiteDomains = (siteId, domainId) => { const selected = domains.data.find(d => d.id === id); if (!selected) { - // eslint-disable-next-line no-alert return window.alert('This custom domain was not found.'); } if (selected.state !== 'pending') { - // eslint-disable-next-line no-alert window.alert( `You cannot delete this custom domain since it is ${selected.state}. Please email pages-support@cloud.gov to take down ${selected.names}` @@ -63,7 +60,6 @@ export const useSiteDomains = (siteId, domainId) => { if ( selected.state === 'pending' - // eslint-disable-next-line no-alert && window.confirm( `Are you sure you want to delete the custom domain ${selected.names}?` ) @@ -74,7 +70,6 @@ export const useSiteDomains = (siteId, domainId) => { .catch(error => setDomains({ ...domains, error })); } - // eslint-disable-next-line no-alert return window.confirm( `Unable to delete the custom domain ${selected.names}?` ); @@ -178,7 +173,7 @@ export const useSiteDomain = (siteIdArg, domainIdArg) => { .then(() => navigate(`/sites/${siteId}/custom-domains`)) .catch(error => setDomain({ ...domain, error })); } - // eslint-disable-next-line no-alert + return window.alert( `You cannot edit this custom domain since it is ${domain.state}. Please email pages-support@cloud.gov to edit ${domain.names}` diff --git a/frontend/middleware.js b/frontend/middleware.js index b4d5a733f..ad44bde59 100644 --- a/frontend/middleware.js +++ b/frontend/middleware.js @@ -1,6 +1,5 @@ import Notifications from 'react-notification-system-redux'; -// eslint-disable-next-line import/prefer-default-export export const createNotifier = notificationSettings => store => next => (action) => { // This middleware creation function takes a notificationSettings object and // returns a Redux middleware. See notificationSettings.js for example settings. diff --git a/frontend/pages/organizations/edit/AddUserForm.jsx b/frontend/pages/organizations/edit/AddUserForm.jsx index d4140c72c..f04885003 100644 --- a/frontend/pages/organizations/edit/AddUserForm.jsx +++ b/frontend/pages/organizations/edit/AddUserForm.jsx @@ -1,5 +1,3 @@ -/* eslint-disable react/forbid-prop-types */ - import React from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; diff --git a/frontend/pages/organizations/edit/OrganizationTable.jsx b/frontend/pages/organizations/edit/OrganizationTable.jsx index 9f2978f86..cef841a11 100644 --- a/frontend/pages/organizations/edit/OrganizationTable.jsx +++ b/frontend/pages/organizations/edit/OrganizationTable.jsx @@ -1,4 +1,3 @@ -/* eslint-disable react/forbid-prop-types */ import React from 'react'; import PropTypes from 'prop-types'; import { timeFrom } from '@util/datetime'; @@ -10,7 +9,6 @@ import ResendInviteForm from './ResendInviteForm'; import UpdateUserForm from './UpdateUserForm'; function showRemoveConfirm(member, org) { - // eslint-disable-next-line no-alert return window.confirm(`Are you sure you want to remove ${member.User.UAAIdentity.email} from ${org.name}?`); } diff --git a/frontend/pages/organizations/edit/UpdateUserForm.jsx b/frontend/pages/organizations/edit/UpdateUserForm.jsx index 40f60ebc3..4b556b6b4 100644 --- a/frontend/pages/organizations/edit/UpdateUserForm.jsx +++ b/frontend/pages/organizations/edit/UpdateUserForm.jsx @@ -1,5 +1,3 @@ -/* eslint-disable react/forbid-prop-types */ - import React from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; @@ -12,7 +10,6 @@ function validateRole(roleId, _, { roleOptions }) { } const UpdateUserForm = ({ - initialValues, // eslint-disable-line no-unused-vars invalid, pristine, handleSubmit, diff --git a/frontend/pages/reports/components/A11yScanChildLayout.jsx b/frontend/pages/reports/components/A11yScanChildLayout.jsx index f0b8e8e54..57be6f602 100644 --- a/frontend/pages/reports/components/A11yScanChildLayout.jsx +++ b/frontend/pages/reports/components/A11yScanChildLayout.jsx @@ -196,12 +196,10 @@ const A11yPassed = ({ passes = [] }) => ( ); A11yPassed.propTypes = { - // eslint-disable-next-line react/forbid-prop-types passes: PropTypes.array.isRequired, }; A11yScanChild.propTypes = { - // eslint-disable-next-line react/forbid-prop-types data: PropTypes.object.isRequired, siteId: PropTypes.number.isRequired, buildId: PropTypes.number.isRequired, diff --git a/frontend/pages/reports/components/A11yScanIndexLayout.jsx b/frontend/pages/reports/components/A11yScanIndexLayout.jsx index 47d1a01ff..2a7c88a57 100644 --- a/frontend/pages/reports/components/A11yScanIndexLayout.jsx +++ b/frontend/pages/reports/components/A11yScanIndexLayout.jsx @@ -183,7 +183,6 @@ const IssuesCount = ({ violationsCount = 0, indexPills = [], moreCount = 0 }) => IssuesCount.propTypes = { violationsCount: PropTypes.number.isRequired, - // eslint-disable-next-line react/forbid-prop-types indexPills: PropTypes.array.isRequired, moreCount: PropTypes.number.isRequired, }; @@ -236,13 +235,11 @@ const ScanResultsChildPages = ({ pages = [], baseurl }) => ( ); ScanResultsChildPages.propTypes = { - // eslint-disable-next-line react/forbid-prop-types pages: PropTypes.array.isRequired, baseurl: PropTypes.string, }; A11yScanIndex.propTypes = { - // eslint-disable-next-line react/forbid-prop-types data: PropTypes.object.isRequired, siteId: PropTypes.number.isRequired, buildId: PropTypes.number.isRequired, diff --git a/frontend/pages/reports/components/ScanFinding.jsx b/frontend/pages/reports/components/ScanFinding.jsx index e90fab6ae..9c9a0936c 100644 --- a/frontend/pages/reports/components/ScanFinding.jsx +++ b/frontend/pages/reports/components/ScanFinding.jsx @@ -83,7 +83,6 @@ const ScanFinding = ({ }; ScanFinding.propTypes = { - // eslint-disable-next-line react/forbid-prop-types finding: PropTypes.object, groupColor: PropTypes.string, groupLabel: PropTypes.string, @@ -136,7 +135,6 @@ FindingTitle.propTypes = { groupLabel: PropTypes.string.isRequired, groupColor: PropTypes.string.isRequired, count: PropTypes.number, - // eslint-disable-next-line react/forbid-prop-types criteria: PropTypes.array, scanType: PropTypes.string.isRequired, anchor: PropTypes.string.isRequired, @@ -245,9 +243,8 @@ const FindingRecommendation = ({ anchor, solution, scanType }) => ( # ) : ( -
- { /* eslint-disable-next-line react/no-array-index-key */ } -