eslint-plugin-panda
eslint-plugin-panda copied to clipboard
Time-out issues after setting eslint rules
I tried installing this eslint plugin today:
"@pandacss/eslint-plugin": "^0.2.3",
I added the plugin like this in my eslint config:
"plugins": [
...
"@pandacss"
],
And then as soon as i add rules and restart my ESLint server, i get:
Error: Stopping the server timed out
at /Users/username/.vscode/extensions/dbaeumer.vscode-eslint-3.0.10/client/out/extension.js:1:98293
at b.restart (/Users/username/.vscode/extensions/dbaeumer.vscode-eslint-3.0.10/client/out/extension.js:1:271060)
And ESLint no longer works.
These are the rules i added:
"@pandacss/no-config-function-in-source": "error",
"@pandacss/no-debug": "error",
"@pandacss/no-dynamic-styling": "error",
"@pandacss/no-hardcoded-color": "error",
"@pandacss/no-invalid-token-paths": "error",
"@pandacss/no-invalid-nesting": "error",
"@pandacss/no-property-renaming": "error",
"@pandacss/no-unsafe-token-fn-usage": "error",
Any idea what's going on here? Thanks.
This appears to be a major issue.
@anubra266 do you have a clue on what's the bottleneck?
This appears to be a major issue.
@anubra266 do you have a clue on what's the bottleneck?
@gajus I've not encountered this, but I'll see if I can reproduce later in the evening. Any more helpful errors from your editor logs would be helpful BTW
Will spend some time debugging this today, but when I attempt to use this plugin in our project, ESLint goes entirely to a halt.
Rule | Time (ms) | Relative
:----------------------------------|----------:|--------:
@pandacss/file-not-included | 9434.809 | 14.8%
@pandacss/no-unsafe-token-fn-usage | 5100.427 | 8.0%
@pandacss/no-hardcoded-color | 4944.562 | 7.7%
@pandacss/no-invalid-token-paths | 4529.854 | 7.1%
@pandacss/no-dynamic-styling | 4224.377 | 6.6%
@pandacss/no-property-renaming | 3183.236 | 5.0%
prettier/prettier | 3147.218 | 4.9%
Just tried again. If you run eslint with TIMING=1, every single panda rule shows up with massive latency.
I didn't validate this, but I am 80% sure that the reason for this is because the current implementation does not cache the results of:
const isFileIncluded = isValidFile(context)
and
isPandaImport(node, context)
@anubra266 I will happily submit a PR if that's the blocker here.
@gajus Feel free to open a PR