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

Open
Clarchik opened this issue Dec 28, 2024 · 1 comment
Labels
Resolution: By Design The behavior reported in the issue is actually correct.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: By Design The behavior reported in the issue is actually correct.
Projects
None yet
Development

No branches or pull requests

2 participants