Skip to content
New issue

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

eslint: cactbot-output-strings not detecting output properties from spread #5538

Open
wexxlee opened this issue Jun 11, 2023 · 0 comments
Open
Labels

Comments

@wexxlee
Copy link
Contributor

wexxlee commented Jun 11, 2023

I mentioned this in my comment on PR #5534 , but it seems that cactbot-output-strings is not (or at least not properly) detecting output{} properties that are specified by a spread.

For example:

  • In golbez.ts, the 'Golbez Gale Sphere Directions' trigger calls output.clones!() and may pass in output.unknown!() as a value.
  • outputStrings includes a spread assignment -- ...Directions.outputStringsCardinalDir -- which contains a property of unknown: Outputs.unknown.
  • Unless unknown: Outputs.unknown is manually (and duplicatively) added to outputStrings, eslint will throw an error that there is no 'unknown' in 'output.'

Expected behavior: eslint should recognize properties assigned through a spread, and should not throw an error on a call to output.*!() if * is a valid property in outputStrings that is assigned through a spread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant