[functional/immutable-data] Doesn't take into consideration ignoreAccessorPattern with hash symbol
Type: BugBreaking ChangeStatus: Released
## Bug Report
<!-- Why the issue was filed? -->
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: ['**._*', '**.#*']
}
],
```
<!-- What you expected to happen? -->
### 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]`
<!-- What actually happened? -->
### Steps to reproduce
Latest version (7.2.0) with the rule snippet above
### Proposed changes
<!-- If you have a proposed change, workaround or fix, describe it here -->
关闭于 2025-01-14 3 条评论