diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6839bf69a5e..00000000000 --- a/.eslintignore +++ /dev/null @@ -1,49 +0,0 @@ -# Javascript builds -node_modules -dist -thirdparty -tsc_out -.out -.changelog -.DS_Store -coverage -.cache -.tmp -**/Generated -**/build -css -packages/react-docs/.cache -packages/react-docs/static -packages/react-docs/public -packages/react-integration/results -packages/react-integration/demo-app-ts/dist - -# package managers -yarn-error.log -lerna-debug.log - -# IDEs and editors -.idea -.project -.classpath -.c9 -*.launch -.settings -*.sublime-workspace -.history -.vscode - -# IDE - VSCode -.vscode -# For vim -*.swp - -# Deploy directory -docs - -# Copied types -DeprecatedPopperTypes.ts -DeprecatedTippyTypes.ts - -# Copied thirdparty -packages/react-core/src/helpers/Popper/thirdparty/**/* diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3a2df3f2fe5..00000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "es6": true - }, - "plugins": [ - "@typescript-eslint", - "prettier", - "patternfly-react" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "settings": { - "react": { - "version": "detect" - } - }, - "globals": { - "describe": "readonly", - "test": "readonly", - "jest": "readonly", - "expect": "readonly", - "require": "readonly", - "global": "writable", - "it": "readonly", - "afterEach": "readonly", - "beforeEach": "readonly" - }, - "rules": { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/consistent-type-definitions": "error", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/indent": "off", - "@typescript-eslint/no-duplicate-enum-values": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_" - }], - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/unified-signatures": "error", - "@typescript-eslint/explicit-function-return-type": "off", - "arrow-body-style": "error", - "camelcase": ["error", { - "ignoreDestructuring": true - }], - "constructor-super": "error", - "curly": "error", - "dot-notation": "error", - "eqeqeq": [ - "error", - "smart" - ], - "guard-for-in": "error", - "max-classes-per-file": [ - "error", - 1 - ], - "max-len": "off", - "no-nested-ternary": "error", - "no-bitwise": "error", - "no-caller": "error", - "no-cond-assign": "error", - "no-console": "error", - "no-debugger": "error", - "no-empty": "error", - "no-eval": "error", - "no-new-wrappers": "error", - "no-prototype-builtins": "off", - "no-shadow": "off", - "no-throw-literal": "error", - "no-trailing-spaces": "off", - "no-undef-init": "error", - "no-unsafe-finally": "error", - "no-unused-expressions": ["error", { - "allowTernary": true, - "allowShortCircuit": true - }], - "no-unused-labels": "error", - "no-var": "error", - "object-shorthand": "error", - "one-var": [ - "error", - "never" - ], - "patternfly-react/import-tokens-icons": "error", - "patternfly-react/no-anonymous-functions": "error", - "prefer-const": "error", - "prettier/prettier": "error", - "radix": [ - "error", - "as-needed" - ], - "react/prop-types": 0, - "react/display-name": 0, - "react-hooks/exhaustive-deps": "warn", - "react/no-unescaped-entities": ["error", {"forbid": [">", "}"]}], - "spaced-comment": "error", - "use-isnan": "error", - "patternfly-react/no-layout-effect": "error", - "valid-typeof": "off" - }, - "overrides": [ - { - "files": ["**/examples/*", "**/demos/examples/**/*"], - "rules": { - "patternfly-react/no-anonymous-functions": "off" - } - }, - { - "files": ["**/*.test.[jt]s?(x)"], - "extends": ["plugin:testing-library/react"], - "rules": { - "testing-library/no-node-access": "off", - "react/jsx-key": "off", - "no-console": "off" - } - }, - { - "files": ["packages/react-integration/demo-app-ts/**/*"], - "rules": { - "patternfly-react/no-anonymous-functions": "off", - "react/react-in-jsx-scope": "off", - "spaced-comment": "off" - } - } - ] -} diff --git a/.github/split.js b/.github/split.js index 11a6610de7c..40ed8a0bd66 100644 --- a/.github/split.js +++ b/.github/split.js @@ -1,14 +1,15 @@ +/* eslint-disable no-console */ const fs = require('fs'); const path = require('path'); const BASE_DIR = path.join(__dirname, '../packages/react-integration/cypress/integration'); -const WORKER_NUM = +process.env['WORKER_NUM']; -const WORKER_COUNT = +process.env['WORKER_COUNT']; +const WORKER_NUM = +process.env.WORKER_NUM; +const WORKER_COUNT = +process.env.WORKER_COUNT; -const testFiles = fs.readdirSync(BASE_DIR) +const testFiles = fs + .readdirSync(BASE_DIR) .sort() .filter((_, i) => i % WORKER_COUNT === WORKER_NUM) - .map(f => path.join(BASE_DIR, f)); + .map((f) => path.join(BASE_DIR, f)); console.log(testFiles.join(' ')); - diff --git a/.github/upload-preview.js b/.github/upload-preview.js index 7b3e534432e..bf24050b859 100644 --- a/.github/upload-preview.js +++ b/.github/upload-preview.js @@ -1,3 +1,4 @@ +/* eslint-disable no-console, camelcase */ const path = require('path'); const { Octokit } = require('@octokit/rest'); const octokit = new Octokit({ auth: process.env.GH_PR_TOKEN }); @@ -12,22 +13,20 @@ const prbranch = process.env.GITHUB_REF.split('/').pop(); const uploadFolder = process.argv[2]; if (!uploadFolder) { - console.log('Usage: upload-preview uploadFolder'); process.exit(1); } const uploadFolderName = path.basename(uploadFolder); -let uploadURL = `${repo}-${prnum ? `pr-${prnum}` : prbranch}`.replace(/[\/|\.]/g, '-'); +let uploadURL = `${repo}-${prnum ? `pr-${prnum}` : prbranch}`.replace(/[/|.]/g, '-'); -switch(uploadFolderName) { +switch (uploadFolderName) { case 'coverage': uploadURL += '-a11y.surge.sh'; break; case 'public': if (!prnum && prbranch === 'main') { uploadURL = 'react-staging.patternfly.org'; - } - else { + } else { uploadURL += '.surge.sh'; } break; @@ -54,15 +53,16 @@ function tryAddComment(comment, commentBody) { } if (prnum) { - octokit.issues.listComments({ - owner, - repo, - issue_number: prnum - }) - .then(res => res.data) - .then(comments => { + octokit.issues + .listComments({ + owner, + repo, + issue_number: prnum + }) + .then((res) => res.data) + .then((comments) => { let commentBody = ''; - const existingComment = comments.find(comment => comment.user.login === 'patternfly-build'); + const existingComment = comments.find((comment) => comment.user.login === 'patternfly-build'); if (existingComment) { commentBody += existingComment.body.trim(); commentBody += '\n\n'; @@ -70,25 +70,28 @@ if (prnum) { if (uploadFolderName === 'public') { commentBody += tryAddComment(`Preview: https://${uploadURL}`, commentBody); - } - else if (uploadFolderName === 'coverage') { + } else if (uploadFolderName === 'coverage') { commentBody += tryAddComment(`A11y report: https://${uploadURL}`, commentBody); } if (existingComment) { - octokit.issues.updateComment({ - owner, - repo, - comment_id: existingComment.id, - body: commentBody - }).then(() => console.log('Updated comment!')); + octokit.issues + .updateComment({ + owner, + repo, + comment_id: existingComment.id, + body: commentBody + }) + .then(() => console.log('Updated comment!')); } else { - octokit.issues.createComment({ - owner, - repo, - issue_number: prnum, - body: commentBody - }).then(() => console.log('Created comment!')); + octokit.issues + .createComment({ + owner, + repo, + issue_number: prnum, + body: commentBody + }) + .then(() => console.log('Created comment!')); } }); } diff --git a/eslint.config-md.mjs b/eslint.config-md.mjs index 51f2b006329..f7dc3aab756 100644 --- a/eslint.config-md.mjs +++ b/eslint.config-md.mjs @@ -1,7 +1,7 @@ -import tsParser from '@typescript-eslint/parser'; import markdown from 'eslint-plugin-markdown'; import patternflyReact from 'eslint-plugin-patternfly-react'; import react from 'eslint-plugin-react'; +import tseslint from 'typescript-eslint'; export default [ ...markdown.configs.recommended, @@ -11,7 +11,7 @@ export default [ 'patternfly-react': patternflyReact }, languageOptions: { - parser: tsParser + parser: tseslint.parser }, settings: { react: { diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000000..479e6324155 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,158 @@ +import { fixupPluginRules } from '@eslint/compat'; +import js from '@eslint/js'; +import patternflyReact from 'eslint-plugin-patternfly-react'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRecommended from 'eslint-plugin-react/configs/recommended.js'; +import testingLibrary from 'eslint-plugin-testing-library'; +import globals from 'globals'; +import tseslint from 'typescript-eslint'; + +export default [ + { + ignores: [ + '**/dist', + '**/css', + 'packages/react-core/src/helpers/Popper/thirdparty', + 'packages/react-docs/patternfly-docs/generated', + 'packages/react-docs/static', + // The Rollup configurations contain syntax not supported by ESLint, so ignore them for now. + '**/rollup.*.mjs' + ] + }, + js.configs.recommended, + ...tseslint.configs.recommended, + reactRecommended, + eslintPluginPrettierRecommended, + { + plugins: { + 'patternfly-react': fixupPluginRules(patternflyReact), + 'react-hooks': fixupPluginRules(reactHooks) + }, + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + ...globals.jest + } + }, + settings: { + react: { + version: 'detect' + } + }, + rules: { + ...reactHooks.configs.recommended.rules, + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/explicit-member-accessibility': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/indent': 'off', + '@typescript-eslint/no-duplicate-enum-values': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_' + } + ], + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-namespace-keyword': 'error', + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/explicit-function-return-type': 'off', + 'arrow-body-style': 'error', + camelcase: [ + 'error', + { + ignoreDestructuring: true + } + ], + 'constructor-super': 'error', + curly: 'error', + 'dot-notation': 'error', + eqeqeq: ['error', 'smart'], + 'guard-for-in': 'error', + 'max-classes-per-file': ['error', 1], + 'max-len': 'off', + 'no-nested-ternary': 'error', + 'no-bitwise': 'error', + 'no-caller': 'error', + 'no-cond-assign': 'error', + 'no-console': 'error', + 'no-debugger': 'error', + 'no-empty': 'error', + 'no-eval': 'error', + 'no-new-wrappers': 'error', + 'no-prototype-builtins': 'off', + 'no-shadow': 'off', + 'no-throw-literal': 'error', + 'no-trailing-spaces': 'off', + 'no-undef-init': 'error', + 'no-constant-binary-expression': 'off', + 'no-unsafe-finally': 'error', + 'no-unused-expressions': [ + 'error', + { + allowTernary: true, + allowShortCircuit: true + } + ], + 'no-unused-labels': 'error', + 'no-var': 'error', + 'object-shorthand': 'error', + 'one-var': ['error', 'never'], + 'patternfly-react/import-tokens-icons': 'error', + 'patternfly-react/no-anonymous-functions': 'error', + 'prefer-const': 'error', + radix: ['error', 'as-needed'], + 'react/prop-types': 0, + 'react/display-name': 0, + 'react-hooks/exhaustive-deps': 'warn', + 'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }], + 'spaced-comment': 'error', + 'use-isnan': 'error', + 'patternfly-react/no-layout-effect': 'error', + 'valid-typeof': 'off' + } + }, + { + files: ['**/examples/*', '**/demos/examples/**/*'], + rules: { + 'patternfly-react/no-anonymous-functions': 'off' + } + }, + { + files: ['**/*.test.[jt]s?(x)'], + plugins: { + 'testing-library': fixupPluginRules(testingLibrary) + }, + rules: { + ...testingLibrary.configs.react.rules, + '@typescript-eslint/no-unused-vars': 'off', + 'testing-library/no-node-access': 'off', + 'react/jsx-key': 'off', + 'react/no-children-prop': 'off', + 'no-console': 'off' + } + }, + { + files: ['packages/react-integration/demo-app-ts/**/*'], + rules: { + 'patternfly-react/no-anonymous-functions': 'off', + 'react/react-in-jsx-scope': 'off', + 'spaced-comment': 'off' + } + } +]; diff --git a/package.json b/package.json index f856397fdfa..92bdc41aff5 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,8 @@ "@babel/plugin-transform-modules-commonjs": "^7.24.7", "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", + "@eslint/compat": "^1.1.1", + "@eslint/js": "^9.7.0", "@octokit/rest": "^20.1.1", "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", @@ -41,8 +43,6 @@ "@types/node": "^20.14.10", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.16.0", "babel-jest": "^29.7.0", "concurrently": "^8.2.2", "eslint": "^8.57.0", @@ -52,6 +52,7 @@ "eslint-plugin-testing-library": "^6.2.2", "fs-extra": "^11.2.0", "glob": "^10.4.5", + "globals": "^15.8.0", "husky": "^9.0.11", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -71,7 +72,8 @@ "surge": "^0.23.1", "ts-node": "^10.9.2", "ts-patch": "^3.2.1", - "typescript": "^5.4.5" + "typescript": "^5.4.5", + "typescript-eslint": "^7.16.1" }, "scripts": { "build": "yarn clean && yarn build:generate && yarn build:esm && yarn build:cjs && yarn build:subpaths && yarn build:single:packages", @@ -87,9 +89,9 @@ "clean:build": "rimraf .cache .eslintcache coverage", "clean:exports": "lerna run clean:exports --parallel --stream", "generate": "yarn plop", - "lint": "eslint --ext js,jsx,ts,tsx --cache --cache-strategy content", + "lint": "ESLINT_USE_FLAT_CONFIG=true eslint . --cache --cache-strategy content", "lint:all": "yarn lint:md && yarn lint:ts", - "lint:md": "ESLINT_USE_FLAT_CONFIG=true eslint **/*.md --cache --cache-strategy content --config eslint.config-md.mjs --no-warn-ignored", + "lint:md": "ESLINT_USE_FLAT_CONFIG=true eslint \"**/*.md\" --config eslint.config-md.mjs --cache --cache-strategy content --no-warn-ignored", "lint:ts": "yarn lint packages/*/src", "lint:tests": "yarn lint packages/*/src/components/*/__tests__/*.test.*", "postinstall": "ts-patch install -s && husky", diff --git a/packages/eslint-plugin-patternfly-react/lib/rules/import-tokens-icons.js b/packages/eslint-plugin-patternfly-react/lib/rules/import-tokens-icons.js index b15e733481f..911876d2ac3 100644 --- a/packages/eslint-plugin-patternfly-react/lib/rules/import-tokens-icons.js +++ b/packages/eslint-plugin-patternfly-react/lib/rules/import-tokens-icons.js @@ -12,7 +12,7 @@ function makeImport(specifier, moduleName) { res += '/dist/esm'; if (moduleName.includes('icon')) { res += '/icons/'; - res += specifier.imported.name.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`).replace(/^-/, ''); + res += specifier.imported.name.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`).replace(/^-/, ''); } else { res += `/${specifier.imported.name}`; } @@ -42,7 +42,7 @@ module.exports = { ImportDeclaration(node) { if (/@patternfly\/react-(tokens|icons)(\/dist\/(js|esm))?/.test(node.source.value)) { const esmSpecifiers = node.specifiers.filter( - specifier => + (specifier) => specifier.type === 'ImportSpecifier' && !( node.source.value.startsWith('@patternfly/react-icons') && @@ -56,7 +56,7 @@ module.exports = { fix(fixer) { return fixer.replaceText( node, - esmSpecifiers.map(spec => makeImport(spec, node.source.value)).join('\n') + esmSpecifiers.map((spec) => makeImport(spec, node.source.value)).join('\n') ); } }); diff --git a/packages/react-core/scripts/copyStyles.js b/packages/react-core/scripts/copyStyles.js index 315e430c79a..9f35e66889d 100644 --- a/packages/react-core/scripts/copyStyles.js +++ b/packages/react-core/scripts/copyStyles.js @@ -32,10 +32,10 @@ for (const [targetCss, baseCss] of Object.entries(baseCssFiles)) { const ast = parseCSS(css); // Core provides font awesome fonts and utlities. React does not use these - ast.stylesheet.rules = ast.stylesheet.rules.filter(rule => { + ast.stylesheet.rules = ast.stylesheet.rules.filter((rule) => { switch (rule.type) { case 'rule': - return !rule.selectors.some(sel => unusedSelectorRegEx.test(sel)); + return !rule.selectors.some((sel) => unusedSelectorRegEx.test(sel)); case 'keyframes': return !unusedKeyFramesRegEx.test(rule.name); case 'charset': @@ -43,7 +43,7 @@ for (const [targetCss, baseCss] of Object.entries(baseCssFiles)) { return false; case 'font-face': // eslint-disable-next-line no-case-declarations - const fontFamilyDecl = rule.declarations.find(decl => decl.property === 'font-family'); + const fontFamilyDecl = rule.declarations.find((decl) => decl.property === 'font-family'); return !unusedFontFamilyRegEx.test(fontFamilyDecl.value); default: return true; diff --git a/packages/react-core/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx b/packages/react-core/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx index 906756a3400..ffca557fe1e 100644 --- a/packages/react-core/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx +++ b/packages/react-core/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx @@ -3,31 +3,17 @@ */ import * as React from 'react'; import { render } from '@testing-library/react'; -import { UserIcon } from '@patternfly/react-icons'; +import UserIcon from '@patternfly/react-icons/dist/esm/icons/user-icon'; import { EmptyStateIcon } from '../../EmptyStateIcon'; // any missing imports can usually be resolved by adding them here import { Spinner } from '../../../Spinner/Spinner'; it('EmptyStateIcon should match snapshot (auto-generated)', () => { - const { asFragment } = render( - - ); + const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); it('EmptyStateIcon should match snapshot for variant container', () => { - const { asFragment } = render( - - ); + const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); diff --git a/packages/react-core/src/components/OverflowMenu/__tests__/Generated/OverflowMenuDropdownItem.test.tsx b/packages/react-core/src/components/OverflowMenu/__tests__/Generated/OverflowMenuDropdownItem.test.tsx index e3ecf91b55a..147ffc87aa4 100644 --- a/packages/react-core/src/components/OverflowMenu/__tests__/Generated/OverflowMenuDropdownItem.test.tsx +++ b/packages/react-core/src/components/OverflowMenu/__tests__/Generated/OverflowMenuDropdownItem.test.tsx @@ -6,9 +6,7 @@ import { OverflowMenuDropdownItem } from '../../OverflowMenuDropdownItem'; describe('OverflowMenuDropdownItem', () => { it('should match snapshot', () => { - const { asFragment } = render( - - ); + const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); }); diff --git a/packages/react-core/src/components/Pagination/__tests__/Generated/PaginationOptionsMenu.test.tsx b/packages/react-core/src/components/Pagination/__tests__/Generated/PaginationOptionsMenu.test.tsx index 2f2707fa7fe..bd7bccfa0cc 100644 --- a/packages/react-core/src/components/Pagination/__tests__/Generated/PaginationOptionsMenu.test.tsx +++ b/packages/react-core/src/components/Pagination/__tests__/Generated/PaginationOptionsMenu.test.tsx @@ -29,8 +29,8 @@ it('PaginationOptionsMenu should match snapshot (auto-generated)', () => { {firstIndex} - {lastIndex} - Custom toggle template - of{itemCount} {itemsTitle} + + Custom toggle template of{itemCount} {itemsTitle} )} onPerPageSelect={() => null as any} diff --git a/packages/react-docs/.eslintrc.js b/packages/react-docs/.eslintrc.js deleted file mode 100644 index fbb6e14af02..00000000000 --- a/packages/react-docs/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - /* For now, don't lint as we get errors from compiled JS like: - * packages/react-table/dist/esm/components/Table/CollapseColumn.js - * 3:23 warning '_extends' is a function no-func-assign - * 9:1 error Import in body of module; reorder to top import/first - * 10:1 error Import in body of module; reorder to top import/first - * 11:1 error Import in body of module; reorder to top import/first - * 12:1 error Import in body of module; reorder to top import/first - * 13:1 error Import in body of module; reorder to top import/first - */ -}; diff --git a/packages/react-icons/scripts/icons/fontawesomeIcons.js b/packages/react-icons/scripts/icons/fontawesomeIcons.js index 3a3243c2853..a05a3c7470b 100644 --- a/packages/react-icons/scripts/icons/fontawesomeIcons.js +++ b/packages/react-icons/scripts/icons/fontawesomeIcons.js @@ -40,7 +40,7 @@ function convertIcons(icons) { delete icons.faFontAwesomeLogoFull; return Object.values(icons) - .map(icon => ({ + .map((icon) => ({ name: getIconName(icon), data: convertIcon(icon) })) diff --git a/packages/react-icons/scripts/icons/patternflyIcons.mjs b/packages/react-icons/scripts/icons/patternflyIcons.mjs index 98dad138306..3b978c16ece 100644 --- a/packages/react-icons/scripts/icons/patternflyIcons.mjs +++ b/packages/react-icons/scripts/icons/patternflyIcons.mjs @@ -29,5 +29,5 @@ function convertIcons(icons) { return icons; } -const patternflyIcons = convertIcons(pfIcons) +const patternflyIcons = convertIcons(pfIcons); export default patternflyIcons; diff --git a/packages/react-icons/scripts/writeIcons.mjs b/packages/react-icons/scripts/writeIcons.mjs index 99853b69594..16c72ff1e7e 100644 --- a/packages/react-icons/scripts/writeIcons.mjs +++ b/packages/react-icons/scripts/writeIcons.mjs @@ -7,12 +7,8 @@ const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); const outDir = join(__dirname, '../dist'); -const removeSnake = s => - s - .toUpperCase() - .replace('-', '') - .replace('_', ''); -const toCamel = s => `${s[0].toUpperCase()}${s.substr(1).replace(/([-_][\w])/gi, removeSnake)}`; +const removeSnake = (s) => s.toUpperCase().replace('-', '').replace('_', ''); +const toCamel = (s) => `${s[0].toUpperCase()}${s.substr(1).replace(/([-_][\w])/gi, removeSnake)}`; const writeCJSExport = (fname, jsName, icon) => { outputFileSync( diff --git a/packages/react-integration/.eslintrc.json b/packages/react-integration/.eslintrc.json deleted file mode 100644 index 0a7c451ac2d..00000000000 --- a/packages/react-integration/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "globals": { - "cy": "readonly", - "context": "readonly", - "xit": "readonly" - } -} diff --git a/packages/react-integration/cypress/integration/chipgroup.spec.ts b/packages/react-integration/cypress/integration/chipgroup.spec.ts index 75229045118..f04d1ed7de4 100644 --- a/packages/react-integration/cypress/integration/chipgroup.spec.ts +++ b/packages/react-integration/cypress/integration/chipgroup.spec.ts @@ -4,18 +4,12 @@ describe('Chip Group Demo Test', () => { }); it('Verify chip default text', () => { - cy.get('.pf-v5-c-chip__text') - .first() - .contains('Lemons'); + cy.get('.pf-v5-c-chip__text').first().contains('Lemons'); }); it('Verify chip has badge', () => { - cy.get('span') - .children('.pf-v5-c-badge') - .should('not.be.undefined'); - cy.get('span') - .children('.pf-v5-c-badge') - .should('not.equal', null); + cy.get('span').children('.pf-v5-c-badge').should('not.be.undefined'); + cy.get('span').children('.pf-v5-c-badge').should('not.equal', null); }); it('Verify delete button on first chip', () => { diff --git a/packages/react-integration/cypress/integration/chipgroupdefaultisopen.spec.ts b/packages/react-integration/cypress/integration/chipgroupdefaultisopen.spec.ts index da524d83816..6032634f5d9 100644 --- a/packages/react-integration/cypress/integration/chipgroupdefaultisopen.spec.ts +++ b/packages/react-integration/cypress/integration/chipgroupdefaultisopen.spec.ts @@ -4,24 +4,16 @@ describe('Chip Group Demo Test', () => { }); it('Verify chip default text', () => { - cy.get('.pf-v5-c-chip__text') - .first() - .contains('Lemons'); + cy.get('.pf-v5-c-chip__text').first().contains('Lemons'); }); it('Verify chip is open on default', () => { - cy.get('.pf-v5-c-chip__text') - .eq(1) - .contains('Limes'); + cy.get('.pf-v5-c-chip__text').eq(1).contains('Limes'); }); it('Verify chip has badge', () => { - cy.get('span') - .children('.pf-v5-c-badge') - .should('not.be.undefined'); - cy.get('span') - .children('.pf-v5-c-badge') - .should('not.equal', null); + cy.get('span').children('.pf-v5-c-badge').should('not.be.undefined'); + cy.get('span').children('.pf-v5-c-badge').should('not.equal', null); }); it('Verify show less button works', () => { diff --git a/packages/react-integration/cypress/integration/expandablesectiontruncate.ts b/packages/react-integration/cypress/integration/expandablesectiontruncate.ts index f88d99db817..a59c202a907 100644 --- a/packages/react-integration/cypress/integration/expandablesectiontruncate.ts +++ b/packages/react-integration/cypress/integration/expandablesectiontruncate.ts @@ -11,9 +11,7 @@ describe('Expandable Section Truncate Demo Test', () => { it('Verify toggle button renders conditionally', () => { cy.get('#expandable-section-truncate-resizable button').should('not.exist'); cy.viewport(400, 660); - cy.get('#expandable-section-truncate-resizable button') - .should('exist') - .click(); + cy.get('#expandable-section-truncate-resizable button').should('exist').click(); // Want to verify resizing doesn't remove the toggle button cy.get('#expandable-section-truncate button').should('exist'); cy.viewport(800, 660); diff --git a/packages/react-integration/cypress/integration/jumplinks.spec.ts b/packages/react-integration/cypress/integration/jumplinks.spec.ts index 8fa27369b56..ebf4251c316 100644 --- a/packages/react-integration/cypress/integration/jumplinks.spec.ts +++ b/packages/react-integration/cypress/integration/jumplinks.spec.ts @@ -4,12 +4,12 @@ describe('Jump Link Demo Test', () => { }); it('Should jump on click', () => { - cy.get('#ts-demo-app-page-id').then(el => { + cy.get('#ts-demo-app-page-id').then((el) => { const firstScroll = el.scrollTop(); expect(firstScroll).to.eq(0); }); cy.get('#heading-2').click(); - cy.get('#ts-demo-app-page-id').then(el => { + cy.get('#ts-demo-app-page-id').then((el) => { expect(el.scrollTop()).to.not.eq(0); }); }); diff --git a/packages/react-integration/cypress/integration/notificationdrawerbasic.spec.ts b/packages/react-integration/cypress/integration/notificationdrawerbasic.spec.ts index 27e344c634d..fd7500c93d4 100644 --- a/packages/react-integration/cypress/integration/notificationdrawerbasic.spec.ts +++ b/packages/react-integration/cypress/integration/notificationdrawerbasic.spec.ts @@ -49,26 +49,18 @@ describe('Notification Drawer Basic Demo Test', () => { // press Enter on toggle button, check whether the dropdown menu exsit and whether it focuses on the first item // then press Tab on toggle button, check whether the dropdown menu is closed cy.get('#toggle-id-0').then((toggleButton: JQuery) => { - cy.wrap(toggleButton).type(' ', {waitForAnimations:true}); - cy.get('#notification-0') - .find('.pf-v5-c-menu') - .should('exist'); - cy.wrap(toggleButton).type('{esc}', {waitForAnimations:true}); - cy.get('#notification-0') - .find('.pf-v5-c-menu') - .should('not.exist'); + cy.wrap(toggleButton).type(' ', { waitForAnimations: true }); + cy.get('#notification-0').find('.pf-v5-c-menu').should('exist'); + cy.wrap(toggleButton).type('{esc}', { waitForAnimations: true }); + cy.get('#notification-0').find('.pf-v5-c-menu').should('not.exist'); }); // Verify the list item header toggle button keyboard interactivity opens/closes dropdown menu // the method is the same as above cy.get('#toggle-id-1').then((toggleButton: JQuery) => { - cy.wrap(toggleButton).type(' ', {waitForAnimations:true}); - cy.get('#notification-1') - .find('.pf-v5-c-menu') - .should('exist'); - cy.wrap(toggleButton).type('{esc}', {waitForAnimations:true}); - cy.get('#notification-1') - .find('.pf-v5-c-menu') - .should('not.exist'); + cy.wrap(toggleButton).type(' ', { waitForAnimations: true }); + cy.get('#notification-1').find('.pf-v5-c-menu').should('exist'); + cy.wrap(toggleButton).type('{esc}', { waitForAnimations: true }); + cy.get('#notification-1').find('.pf-v5-c-menu').should('not.exist'); }); }); diff --git a/packages/react-integration/cypress/integration/notificationdrawergroups.spec.ts b/packages/react-integration/cypress/integration/notificationdrawergroups.spec.ts index ccc58e83c46..6c478812fe3 100644 --- a/packages/react-integration/cypress/integration/notificationdrawergroups.spec.ts +++ b/packages/react-integration/cypress/integration/notificationdrawergroups.spec.ts @@ -57,14 +57,10 @@ describe('Notification Drawer Groups Demo Test', () => { // press Enter on toggle button, check whether the dropdown menu exsit and whether it focuses on the first item // then press Tab on toggle button, check whether the dropdown menu is closed cy.get('#toggle-id-0').then((toggleButton: JQuery) => { - cy.wrap(toggleButton).type('{enter}', {waitForAnimations:true}); - cy.get('#notification-0') - .find('.pf-v5-c-menu') - .should('exist'); - cy.wrap(toggleButton).type('{esc}', {waitForAnimations:true}); - cy.get('#notification-0') - .find('.pf-v5-c-menu') - .should('not.exist'); + cy.wrap(toggleButton).type('{enter}', { waitForAnimations: true }); + cy.get('#notification-0').find('.pf-v5-c-menu').should('exist'); + cy.wrap(toggleButton).type('{esc}', { waitForAnimations: true }); + cy.get('#notification-0').find('.pf-v5-c-menu').should('not.exist'); }); // Verify the group header keyboard interactivity opens/closes the whole group // check whether the whole group is expanded, then press Enter on the group header and check whether the whole group is closed @@ -73,14 +69,10 @@ describe('Notification Drawer Groups Demo Test', () => { cy.get('.pf-v5-c-notification-drawer__group').first().should('not.have.class', 'pf-m-expanded'); // Verify the list item header toggle button keyboard interactivity opens/closes dropdown menu cy.get('#toggle-id-9').then((toggleButton: JQuery) => { - cy.wrap(toggleButton).type('{enter}', {waitForAnimations:true}); - cy.get('#notification-9') - .find('.pf-v5-c-menu') - .should('exist'); - cy.wrap(toggleButton).type('{esc}', {waitForAnimations:true}); - cy.get('#notification-9') - .find('.pf-v5-c-menu') - .should('not.exist'); + cy.wrap(toggleButton).type('{enter}', { waitForAnimations: true }); + cy.get('#notification-9').find('.pf-v5-c-menu').should('exist'); + cy.wrap(toggleButton).type('{esc}', { waitForAnimations: true }); + cy.get('#notification-9').find('.pf-v5-c-menu').should('not.exist'); }); }); diff --git a/packages/react-integration/demo-app-ts/src/App.tsx b/packages/react-integration/demo-app-ts/src/App.tsx index a7c82228bdc..4f3f7de72a7 100755 --- a/packages/react-integration/demo-app-ts/src/App.tsx +++ b/packages/react-integration/demo-app-ts/src/App.tsx @@ -42,8 +42,8 @@ class App extends React.Component<{}, AppState> { }; private onNavToggle = (_event: React.MouseEvent) => { - this.setState({ isNavOpen: !this.state.isNavOpen }) - } + this.setState({ isNavOpen: !this.state.isNavOpen }); + }; private onThemeSelect = (isDarkTheme: boolean) => { this.setState({ isDarkTheme }); diff --git a/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherFavoritesDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherFavoritesDemo.tsx index 670af3ac076..412dd8e9d97 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherFavoritesDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherFavoritesDemo.tsx @@ -60,7 +60,7 @@ export class ApplicationLauncherFavoritesDemo extends React.Component, itemId: string, isFavorite: boolean) => { if (isFavorite) { this.setState({ - favorites: this.state.favorites.filter(id => id !== itemId) + favorites: this.state.favorites.filter((id) => id !== itemId) }); } else { this.setState({ @@ -75,7 +75,7 @@ export class ApplicationLauncherFavoritesDemo extends React.Component { + .map((group) => { const filteredGroup = React.cloneElement(group, { children: group.props.children.filter((item: JSX.Element) => { if (item.type === ApplicationLauncherSeparator) { @@ -93,7 +93,7 @@ export class ApplicationLauncherFavoritesDemo extends React.Component newGroup); + .filter((newGroup) => newGroup); if (filteredGroups.length > 0) { let lastGroup = filteredGroups.pop(); diff --git a/packages/react-integration/demo-app-ts/src/components/demos/ContextSelectorDemo/ContextSelectorDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/ContextSelectorDemo/ContextSelectorDemo.tsx index b6c080839ed..04472a86978 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/ContextSelectorDemo/ContextSelectorDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/ContextSelectorDemo/ContextSelectorDemo.tsx @@ -52,7 +52,7 @@ export class ContextSelectorDemo extends React.Component<{}, ContextSelectorStat const filtered = this.state.searchValue === '' ? this.items - : this.items.filter(str => str.toLowerCase().indexOf(this.state.searchValue.toLowerCase()) !== -1); + : this.items.filter((str) => str.toLowerCase().indexOf(this.state.searchValue.toLowerCase()) !== -1); this.setState({ filteredItems: filtered || [] }); }; diff --git a/packages/react-integration/demo-app-ts/src/components/demos/DataListDemo/DataListDraggableDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/DataListDemo/DataListDraggableDemo.tsx index bb4647be871..b0f1990dc83 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/DataListDemo/DataListDraggableDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/DataListDemo/DataListDraggableDemo.tsx @@ -19,7 +19,7 @@ interface ItemType { } const getItems = (count: number) => - Array.from({ length: count }, (_, idx) => idx).map(idx => ({ + Array.from({ length: count }, (_, idx) => idx).map((idx) => ({ id: `draggable-item-${idx}`, content: `item ${idx} ` })); @@ -56,7 +56,7 @@ export class DataListDraggableDemo extends React.Component { } }; - onDrop = (source: DraggableItemPosition, dest?: DraggableItemPosition) => { + onDrop = (source: DraggableItemPosition, dest?: DraggableItemPosition) => { if (dest) { const newItems = reorder(this.state.items, source.index, dest.index); this.setState({ diff --git a/packages/react-integration/demo-app-ts/src/components/demos/FileUploadDemo/FileUploadDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/FileUploadDemo/FileUploadDemo.tsx index 98cde529d2a..6127704f9e5 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/FileUploadDemo/FileUploadDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/FileUploadDemo/FileUploadDemo.tsx @@ -6,8 +6,7 @@ export class FileUploadDemo extends React.Component { state = { value: '', filename: '', isLoading: false }; /* eslint-disable-next-line no-console */ - handleFileInputChange = (_event: DropEvent, file: File) => - this.setState({ value: file, filename: file.name }); + handleFileInputChange = (_event: DropEvent, file: File) => this.setState({ value: file, filename: file.name }); handleDataChange = (_event: DropEvent, value: string) => this.setState({ value }); /* eslint-disable @typescript-eslint/no-unused-vars */ handleFileReadStarted = (_event: DropEvent, _fileHandle: File) => this.setState({ isLoading: true }); diff --git a/packages/react-integration/demo-app-ts/src/components/demos/MenuDemo/MenuDrilldownDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/MenuDemo/MenuDrilldownDemo.tsx index edfcdf4fa65..5a7e15fa6c1 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/MenuDemo/MenuDrilldownDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/MenuDemo/MenuDrilldownDemo.tsx @@ -16,11 +16,11 @@ export class MenuDrilldownDemo extends Component { activeMenu: 'rootMenu' }; - onSelect = (_event?: React.MouseEvent, itemId?: string | number) => { + onSelect = (_event?: React.MouseEvent, itemId?: string | number) => { if (typeof itemId !== 'string') { return; } - + if (itemId.startsWith('group:')) { console.log(`selected sub-menu: ${itemId.split('group:')[1]}`); } else { diff --git a/packages/react-integration/demo-app-ts/src/components/demos/NavDemo/NavDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/NavDemo/NavDemo.tsx index 3531f9af43d..ac9cd8e0b33 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/NavDemo/NavDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/NavDemo/NavDemo.tsx @@ -53,7 +53,7 @@ export class NavDemo extends Component { handleNoNavigateLink = ( /* eslint-disable no-console */ _event: React.FormEvent, - itemId: number | string, + itemId: number | string ): void => { console.log(`No Navigate Link clicked: ${itemId}`); /* eslint-enable no-console */ diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectDemo.tsx index 0ebc52ab795..a77c02c662c 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectDemo.tsx @@ -1,5 +1,11 @@ import { Checkbox } from '@patternfly/react-core'; -import { Select, SelectOption, SelectOptionObject, SelectGroup, SelectVariant } from '@patternfly/react-core/deprecated'; +import { + Select, + SelectOption, + SelectOptionObject, + SelectGroup, + SelectVariant +} from '@patternfly/react-core/deprecated'; import React, { Component } from 'react'; /* eslint-disable no-console */ @@ -39,7 +45,7 @@ export class FilteringSelectDemo extends Component { if (selections.includes(selection.toString())) { this.setState( (prevState: FilteringSelectDemoState) => ({ - selections: prevState.selections.filter(item => item !== selection) + selections: prevState.selections.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.selections) ); @@ -68,7 +74,7 @@ export class FilteringSelectDemo extends Component { return <>; } }) - .filter(newGroup => newGroup.props.children); + .filter((newGroup) => newGroup.props.children); } }; @@ -92,7 +98,7 @@ export class FilteringSelectDemo extends Component { aria-label="Select Input" onToggle={this.onToggle} onSelect={this.onSelect} - selections={selections.filter(string => string)} + selections={selections.filter((string) => string)} isOpen={isOpen} placeholderText="Filter by status" aria-labelledby={titleId} diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectLiveUpdateDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectLiveUpdateDemo.tsx index 508a2d160e4..947d4319f40 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectLiveUpdateDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/FilteringSelectLiveUpdateDemo.tsx @@ -27,11 +27,14 @@ export class FilteringSelectLiveUpdateDemo extends Component { - this.setState((prevState: FilteringSelectLiveUpdateDemoState) => ({ - options: [...prevState.options, this.extraOptions[i]] - })); - }, 5000 + i * 2000); + setTimeout( + () => { + this.setState((prevState: FilteringSelectLiveUpdateDemoState) => ({ + options: [...prevState.options, this.extraOptions[i]] + })); + }, + 5000 + i * 2000 + ); } }; @@ -46,7 +49,7 @@ export class FilteringSelectLiveUpdateDemo extends Component ({ - selections: prevState.selections.filter(item => item !== selection) + selections: prevState.selections.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.selections) ); @@ -62,7 +65,7 @@ export class FilteringSelectLiveUpdateDemo extends Component item.props.value.toLowerCase().includes(textInput.toLowerCase())); + return this.state.options.filter((item) => item.props.value.toLowerCase().includes(textInput.toLowerCase())); } }; @@ -80,7 +83,7 @@ export class FilteringSelectLiveUpdateDemo extends Component string)} + selections={selections.filter((string) => string)} isOpen={isOpen} placeholderText="Filter by status" aria-labelledby={titleId} diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectDemo.tsx index 8ab29f2dd27..adfc96eae80 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectDemo.tsx @@ -1,12 +1,4 @@ -import { - Button, - Stack, - StackItem, - Title, - Checkbox, - Form, - Divider -} from '@patternfly/react-core'; +import { Button, Stack, StackItem, Title, Checkbox, Form, Divider } from '@patternfly/react-core'; import { Select, SelectOption, @@ -437,7 +429,9 @@ export class SelectDemo extends Component { const { checkSelected } = this.state; if (checkSelected.includes(selection.toString())) { this.setState( - (prevState: SelectDemoState) => ({ checkSelected: prevState.checkSelected.filter(item => item !== selection) }), + (prevState: SelectDemoState) => ({ + checkSelected: prevState.checkSelected.filter((item) => item !== selection) + }), () => console.log('selections: ', this.state.checkSelected) ); } else { @@ -453,7 +447,7 @@ export class SelectDemo extends Component { if (menuDocumentBodySelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - menuDocumentBodySelected: prevState.menuDocumentBodySelected.filter(item => item !== selection) + menuDocumentBodySelected: prevState.menuDocumentBodySelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.menuDocumentBodySelected) ); @@ -472,7 +466,7 @@ export class SelectDemo extends Component { if (noBadgeCheckSelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - noBadgeCheckSelected: prevState.noBadgeCheckSelected.filter(item => item !== selection) + noBadgeCheckSelected: prevState.noBadgeCheckSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.noBadgeCheckSelected) ); @@ -505,7 +499,7 @@ export class SelectDemo extends Component { if (typeaheadMultiSelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - typeaheadMultiSelected: prevState.typeaheadMultiSelected.filter(item => item !== selection) + typeaheadMultiSelected: prevState.typeaheadMultiSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.typeaheadMultiSelected) ); @@ -524,7 +518,7 @@ export class SelectDemo extends Component { if (cdtypeaheadMultiSelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - cdtypeaheadMultiSelected: prevState.cdtypeaheadMultiSelected.filter(item => item !== selection) + cdtypeaheadMultiSelected: prevState.cdtypeaheadMultiSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.cdtypeaheadMultiSelected) ); @@ -564,7 +558,7 @@ export class SelectDemo extends Component { if (plainTypeaheadMultiSelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - plainTypeaheadMultiSelected: prevState.plainTypeaheadMultiSelected.filter(item => item !== selection) + plainTypeaheadMultiSelected: prevState.plainTypeaheadMultiSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.plainTypeaheadMultiSelected) ); @@ -586,7 +580,7 @@ export class SelectDemo extends Component { if (customTypeaheadMultiSelected.includes(selection.toString())) { this.setState( (prevState: SelectDemoState) => ({ - customTypeaheadMultiSelected: prevState.customTypeaheadMultiSelected.filter(item => item !== selection) + customTypeaheadMultiSelected: prevState.customTypeaheadMultiSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.customTypeaheadMultiSelected) ); @@ -979,7 +973,7 @@ export class SelectDemo extends Component { aria-label="Select Input" onToggle={this.checkOnToggle} onSelect={this.checkOnSelect} - selections={checkSelected.filter(string => string)} + selections={checkSelected.filter((string) => string)} isOpen={checkisOpen} placeholderText="Filter by status" aria-labelledby={titleId} @@ -1338,7 +1332,7 @@ export class SelectDemo extends Component { Typeahead inside a form
{ + onSubmit={(e) => { window.location.href = '/404'; e.preventDefault(); }} @@ -1385,7 +1379,7 @@ export class SelectDemo extends Component { aria-label="Select Input" onToggle={this.documentBodyOnToggle} onSelect={this.documentBodyOnSelect} - selections={menuDocumentBodySelected.filter(string => string)} + selections={menuDocumentBodySelected.filter((string) => string)} isOpen={menuDocumentBodyisOpen} placeholderText="Filter by status" aria-labelledby={titleId} diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFavoritesDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFavoritesDemo.tsx index 247e6782dc4..a9a87b61a80 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFavoritesDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFavoritesDemo.tsx @@ -1,8 +1,5 @@ import React, { Component } from 'react'; -import { - StackItem, - Title -} from '@patternfly/react-core'; +import { StackItem, Title } from '@patternfly/react-core'; import { Select, SelectOption, @@ -110,20 +107,14 @@ export class SelectFavoritesDemo extends Component { }); }; - onSelect = ( - _event: React.MouseEvent | React.ChangeEvent, - selection: string | SelectOptionObject, - ) => { + onSelect = (_event: React.MouseEvent | React.ChangeEvent, selection: string | SelectOptionObject) => { this.setState({ selected: selection, isOpen: false }); }; - onSelectGrouped = ( - _event: React.MouseEvent | React.ChangeEvent, - selection: string | SelectOptionObject - ) => { + onSelectGrouped = (_event: React.MouseEvent | React.ChangeEvent, selection: string | SelectOptionObject) => { this.setState({ selectedGrouped: selection, isOpenGrouped: false @@ -150,7 +141,7 @@ export class SelectFavoritesDemo extends Component { if (typeaheadMultiSelected.includes(selection.toString())) { this.setState( (prevState: SelectFavoritesDemoState) => ({ - typeaheadMultiSelected: prevState.typeaheadMultiSelected.filter(item => item !== selection) + typeaheadMultiSelected: prevState.typeaheadMultiSelected.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.typeaheadMultiSelected) ); @@ -167,7 +158,7 @@ export class SelectFavoritesDemo extends Component { onFavorite = (itemId: string, isFavorite: boolean) => { if (isFavorite) { this.setState({ - favorites: this.state.favorites.filter(id => id !== itemId) + favorites: this.state.favorites.filter((id) => id !== itemId) }); } else { { @@ -181,7 +172,7 @@ export class SelectFavoritesDemo extends Component { onFavoriteGrouped = (itemId: string, isFavorite: boolean) => { if (isFavorite) { this.setState({ - favoritesGrouped: this.state.favoritesGrouped.filter(id => id !== itemId) + favoritesGrouped: this.state.favoritesGrouped.filter((id) => id !== itemId) }); } else { { @@ -195,7 +186,7 @@ export class SelectFavoritesDemo extends Component { onFavoriteTypeahead = (itemId: string, isFavorite: boolean) => { if (isFavorite) { this.setState({ - typeaheadfavorites: this.state.typeaheadfavorites.filter(id => id !== itemId) + typeaheadfavorites: this.state.typeaheadfavorites.filter((id) => id !== itemId) }); } else { { @@ -209,7 +200,7 @@ export class SelectFavoritesDemo extends Component { onFavoriteTypeaheadMulti = (itemId: string, isFavorite: boolean) => { if (isFavorite) { this.setState({ - typeaheadMultifavorites: this.state.typeaheadMultifavorites.filter(id => id !== itemId) + typeaheadMultifavorites: this.state.typeaheadMultifavorites.filter((id) => id !== itemId) }); } else { { diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFooterFilteringDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFooterFilteringDemo.tsx index e01d5fcec9d..b5cb8569b4e 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFooterFilteringDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectFooterFilteringDemo.tsx @@ -1,7 +1,4 @@ -import { - Checkbox, - Button -} from '@patternfly/react-core'; +import { Checkbox, Button } from '@patternfly/react-core'; import { Select, SelectOption, @@ -48,7 +45,7 @@ export class SelectFooterFilteringDemo extends Component ({ - selections: prevState.selections.filter(item => item !== selection) + selections: prevState.selections.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.selections) ); @@ -77,7 +74,7 @@ export class SelectFooterFilteringDemo extends Component; } }) - .filter(newGroup => newGroup.props.children); + .filter((newGroup) => newGroup.props.children); } }; @@ -101,7 +98,7 @@ export class SelectFooterFilteringDemo extends Component string)} + selections={selections.filter((string) => string)} isOpen={isOpen} placeholderText="Filter by status" aria-labelledby={titleId} diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectValidatedDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectValidatedDemo.tsx index c2c9a303d88..59ac88f1474 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectValidatedDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectValidatedDemo.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { StackItem, Title, ValidatedOptions } from '@patternfly/react-core'; +import { StackItem, Title, ValidatedOptions } from '@patternfly/react-core'; import { Select, SelectOption, SelectVariant, SelectOptionObject } from '@patternfly/react-core/deprecated'; /* eslint-disable no-console */ diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreDemo.tsx index 87e379bf18e..6ad111083d6 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreDemo.tsx @@ -81,7 +81,7 @@ export class SelectViewMoreDemo extends Component { if (selectedCheck.includes(selection.toString())) { this.setState( (prevState: SelectViewMoreDemoState) => ({ - selectedCheck: prevState.selectedCheck.filter(item => item !== selection) + selectedCheck: prevState.selectedCheck.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.selectedCheck) ); @@ -127,16 +127,8 @@ export class SelectViewMoreDemo extends Component { }; render() { - const { - isOpen, - isOpenCheck, - selected, - selectedCheck, - isLoading, - isLoadingCheck, - numOptions, - numOptionsCheck - } = this.state; + const { isOpen, isOpenCheck, selected, selectedCheck, isLoading, isLoadingCheck, numOptions, numOptionsCheck } = + this.state; const titleId = 'view-more-select-id'; const titleIdCheck = 'view-more-check-select-id'; diff --git a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreGroupedDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreGroupedDemo.tsx index dcf3ddf61dd..eaea78985e9 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreGroupedDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/SelectDeprecatedDemo/SelectViewMoreGroupedDemo.tsx @@ -1,8 +1,5 @@ import React, { Component } from 'react'; -import { - StackItem, - Title -} from '@patternfly/react-core'; +import { StackItem, Title } from '@patternfly/react-core'; import { Select, SelectGroup, @@ -98,7 +95,7 @@ export class SelectViewMoreGroupedDemo extends Component ({ - selectedCheck: prevState.selectedCheck.filter(item => item !== selection) + selectedCheck: prevState.selectedCheck.filter((item) => item !== selection) }), () => console.log('selections: ', this.state.selectedCheck) ); @@ -144,16 +141,8 @@ export class SelectViewMoreGroupedDemo extends Component value.trim() !== '', + validator: (value) => value.trim() !== '', errorText: 'This field is required' }, { name: 'notFoo', - validator: value => value.trim().toLowerCase() !== 'foo', + validator: (value) => value.trim().toLowerCase() !== 'foo', errorText: 'Value cannot be "foo"' }, { name: 'minLength', - validator: value => value.trim().length >= 7, + validator: (value) => value.trim().length >= 7, errorText: 'Value must be at least 7 characters' }, { name: 'notXyz', - validator: value => value.trim().toLowerCase() !== 'xyz', + validator: (value) => value.trim().toLowerCase() !== 'xyz', errorText: 'Value cannot be xyz' } ]; @@ -170,9 +170,9 @@ export class TableEditableDemo extends React.Component { }, { isEditable: false, - rowEditBtnAriaLabel: idx => `Edit row ${idx}`, - rowSaveBtnAriaLabel: idx => `Save edits for row ${idx}`, - rowCancelBtnAriaLabel: idx => `Cancel edits for row ${idx}`, + rowEditBtnAriaLabel: (idx) => `Edit row ${idx}`, + rowSaveBtnAriaLabel: (idx) => `Save edits for row ${idx}`, + rowCancelBtnAriaLabel: (idx) => `Cancel edits for row ${idx}`, cells: [ { title: (value?: string, rowIndex?: number, cellIndex?: number, updatedProps?: any) => ( @@ -352,7 +352,7 @@ export class TableEditableDemo extends React.Component { if (!newSelected.includes(newValue.toString())) { newSelected.push(newValue.toString()); } else { - newSelected = newSelected.filter(el => el !== newValue); + newSelected = newSelected.filter((el) => el !== newValue); } break; } diff --git a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableRowWrapperDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableRowWrapperDemo.tsx index 2ef5d6dfd70..a427e8d30df 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableRowWrapperDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableRowWrapperDemo.tsx @@ -31,6 +31,7 @@ export class TableRowWrapperDemo extends React.Component { const isExpanded = rest.row ? rest.row.isExpanded : false; const isOddRow = (rowProps.rowIndex + 1) % 2; diff --git a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableDemo.tsx index 177cda2de58..fe244988e07 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableDemo.tsx @@ -1,11 +1,5 @@ import * as React from 'react'; -import { - sortable, - SortByDirection, - ICell, - IRow, - ISortBy -} from '@patternfly/react-table'; +import { sortable, SortByDirection, ICell, IRow, ISortBy } from '@patternfly/react-table'; import { Table, TableHeader, TableBody, TableProps } from '@patternfly/react-table/deprecated'; export class TableSortableDemo extends React.Component< diff --git a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableForCompoundExpandableDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableForCompoundExpandableDemo.tsx index e5c015f2af0..ca6ac9f73f4 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableForCompoundExpandableDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/TableDemo/TableSortableForCompoundExpandableDemo.tsx @@ -1,12 +1,5 @@ import * as React from 'react'; -import { - TableVariant, - sortable, - SortByDirection, - ICell, - IRow, - ISortBy -} from '@patternfly/react-table'; +import { TableVariant, sortable, SortByDirection, ICell, IRow, ISortBy } from '@patternfly/react-table'; import { Table, TableHeader, TableBody, TableProps } from '@patternfly/react-table/deprecated'; export interface DemoSortableTableProps { diff --git a/packages/react-integration/demo-app-ts/src/components/demos/ToggleGroupDemo/ToggleGroupDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/ToggleGroupDemo/ToggleGroupDemo.tsx index 46b2f86e370..a4855135d5b 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/ToggleGroupDemo/ToggleGroupDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/ToggleGroupDemo/ToggleGroupDemo.tsx @@ -35,7 +35,7 @@ export class ToggleGroupDemo extends React.Component | React.KeyboardEvent | MouseEvent, isSelected: boolean) => { const id = event.currentTarget.id as 'first' | 'second' | 'third' | 'fourth' | 'fifth' | 'sixth' | 'seventh'; - this.setState(prevState => { + this.setState((prevState) => { prevState.isSelected[id] = isSelected; return { isSelected: prevState.isSelected diff --git a/packages/react-integration/scripts/htmlReport.js b/packages/react-integration/scripts/htmlReport.js index 6a61a278727..5ed35de7678 100644 --- a/packages/react-integration/scripts/htmlReport.js +++ b/packages/react-integration/scripts/htmlReport.js @@ -95,14 +95,10 @@ let reportScript = * @param {string} str - String */ function entity(str) { - return str - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/\\"/g, '"'); + return str.replace(/&/g, '&').replace(//g, '>').replace(/\\"/g, '"'); } -const generateTDTable = function(reportXml) { +const generateTDTable = function (reportXml) { let totalTests = 0; let totalFailures = 0; let totalSkips = 0; @@ -169,7 +165,7 @@ const generateTDTable = function(reportXml) { return testDetailsTable; }; -const generateTSTable = function(testConfig) { +const generateTSTable = function (testConfig) { let testSummaryTable = '
'; const testReportTitle = testConfig.reportTitle === undefined ? 'Test Execution Report' : testConfig.reportTitle; testSummaryTable += testReportTitle + '
'; diff --git a/packages/react-styles/.eslintrc.json b/packages/react-styles/.eslintrc.json deleted file mode 100644 index eb95cf4405d..00000000000 --- a/packages/react-styles/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "camelcase": "off" - } -} diff --git a/packages/react-tokens/scripts/writeTokens.js b/packages/react-tokens/scripts/writeTokens.js index 8c023b71d02..3f8b7eebe1f 100644 --- a/packages/react-tokens/scripts/writeTokens.js +++ b/packages/react-tokens/scripts/writeTokens.js @@ -38,7 +38,7 @@ const allIndex = {}; const componentIndex = []; const outputIndex = (index, indexFile) => { - const esmIndexString = index.map(file => `export { ${file} } from './${file}';`).join('\n'); + const esmIndexString = index.map((file) => `export { ${file} } from './${file}';`).join('\n'); outputFileSync(join(outDir, 'esm', indexFile), esmIndexString); outputFileSync( join(outDir, 'js', indexFile), @@ -48,7 +48,7 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } exports.__esModule = true; -${index.map(file => `__export(require('./${file}'));`).join('\n')} +${index.map((file) => `__export(require('./${file}'));`).join('\n')} `.trim() ); outputFileSync(join(outDir, 'esm', indexFile.replace('.js', '.d.ts')), esmIndexString); @@ -72,7 +72,7 @@ function writeTokens(tokens) { // Legacy token support -- values may be incorrect. Object.values(tokenValue) - .map(values => Object.entries(values)) + .map((values) => Object.entries(values)) .reduce((acc, val) => acc.concat(val), []) // flatten .forEach(([oldTokenName, { name, value }]) => { const isChart = oldTokenName.includes('chart'); diff --git a/plopfile.js b/plopfile.js index d565ba9cdbd..86f4e0f5468 100644 --- a/plopfile.js +++ b/plopfile.js @@ -3,7 +3,7 @@ const { setHelpers } = require('./scripts/generators/helpers'); const setPFGenerators = require('./scripts/generators/patternfly-component'); const setPackageGenerators = require('./scripts/generators/package'); -module.exports = plop => { +module.exports = (plop) => { setHelpers(plop); setActionTypes(plop); diff --git a/scripts/generators/helpers.js b/scripts/generators/helpers.js index 07d414a5a0e..ce320befff7 100644 --- a/scripts/generators/helpers.js +++ b/scripts/generators/helpers.js @@ -1,7 +1,7 @@ const REMOVE_NPM_SCOPE = 'removeNPMScope'; function setHelpers(plop) { - plop.setHelper(REMOVE_NPM_SCOPE, text => text.replace(/^@patternfly\//i, '')); + plop.setHelper(REMOVE_NPM_SCOPE, (text) => text.replace(/^@patternfly\//i, '')); } module.exports = { diff --git a/scripts/generators/package/index.js b/scripts/generators/package/index.js index 5125990718d..a31360391c6 100644 --- a/scripts/generators/package/index.js +++ b/scripts/generators/package/index.js @@ -23,7 +23,7 @@ function setPackageGenerators(plop) { message: 'Does this build with Typescript?' } ], - actions: answers => { + actions: (answers) => { const packageBaseTemplate = join(packagesRoot, `./{{${REMOVE_NPM_SCOPE} name}}/`); return [ @@ -39,20 +39,17 @@ function setPackageGenerators(plop) { ? join(packageBaseTemplate, 'src/index.ts') : join(packageBaseTemplate, 'lib/index.js') }, - answers.buildsWithTypescript && - { + answers.buildsWithTypescript && { type: 'add', path: join(packageBaseTemplate, `.npmignore`), templateFile: resolve(__dirname, './.npmignore') }, - answers.buildsWithTypescript && - { + answers.buildsWithTypescript && { type: 'add', path: join(packageBaseTemplate, `tsconfig.json`), templateFile: resolve(__dirname, './tsconfig.json') }, - answers.buildsWithTypescript && - { + answers.buildsWithTypescript && { type: 'add', path: join(packageBaseTemplate, `tsconfig.cjs.json`), templateFile: resolve(__dirname, './tsconfig.cjs.json') diff --git a/yarn.lock b/yarn.lock index afe6fb540a1..70b88fe9828 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1849,6 +1849,13 @@ __metadata: languageName: node linkType: hard +"@eslint/compat@npm:^1.1.1": + version: 1.1.1 + resolution: "@eslint/compat@npm:1.1.1" + checksum: 10c0/ca8aa3811fa22d45913f5724978e6f3ae05fb7685b793de4797c9db3b0e22b530f0f492011b253754bffce879d7cece65762cc3391239b5d2249aef8230edc9a + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/eslintrc@npm:2.1.4" @@ -1873,6 +1880,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:^9.7.0": + version: 9.7.0 + resolution: "@eslint/js@npm:9.7.0" + checksum: 10c0/73fc10666f6f4aed6f58e407e09f42ceb0d42fa60c52701c64ea9f59a81a6a8ad5caecdfd423d03088481515fe7ec17eb461acb4ef1ad70b649b6eae465b3164 + languageName: node + linkType: hard + "@fortawesome/fontawesome-common-types@npm:^0.2.36": version: 0.2.36 resolution: "@fortawesome/fontawesome-common-types@npm:0.2.36" @@ -3280,6 +3294,8 @@ __metadata: "@babel/plugin-transform-modules-commonjs": "npm:^7.24.7" "@babel/preset-react": "npm:^7.24.7" "@babel/preset-typescript": "npm:^7.24.7" + "@eslint/compat": "npm:^1.1.1" + "@eslint/js": "npm:^9.7.0" "@octokit/rest": "npm:^20.1.1" "@rollup/plugin-commonjs": "npm:^26.0.1" "@rollup/plugin-node-resolve": "npm:^15.2.3" @@ -3293,8 +3309,6 @@ __metadata: "@types/node": "npm:^20.14.10" "@types/react": "npm:^18.3.3" "@types/react-dom": "npm:^18.3.0" - "@typescript-eslint/eslint-plugin": "npm:^7.16.0" - "@typescript-eslint/parser": "npm:^7.16.0" babel-jest: "npm:^29.7.0" concurrently: "npm:^8.2.2" eslint: "npm:^8.57.0" @@ -3304,6 +3318,7 @@ __metadata: eslint-plugin-testing-library: "npm:^6.2.2" fs-extra: "npm:^11.2.0" glob: "npm:^10.4.5" + globals: "npm:^15.8.0" husky: "npm:^9.0.11" jest: "npm:^29.7.0" jest-environment-jsdom: "npm:^29.7.0" @@ -3324,6 +3339,7 @@ __metadata: ts-node: "npm:^10.9.2" ts-patch: "npm:^3.2.1" typescript: "npm:^5.4.5" + typescript-eslint: "npm:^7.16.1" languageName: unknown linkType: soft @@ -4757,15 +4773,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.16.0" +"@typescript-eslint/eslint-plugin@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/eslint-plugin@npm:7.16.1" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.16.0" - "@typescript-eslint/type-utils": "npm:7.16.0" - "@typescript-eslint/utils": "npm:7.16.0" - "@typescript-eslint/visitor-keys": "npm:7.16.0" + "@typescript-eslint/scope-manager": "npm:7.16.1" + "@typescript-eslint/type-utils": "npm:7.16.1" + "@typescript-eslint/utils": "npm:7.16.1" + "@typescript-eslint/visitor-keys": "npm:7.16.1" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -4776,25 +4792,25 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/a6c4c93bd7ec1604079018b95416d8ac28af3345d50620f815ffd36e705c4964d88edc434e710ef8722690497f1eeab1e9a0f48faa6d448405980f5d05c888b7 + checksum: 10c0/3d0d8fa7e00dff4deb70f41432030e4e0e0bc1e4415ae7be969b77bb216fd0797507ed852baaf6d12f6ae022f69ac6356201f6b4129ddfd57b232bfc6715ac8a languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/parser@npm:7.16.0" +"@typescript-eslint/parser@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/parser@npm:7.16.1" dependencies: - "@typescript-eslint/scope-manager": "npm:7.16.0" - "@typescript-eslint/types": "npm:7.16.0" - "@typescript-eslint/typescript-estree": "npm:7.16.0" - "@typescript-eslint/visitor-keys": "npm:7.16.0" + "@typescript-eslint/scope-manager": "npm:7.16.1" + "@typescript-eslint/types": "npm:7.16.1" + "@typescript-eslint/typescript-estree": "npm:7.16.1" + "@typescript-eslint/visitor-keys": "npm:7.16.1" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/bf809c5a59dddc72fc2f11a5d10c78825fa2ffbec72a711e3f783b022d77266a1b709ad450912ebbff24ca9ac20c6baae1d12477735e00aafce662fdbdfa66ef + checksum: 10c0/f0c731d9f22ccbcc2a15eb33376ae09cdcdcb4c69fcce425e8e7e5e3ccce51c4ee431d350109a02a09f40df81349c59eddd0264fe53a4194f326c0e0e2e3e83a languageName: node linkType: hard @@ -4808,22 +4824,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/scope-manager@npm:7.16.0" +"@typescript-eslint/scope-manager@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/scope-manager@npm:7.16.1" dependencies: - "@typescript-eslint/types": "npm:7.16.0" - "@typescript-eslint/visitor-keys": "npm:7.16.0" - checksum: 10c0/e00f57908a1b30fb93ae0e35c46a798669782428e98f927a4d39ef3b1e7d5ad4a48e4e121bd136ed9732c2d1c09cf0b99e4029b1a1a11aadf6f2b92e1003f41c + "@typescript-eslint/types": "npm:7.16.1" + "@typescript-eslint/visitor-keys": "npm:7.16.1" + checksum: 10c0/5105edd927fd45097eb9c16f235ba48c2d9f2f3a3948fbdc4ffdc9a9fc5f130fa46c32d9188fe4bb303bd99508d7f0aad342c2ec0d9ad887aa1416dd54edeb66 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/type-utils@npm:7.16.0" +"@typescript-eslint/type-utils@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/type-utils@npm:7.16.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.16.0" - "@typescript-eslint/utils": "npm:7.16.0" + "@typescript-eslint/typescript-estree": "npm:7.16.1" + "@typescript-eslint/utils": "npm:7.16.1" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -4831,7 +4847,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/91ef86e173d2d86487d669ddda7a0f754485e82a671a64cfbf7790639dfb4c691f6f002ae19d4d82a90e4cca9cd7563e38100c1dfabab461632b0da1eac2b39b + checksum: 10c0/7551566185ca372dbc3d53b8ab047ea7e2c50b25d9a9293d5163498fb87c4b16a585d267a4a99df57d70326754acf168aad726ee5e8b9c0d4e59f1b8653d951d languageName: node linkType: hard @@ -4842,10 +4858,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/types@npm:7.16.0" - checksum: 10c0/5d7080991241232072c50c1e1be35976631f764fe0f4fd43cf1026a2722aab772a14906dfaa322183b040c6ca8ae4494a78f653dd3b22bcdbdfe063a301240b0 +"@typescript-eslint/types@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/types@npm:7.16.1" + checksum: 10c0/5ab7bfcac81adb01672057270d0273da98dcf50d2add5819b4787b5973f6624d11ad33d6fb495f80fe628fefa3a5ed319b433ed57e9121e444cfc002e1e48625 languageName: node linkType: hard @@ -4867,12 +4883,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.16.0" +"@typescript-eslint/typescript-estree@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/typescript-estree@npm:7.16.1" dependencies: - "@typescript-eslint/types": "npm:7.16.0" - "@typescript-eslint/visitor-keys": "npm:7.16.0" + "@typescript-eslint/types": "npm:7.16.1" + "@typescript-eslint/visitor-keys": "npm:7.16.1" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -4882,21 +4898,21 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/2b4e7cbdb1b43d937d1dde057ab18111e0f2bb16cb2d3f48a60c5611ff81d0b64455b325475bcce6213c54653b6c4d3b475526f7ffcf8f74014ab9b64a3d6d92 + checksum: 10c0/979269e9d42d75c0e49f47c7bb5e9554bd29041339c6fecfe5c76726699bce25132bef8b54210769e4f0abb858a278923340d3e4decc6551406e2c5ec065fe04 languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/utils@npm:7.16.0" +"@typescript-eslint/utils@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/utils@npm:7.16.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:7.16.0" - "@typescript-eslint/types": "npm:7.16.0" - "@typescript-eslint/typescript-estree": "npm:7.16.0" + "@typescript-eslint/scope-manager": "npm:7.16.1" + "@typescript-eslint/types": "npm:7.16.1" + "@typescript-eslint/typescript-estree": "npm:7.16.1" peerDependencies: eslint: ^8.56.0 - checksum: 10c0/1b835cbd243a4266a84655bcfcd08a14003e9740efbb032d60ab4403f03838280e7ad759b1f362d88939beaee08d7a1752fa6b049aad8d33793758853469fe76 + checksum: 10c0/22fbf17eec064d1e67f2a4bf512f62d5369a22fe11226f043cbeb0fe79cd18006b04f933e5025f4e5c2f82047248dac52cc97199e495ad17d564084210099d17 languageName: node linkType: hard @@ -4928,13 +4944,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.16.0": - version: 7.16.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.16.0" +"@typescript-eslint/visitor-keys@npm:7.16.1": + version: 7.16.1 + resolution: "@typescript-eslint/visitor-keys@npm:7.16.1" dependencies: - "@typescript-eslint/types": "npm:7.16.0" + "@typescript-eslint/types": "npm:7.16.1" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/a3c614cdc2e9c37e007e15e1ee169a9ad040fac189d0abd2b840f78910b499b362493bbf0019c5979785567ae30839a799b4dd219f70a668bac930fd79fdc5d3 + checksum: 10c0/060bc6770ba3ea271c6a844501f4dfee1b8842a0c405e60d2a258466b1b4e66086234a3fddac8745bb1a39a89eab29afeaf16133ad925bd426ac8fdb13fb7f94 languageName: node linkType: hard @@ -11027,6 +11043,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^15.8.0": + version: 15.8.0 + resolution: "globals@npm:15.8.0" + checksum: 10c0/b96ec86e1244806920a80a1a7c4d64b68c55336887cfa1b52886927e0f9035133e4acd354fcda63b49e53df2089c41a11dd2b02281a6439a58cbc0d63ae083cb + languageName: node + linkType: hard + "globalthis@npm:^1.0.3": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -20228,6 +20251,22 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^7.16.1": + version: 7.16.1 + resolution: "typescript-eslint@npm:7.16.1" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:7.16.1" + "@typescript-eslint/parser": "npm:7.16.1" + "@typescript-eslint/utils": "npm:7.16.1" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/293af275e79d3ece210471c24c807f44d6c82896b99f59dfa3be6fc4ef9cbbc2e8737cec83f70fb416450c4adf3b27a4bee5791e7e06be3fe89cf8a05dda1779 + languageName: node + linkType: hard + "typescript@npm:4.3.5": version: 4.3.5 resolution: "typescript@npm:4.3.5"