Skip to content

Commit 13bbd20

Browse files
authored
feat(prefer-mock-return-shorthand): greatly improve checking if mutable variables are used (#1914)
* test(prefer-mock-return-shorthand): add more cases * refactor(prefer-mock-return-shorthand): move mutability checker into a function * fix(prefer-mock-return-shorthand): check shallow objects for use of mutable values * fix(prefer-mock-return-shorthand): check shallow arrays for use of mutable values * fix(prefer-mock-return-shorthand): handle binary expressions * fix(prefer-mock-return-shorthand): handle nested nodes * fix(prefer-mock-return-shorthand): support function arguments * fix(prefer-mock-return-shorthand): support member expressions * fix(prefer-mock-return-shorthand): support spreading * fix(prefer-mock-return-shorthand): support bitwise and unary operators * fix(prefer-mock-return-shorthand): support optional chain expressions * fix(prefer-mock-return-shorthand): support logical expressions * refactor(prefer-mock-return-shorthand): use fallthrough * fix(prefer-mock-return-shorthand): support new expressions * fix(prefer-mock-return-shorthand): check computed properties * fix(prefer-mock-return-shorthand): check conditional expressions * refactor(prefer-mock-return-shorthand): simplify checks
1 parent eaa5549 commit 13bbd20

File tree

2 files changed

+1218
-13
lines changed

2 files changed

+1218
-13
lines changed

0 commit comments

Comments
 (0)