From 0c47ff1873490e3d469b0c77622ced5ed6aeced4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 11:33:20 -0400 Subject: [PATCH] chore(deps): update typescript-eslint monorepo to v6 (major) (#916) * chore(deps): update typescript-eslint monorepo to v6 * chore: update config and apply changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Robb Niznik --- .eslintrc.js | 1 + package.json | 4 +- packages/menu/src/utils.ts | 2 +- packages/modal/src/ModalContainer.tsx | 2 +- packages/select/src/SelectItem.tsx | 1 + packages/select/src/SingleSelect/types.ts | 1 + packages/tab-list/src/TabList.tsx | 2 +- packages/tag/src/Tag.tsx | 1 + packages/tag/src/TagItem.tsx | 1 + pnpm-lock.yaml | 155 +++++++++++++++++++++- 10 files changed, 159 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f8268b24b..8c23244e0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,7 @@ module.exports = { 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/stylistic', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:jsx-a11y/recommended', diff --git a/package.json b/package.json index 9d564c4b5..b1e79848f 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,8 @@ "@types/react": "^18.2.8", "@types/react-dom": "^18.2.4", "@types/testing-library__jest-dom": "^5.14.3", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", "@vanilla-extract/css": "^1.12.0", "@vanilla-extract/vite-plugin": "^3.8.2", "@vitejs/plugin-react-swc": "^3.3.1", diff --git a/packages/menu/src/utils.ts b/packages/menu/src/utils.ts index a19eb46b9..f5cdc51c1 100644 --- a/packages/menu/src/utils.ts +++ b/packages/menu/src/utils.ts @@ -24,7 +24,7 @@ const handleKeyboardInteractions = ( }; const chainEventHandlers = - (...handlers: Array | undefined>) => + (...handlers: (EventHandler | undefined)[]) => (event: SyntheticEvent) => { handlers.forEach((h) => typeof h === 'function' && h(event)); }; diff --git a/packages/modal/src/ModalContainer.tsx b/packages/modal/src/ModalContainer.tsx index eb44a8ff3..f8c98ed17 100644 --- a/packages/modal/src/ModalContainer.tsx +++ b/packages/modal/src/ModalContainer.tsx @@ -18,7 +18,7 @@ const overlay: Variants = { hidden: { opacity: 0 }, }; -const transitions: { [key: string]: Variants } = { +const transitions: Record = { desktopPop: { hidden: { opacity: 0, scale: 0.9 }, visible: { opacity: 1, scale: 1, transition: { type: 'spring', delay: 0.1, duration: 0.15 } }, diff --git a/packages/select/src/SelectItem.tsx b/packages/select/src/SelectItem.tsx index 8d4a7cb27..8f56a5df4 100644 --- a/packages/select/src/SelectItem.tsx +++ b/packages/select/src/SelectItem.tsx @@ -16,6 +16,7 @@ const SelectItem = ( SelectItem.getCollectionNode = function* getCollectionNode( props: ItemProps, + // eslint-disable-next-line @typescript-eslint/no-explicit-any context: any ) { const rendered = props.title || props.children; diff --git a/packages/select/src/SingleSelect/types.ts b/packages/select/src/SingleSelect/types.ts index 810edc91f..0f163588c 100644 --- a/packages/select/src/SingleSelect/types.ts +++ b/packages/select/src/SingleSelect/types.ts @@ -6,6 +6,7 @@ type SingleSelection = { /** The initial selected keys in the collection (uncontrolled). */ defaultSelectedKey?: Key; /** Handler that is called when the selection changes. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any onSelectionChange?: (key: Key) => any; }; diff --git a/packages/tab-list/src/TabList.tsx b/packages/tab-list/src/TabList.tsx index cd4bcea95..5976e8b34 100644 --- a/packages/tab-list/src/TabList.tsx +++ b/packages/tab-list/src/TabList.tsx @@ -16,7 +16,7 @@ type TabListProps = AriaTabListProps /** CSS classes to pass into the TabList wrapper div. */ className?: string; /** The children passed into the TabList. This is a react-stately Item with JSX children. */ - children: ItemElement | Array>; + children: ItemElement | ItemElement[]; /** Array of any disabled Tabs in the grouping. */ disabledTabs?: string[]; /** Called when the user clicks on a different tab */ diff --git a/packages/tag/src/Tag.tsx b/packages/tag/src/Tag.tsx index 2b4960b1d..be3ac6414 100644 --- a/packages/tag/src/Tag.tsx +++ b/packages/tag/src/Tag.tsx @@ -71,6 +71,7 @@ const Tag = (props: TagProps) => { data-test-id="remove-tag-btn" onClick={(e) => { e.stopPropagation(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any removeButtonProps.onPress?.(undefined as any); }} {...removeButtonProps} diff --git a/packages/tag/src/TagItem.tsx b/packages/tag/src/TagItem.tsx index 92e3f8929..f4bd766d5 100644 --- a/packages/tag/src/TagItem.tsx +++ b/packages/tag/src/TagItem.tsx @@ -17,6 +17,7 @@ const TagItem = ( TagItem.getCollectionNode = function* getCollectionNode( props: ItemProps, + // eslint-disable-next-line @typescript-eslint/no-explicit-any context: any ) { const rendered = props.title || props.children; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b2513ea70..0d7051c19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,11 +99,11 @@ importers: specifier: ^5.14.3 version: 5.14.3 '@typescript-eslint/eslint-plugin': - specifier: ^5.61.0 - version: 5.61.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.3) + specifier: ^6.0.0 + version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.44.0)(typescript@5.1.3) '@typescript-eslint/parser': - specifier: ^5.61.0 - version: 5.61.0(eslint@8.44.0)(typescript@5.1.3) + specifier: ^6.0.0 + version: 6.0.0(eslint@8.44.0)(typescript@5.1.3) '@vanilla-extract/css': specifier: ^1.12.0 version: 1.12.0 @@ -8794,6 +8794,37 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.44.0)(typescript@5.1.3): + resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 6.0.0(eslint@8.44.0)(typescript@5.1.3) + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/type-utils': 6.0.0(eslint@8.44.0)(typescript@5.1.3) + '@typescript-eslint/utils': 6.0.0(eslint@8.44.0)(typescript@5.1.3) + '@typescript-eslint/visitor-keys': 6.0.0 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.44.0 + grapheme-splitter: 1.0.4 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + natural-compare-lite: 1.4.0 + semver: 7.5.3 + ts-api-utils: 1.0.1(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@5.61.0(eslint@8.44.0)(typescript@5.1.3): resolution: {integrity: sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8814,6 +8845,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.0.0(eslint@8.44.0)(typescript@5.1.3): + resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.3) + '@typescript-eslint/visitor-keys': 6.0.0 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.44.0 + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager@5.59.9: resolution: {integrity: sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8830,6 +8882,14 @@ packages: '@typescript-eslint/visitor-keys': 5.61.0 dev: true + /@typescript-eslint/scope-manager@6.0.0: + resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 + dev: true + /@typescript-eslint/type-utils@5.59.9(eslint@8.44.0)(typescript@5.1.3): resolution: {integrity: sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8870,6 +8930,26 @@ packages: - supports-color dev: true + /@typescript-eslint/type-utils@6.0.0(eslint@8.44.0)(typescript@5.1.3): + resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.3) + '@typescript-eslint/utils': 6.0.0(eslint@8.44.0)(typescript@5.1.3) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.44.0 + ts-api-utils: 1.0.1(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/types@5.59.9: resolution: {integrity: sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8880,6 +8960,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@6.0.0: + resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@5.59.9(typescript@5.1.3): resolution: {integrity: sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8894,7 +8979,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.1 + semver: 7.5.3 tsutils: 3.21.0(typescript@5.1.3) typescript: 5.1.3 transitivePeerDependencies: @@ -8922,6 +9007,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.3): + resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.3 + ts-api-utils: 1.0.1(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@5.59.9(eslint@8.44.0)(typescript@5.1.3): resolution: {integrity: sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8962,6 +9068,26 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.0.0(eslint@8.44.0)(typescript@5.1.3): + resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.3) + eslint: 8.44.0 + eslint-scope: 5.1.1 + semver: 7.5.3 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.59.9: resolution: {integrity: sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8978,6 +9104,14 @@ packages: eslint-visitor-keys: 3.4.1 dev: true + /@typescript-eslint/visitor-keys@6.0.0: + resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.0.0 + eslint-visitor-keys: 3.4.1 + dev: true + /@vanilla-extract/babel-plugin-debug-ids@1.0.3: resolution: {integrity: sha512-vm4jYu1xhSa6ofQ9AhIpR3DkAp4c+eoR1Rpm8/TQI4DmWbmGbOjYRcqV0aWsfaIlNhN4kFuxFMKBNN9oG6iRzA==} dependencies: @@ -13823,7 +13957,7 @@ packages: eslint: '*' typescript: '>=4.7.4' dependencies: - '@typescript-eslint/type-utils': 5.59.9(eslint@8.44.0)(typescript@5.1.3) + '@typescript-eslint/type-utils': 5.61.0(eslint@8.44.0)(typescript@5.1.3) eslint: 8.44.0 typescript: 5.1.3 transitivePeerDependencies: @@ -19098,6 +19232,15 @@ packages: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: true + /ts-api-utils@1.0.1(typescript@5.1.3): + resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.1.3 + dev: true + /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'}