Preprocessing error on invalid files
See original GitHub issueIssue workflow progress
Progress of the issue based on the Contributor Workflow
- 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
Please make sure the graphql-eslint version under
package.json
matches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug When typing in new code in a file makes it temporarily invalid Javascript/Typescript, IntelliJ will show an error banner with “ESLint: Preprocessing error”. This only happens with this plugin enabled, and stops happening if I add a try/catch block in the preprocessor in https://github.com/B2o5T/graphql-eslint/blob/fffb1273f5eda8e3ff3ff15da52202c02be19639/packages/plugin/src/processor.ts#L14
To Reproduce
- Configure a project to use Eslint and this plugin.
- Open a file in that project that has syntax errors in IntelliJ.
Expected behavior No error banner should be shown, similar to how other plugins handle invalid files.
Environment:
- OS: Windows 10
@graphql-eslint/eslint-plugin
: 3.10.7eslint
: 8.23.1- Node.js: 16.13.2
- IntelliJ: 2022.2.2
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to fix the error "invalid preprocessing directive"?
I tried to compile a demo code that related to memory access. And i got error message like this: ../nvm.c:444:2: error: invalid preprocessing ......
Read more >Preprocessing invalid file fails to display errors #3971 - GitHub
The command should print an error message to stderror or stdout. Actual behavior. No output is printed at all. The output file is...
Read more >"error: invalid preprocessing directive #DEFINE"
2:2: error: invalid preprocessing directive #DEFINE. Why, and how do i fix it? ... Somehow you must have got a c source file...
Read more >iOS .pch file fetch a error: "Invalid preprocessing directive"
"Invalid preprocessing directive" is just another fancy way of saying "syntax" (or spelling) error. Share. Share a link to this answer.
Read more >Preprocessing Error - Simulation Run in Infoworks ICM
Preprocessing Error When Attempting to Run a Simulation in InfoWorks ICM · Right click on the InfoWorks ICM Agent service and click 'Properties'....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome, thank you for the fix!
And I think it makes sense to see the error in the terminal, since you run that when you want to know about errors. While the banner shows up when you’re in the middle of editing a file.
I guess we can back
try
/catch
statement, so the annoying popup in WebStrom will disappear, anyway ESLint will report about the problem while running eslint in terminalbefore
after
fixed in
@graphql-eslint/eslint-plugin@3.11.1