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

Add destructuredArrayIgnorePattern to eslint config #33552

Closed
wants to merge 2 commits into from
Closed

Add destructuredArrayIgnorePattern to eslint config #33552

wants to merge 2 commits into from

Conversation

fwcd
Copy link
Contributor

@fwcd fwcd commented Apr 2, 2022

Summary

This adds the destructuredArrayIgnorePattern rule recently introduced in typescript-eslint, making underscored identifiers in array destructurings no longer an error, e.g.

const [state, _dispatch] = useContext(MyContext);

would be acceptable if state is used.

Changelog

[General] [Added] - Add destructuredArrayIgnorePattern to eslint config

Test Plan

Install the @react-native-community/eslint-config package and test the example.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Apr 2, 2022
@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Apr 2, 2022
@analysis-bot
Copy link

analysis-bot commented Apr 2, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 1e51ac2
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,810,275 +0
android hermes armeabi-v7a 7,201,983 +0
android hermes x86 8,118,818 +0
android hermes x86_64 8,098,909 +0
android jsc arm64-v8a 9,643,576 +0
android jsc armeabi-v7a 8,417,829 +0
android jsc x86 9,592,769 +0
android jsc x86_64 10,189,948 +0

Base commit: 6e0fa5f
Branch: main

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 3, 2022
@facebook-github-bot
Copy link
Contributor

@ryancat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 7, 2022
@facebook-github-bot
Copy link
Contributor

@ryancat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @fwcd in 0c5ef57.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 12, 2022
@fwcd fwcd deleted the destructured-array-ignore-pattern-eslint branch October 12, 2022 20:26
mohitcharkha pushed a commit to mohitcharkha/react-native that referenced this pull request Oct 17, 2022
Summary:
This adds the `destructuredArrayIgnorePattern` rule [recently introduced in `typescript-eslint`](typescript-eslint/typescript-eslint#4691), making underscored identifiers in array destructurings no longer an error, e.g.

```js
const [state, _dispatch] = useContext(MyContext);
```

would be acceptable if `state` is used.

## Changelog

[General] [Added] - Add destructuredArrayIgnorePattern to eslint config

Pull Request resolved: facebook#33552

Test Plan: Install the `react-native-community/eslint-config` package and test the example.

Reviewed By: lunaleaps, cipolleschi

Differential Revision: D40166101

Pulled By: ryancat

fbshipit-source-id: 1e30297bf40d65e09682c4f9f3b3dd432ba5310e
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This adds the `destructuredArrayIgnorePattern` rule [recently introduced in `typescript-eslint`](typescript-eslint/typescript-eslint#4691), making underscored identifiers in array destructurings no longer an error, e.g.

```js
const [state, _dispatch] = useContext(MyContext);
```

would be acceptable if `state` is used.

## Changelog

[General] [Added] - Add destructuredArrayIgnorePattern to eslint config

Pull Request resolved: facebook#33552

Test Plan: Install the `react-native-community/eslint-config` package and test the example.

Reviewed By: lunaleaps, cipolleschi

Differential Revision: D40166101

Pulled By: ryancat

fbshipit-source-id: 1e30297bf40d65e09682c4f9f3b3dd432ba5310e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants