Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @typescript-eslint/array-type to be compatible with @typescrip… #212

Merged
merged 3 commits into from
Feb 12, 2021

Conversation

vsumner
Copy link
Contributor

@vsumner vsumner commented Feb 12, 2021

Description

Update @typescript-eslint/array-type to be compatible with @typescript-eslint/ban-types

array-simple causes this error:

error: Array type using 'T[]' is forbidden for non-simple types. Use 'Array<T>' instead (@typescript-eslint/array-type) at packages/sewing-kit/src/tools/webpack/playground/index.ts:59:21:
  57 |     : playgroundForWorkspace();
  58 |
> 59 |   const filesToAdd: Promise<void>[] = [];
     |                     ^
  60 |
  61 |   if (force || !(await pathExists(playgroundFile))) {
  62 |     filesToAdd.push(writeFile(playgroundFile, format(playgroundContent)));

When the type gets updated to Array<Promise<void>> then the @typescript-eslint/ban-types is tripped.

I tested this against sewing-kit

Type of change

  • @shopify/eslint-plugin Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish a new version for these changes)

packages/eslint-plugin/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Gannon McGibbon <gannon.mcgibbon@shopify.com>
@vsumner vsumner merged commit b45c2d7 into main Feb 12, 2021
@vsumner vsumner deleted the fix-typescript-array-type branch February 12, 2021 18:38
@vsumner vsumner temporarily deployed to production February 12, 2021 18:41 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants