-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
docs: Debug config docs #18698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Debug config docs #18698
Conversation
Hi @nzakas!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Co-authored-by: 唯然 <[email protected]>
**What To Do:** Run ESLint with the `--inspect-config` command line flag and pass the file to check, like this: | ||
|
||
```shell | ||
npx eslint file.js --inspect-config | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't passing filenames to check to Config Inspector.
Lines 346 to 360 in 4514424
async calculateInspectConfigFlags(configFile) { | |
// find the config file | |
const { | |
configFilePath, | |
basePath, | |
error | |
} = await locateConfigFileToUse({ cwd: process.cwd(), configFile }); | |
if (error) { | |
throw error; | |
} | |
return ["--config", configFilePath, "--basePath", basePath]; | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Added a new page called "Debug Your Configuration" that explains the various ways you can figure out why your configuration isn't working the way you want.
Deploy Preview
Is there anything you'd like reviewers to focus on?