pmndrs / eslint-plugin-valtio

An eslint plugin for better valtio experience
MIT License
78 stars 6 forks source link

Fix: 24 | additional null check for initial call arguments #25

Closed barelyhuman closed 2 years ago

barelyhuman commented 2 years ago

fix: #24

Also additional test case and fix for no-deps useEffect since it can cause tearing on significant renders

codesandbox-ci[bot] commented 2 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 13591806dfa8947cd7e5f46b2186002fbe7262f6:

Sandbox Source
Vanilla Configuration
React Configuration
fervent-sun-j3hzxk Issue #24
github-actions[bot] commented 2 years ago

Size Change: +13 B (0%)

Total Size: 3.25 kB

Filename Size Change
dist/index.js 3.25 kB +13 B (0%)

compressed-size-action

barelyhuman commented 2 years ago

@axelson This should fix the issue, we'd like you to check it through using the codesandbox builds above until a new release is published

axelson commented 2 years ago

@barelyhuman thanks for this fix! Is there a way I can run eslint in the codesandbox? I'm not seeing a console where I can run npx eslint

barelyhuman commented 2 years ago

@barelyhuman thanks for this fix! Is there a way I can run eslint in the codesandbox? I'm not seeing a console where I can run npx eslint

nah, you can’t. though, you can use the builds generated by codesandbox

https://ci.codesandbox.io/status/pmndrs/eslint-plugin-valtio/pr/25/builds/250278

use the “local install instructions” to use this PR’s build

axelson commented 2 years ago

@barelyhuman Thanks for the testing instructions!

Unfortunately on my production project I'm still running into: https://github.com/pmndrs/eslint-plugin-valtio/issues/24 even when I'm using "eslint-plugin-valtio": "https://pkg.csb.dev/pmndrs/eslint-plugin-valtio/commit/13591806/eslint-plugin-valtio"

barelyhuman commented 2 years ago

is it possible for you to create a reproduction project for the same? not a sandbox, a normal repo. i can’t seem to get the same error

barelyhuman commented 2 years ago

@barelyhuman Thanks for the testing instructions!

Unfortunately on my production project I'm still running into: #24 even when I'm using "eslint-plugin-valtio": "https://pkg.csb.dev/pmndrs/eslint-plugin-valtio/commit/13591806/eslint-plugin-valtio"

@axelson Make sure you re-install the node-modules and do that after removing any .lock files and test that again. If not, I'd be happy to help with a simple github repo reproducing this issue :)