Bug: File ignored because outside of base pathΒ #19268
Description
Environment
Node version: 20.16.0
npm version:
Local ESLint version: 9.15.0
Global ESLint version:
Operating System:
What parser are you using?
Default (Espree)
What did you do?
Configuration
<!-- Paste your configuration here -->
<!-- Paste your code here -->
What did you expect to happen?
Specify a Wider Base Path: Configure ESLint to use a wider base path that includes the directories where the files you want to lint are located.
Use Glob Patterns: Modify the glob patterns used in lintFiles to ensure they correctly target the desired files, regardless of their location.
Update ESLint Configuration: Check the ESLint documentation for ESLint 9 to see if there are new configuration options that need to be set to allow linting of files outside the default base path.
What actually happened?
code in projectA, lintFiles used absolute paths based on projectB.
const linter = new ESLint()
await linter.lintFiles(lintFiles)
/projectB/components/XXX1.vue
0:0 warning File ignored because outside of base path
/projectB/components/XXX2.vue
0:0 warning File ignored because outside of base path
/projectB/components/XXX3.vue
0:0 warning File ignored because outside of base path
β 3 problems (0 errors, 3 warnings)
Link to Minimal Reproducible Example
none
Participation
- I am willing to submit a pull request for this issue.
Additional comments
When using previous versions of ESLint in nodejs, we were able to lint files located outside the nodejs runtime directory using lintFiles. However, after upgrading to ESLint 9, it seems to no longer work. The output now shows a warning: "File ignored because outside of base path".
Metadata
Assignees
Type
Projects
Status
Complete
Activity