We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Fail on values that aren't safe for interchange
Warns about a potential problem
Per https://socket.dev/blog/judicious-json
Some values of JSON do not coerce safely across different situations.
// 'null' JSON.stringify(Number.MAX_VALUE * 10) // Infinity JSON.parse('2e309')
let serialized = JSON.stringify("🔥"[0]); // '"\\uD83D"' - note extra \ JSON.parse(serialized); // "\uD83D"
This isn't feasible to show an example of. Only affects very large data. Uncommon and easily skipped usually.
No response
The text was updated successfully, but these errors were encountered:
This sounds like a great idea for a no-unsafe-values rule. 👍 Feel free to submit a PR.
no-unsafe-values
Sorry, something went wrong.
feat: rule no-unsafe-values
c7e2ba8
Fixes eslint#29
Successfully merging a pull request may close this issue.
Rule details
Fail on values that aren't safe for interchange
What type of rule is this?
Warns about a potential problem
Example code
Per https://socket.dev/blog/judicious-json
Some values of JSON do not coerce safely across different situations.
This isn't feasible to show an example of. Only affects very large data. Uncommon and easily skipped usually.
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: