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

[functional/immutable-data] Doesn't take into consideration ignoreAccessorPattern with hash symbol #911

Closed
Clarchik opened this issue Dec 28, 2024 · 2 comments · Fixed by #921
Labels
Breaking Change This change will require a new major release. Status: Released It's now live. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors.

Comments

@Clarchik
Copy link

Bug Report

Seems like rule does not work as intended.

Expected behavior

Rule below should not produce error for variables which follows # symbol (TS private modifier)

'functional/immutable-data': [
      'error',
      {
        ignoreAccessorPattern: ['**._*', '**.#*']
      }
    ],

Actual behavior

Works for

this._anyName = value

But produces error for

this.#anyName = value

Modifying an existing object/array is not allowed.eslint[functional/immutable-data]

Steps to reproduce

Latest version (7.2.0) with the rule snippet above

Proposed changes

@Clarchik Clarchik added Status: Triage This issue needs to be triaged. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors. labels Dec 28, 2024
@RebeccaStevens
Copy link
Collaborator

See #910 (comment)

@RebeccaStevens RebeccaStevens added Resolution: By Design The behavior reported in the issue is actually correct. and removed Type: Bug Inconsistencies or issues which will cause a problem for users or implementors. Status: Triage This issue needs to be triaged. labels Jan 5, 2025
@RebeccaStevens RebeccaStevens added Type: Bug Inconsistencies or issues which will cause a problem for users or implementors. Breaking Change This change will require a new major release. and removed Resolution: By Design The behavior reported in the issue is actually correct. labels Jan 14, 2025
RebeccaStevens added a commit that referenced this issue Jan 14, 2025
BREAKING CHANGE: when using patterns to match against PrivateIdentifiers, their names are now
prefixed with a #.

fix #910 fix #911
@github-actions github-actions bot added the Status: Released It's now live. label Jan 14, 2025
RebeccaStevens added a commit that referenced this issue Jan 14, 2025
BREAKING CHANGE: when using patterns to match against PrivateIdentifiers, their names are now prefixed with a #.

fix #910 fix #911
github-actions bot pushed a commit that referenced this issue Jan 14, 2025
# [8.0.0](v7.3.0...v8.0.0) (2025-01-14)

### Bug Fixes

* prefix PrivateIdentifier names with a # ([#921](#921)) ([09b6474](09b6474)), closes [#910](#910) [#911](#911)

### BREAKING CHANGES

* when using patterns to match against PrivateIdentifiers, their names are now prefixed with a #.
Copy link

🎉 This issue has been resolved in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@eslint-functional eslint-functional deleted a comment from github-actions bot Jan 14, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 14, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 15, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 15, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 15, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 15, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change This change will require a new major release. Status: Released It's now live. Type: Bug Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants