Error: No files matching 'src' were found.
See original GitHub issueVersion
3.9.2
Reproduction link
https://github.com/wuyuweixin/vue-cli-eslint-demo
Environment info
Environment Info:
System:
OS: Windows 7
CPU: (4) x64 Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz
Binaries:
Node: 10.16.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - D:\Program Files\nodejs\npm.CMD
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
- git clone https://github.com/wuyuweixin/vue-cli-eslint-demo.git 2.yarn install 3.yarn run lint
What is expected?
Not Error throw.
What is actually happening?
Throw Error: No files matching ‘src’ were found.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How can I suppress the "No files matching the pattern ...
I have the same error. No files matching the pattern ".ts," were found. I just removed spaces between types .js, .ts, .tsx in...
Read more >eslint/eslint - Gitter
No files matching the pattern "." were found. Please check for typing mistakes in the pattern. error Command failed with exit code 2....
Read more >Getting an error 'No files matching the pattern were ... - YouTube
HTML : Getting an error ' No files matching the pattern were found ' when using prettier [ Beautify Your Computer ...
Read more >[error] No files matching the pattern were found: "src/**/*.{js,jsx ...
I keep running into this error: [error] No files matching the pattern were found: "src/**/*.{js,jsx} ". 1. 1 ...
Read more >ESLint crashes on the jQuery repository due to not resolving ...
ESLint: Error: Error while loading rule 'import/no-unused-modules': No files matching 'src/*.js' were found.
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
That’s why we discourage users to change their default directory structure. (more discussions at https://github.com/vuejs/vue-cli/issues/3040 and https://github.com/vuejs/vue-cli/issues/3061) It would be a tremendous burden for us to deal with all the possible customizations. As in this case, it is because the eslint plugin assumes a default list of files to lint, and none of them exists in the project: https://github.com/vuejs/vue-cli/blob/ddfdd1af2492b2f7bbcbb537d0f35c1ef67d53a0/packages/%40vue/cli-plugin-eslint/lint.js#L55-L70
A simple fix is to just add a second argument for the lint command:
Thank you very much.