Getting ESLint errors about missing files
See original GitHub issueI’m trying to add this plugin to my project, I followed the standard configuration in the documentation:
But am getting the following error in VSCode’s ESLint output:
[Info - 9:40:12 AM] ESLint server is starting
[Info - 9:40:12 AM] ESLint server running in node v12.14.1
[Info - 9:40:12 AM] ESLint server is running.
[Info - 9:42:43 AM] ESLint library loaded from: /Users/peterp/x/redwoodjs/example-invoice/node_modules/eslint/lib/api.js
[Info - 9:42:56 AM] ENOTDIR: not a directory, stat '/Users/peterp/x/redwoodjs/example-invoice/web/src/index.js/0_/Users/peterp/x/redwoodjs/example-invoice/web/src/index.js' Occurred while linting /Users/peterp/x/redwoodjs/example-invoice/web/src/index.js/0_/Users/peterp/x/redwoodjs/example-invoice/web/src/index.js:1
[Info - 9:42:56 AM] ENOTDIR: not a directory, stat '/Users/peterp/x/redwoodjs/example-invoice/web/src/pages/InvoicePage/subcomponents/InvoiceCell/InvoiceCell.js/0_document.graphql' Occurred while linting /Users/peterp/x/redwoodjs/example-invoice/web/src/pages/InvoicePage/subcomponents/InvoiceCell/InvoiceCell.js/0_document.graphql:0
I’ve pushed up a branch here: https://github.com/redwoodjs/example-invoice/pull/39/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:23 (7 by maintainers)
Top Results From Across the Web
Getting ESLint errors about missing files · Issue #88 - GitHub
I'm trying to add this plugin to my project, I followed the standard configuration in the documentation: But am getting the following error...
Read more >1 Answer - 1 - Stack Overflow
Missing file extension "tsx" for "./reducer" error after using eslint-config-airbnb · reactjs · eslint · prettier · eslint-config-airbnb.
Read more >Ignoring Code - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >The Three Easiest Ways to Fix the "Missing File Extension 'tsx ...
The Three Easiest Ways to Fix the “Missing File Extension 'tsx'” Error ; 3.1 Install eslint-import-resolver-typescript ; 3.2 Add TypeScript to the ...
Read more >VS Code tips — Quickly fix all linter errors in a file ... - YouTube
Today's VS Code extension tip: ESLint fix all actions Quickly fix all linter problems for a given ESLint rule or fix all auto...
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
@therealgilles since the filename used for the generated chunks in this plugin always uses “document.graphql” (see https://github.com/dotansimha/graphql-eslint/blob/master/packages/plugin/src/processors/code-files.ts#L42), you can make a rule specific for these generated chunks without affecting your other “.graphql” files (assuming none of them are called “document.graphql”). I’ve done this in my eslint config which uses this parser to turn off the eol rule that was breaking for these generated chunks.
Here’s a snippet of what I have which seems to work:
I suspect if you adjusted your above config as follows it should work ok.
Fixed in https://github.com/dotansimha/graphql-eslint/pull/225 Thank you @peterp @ilyavolodin @EmrysMyrddin @lavigneer @jgoux @huw 😃
Available
@graphql-eslint/eslint-plugin@0.5.0
.