Skip to content

when needing accumulative data | contextual data #322

Answered by RebeccaStevens
speedfl asked this question in Q&A
Discussion options

You must be logged in to vote

There are few ways to solve this.

Option one is to explicitly mark the array as mutable (usually by prefixing "mutable" to the start of the variables name) and configure the rules to ignore variable marked like this.

Option two would be to configure the rules to ignore all local mutations.

Option 3 would be to use an eslint-disable comment at the start of the function, and an eslint-enable comment at the end (for the rules being violated).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@speedfl
Comment options

Answer selected by speedfl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants