Skip to content

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jul 17, 2024

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?

@nzakas nzakas requested a review from a team as a code owner July 17, 2024 20:24
@eslint-github-bot
Copy link

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.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
  • There should be a space following the initial tag and colon, for example 'feat: Message'.
  • The first letter of the tag should be in lowercase

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

@nzakas nzakas changed the title Debug config docs docs: Debug config docs Jul 17, 2024
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Jul 17, 2024
Copy link

netlify bot commented Jul 17, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 040f5aa
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/66995391a6bc4000090f89cd
😎 Deploy Preview https://deploy-preview-18698--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aladdin-add aladdin-add added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jul 18, 2024
Comment on lines 71 to 75
**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
```
Copy link
Member

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.

eslint/lib/cli.js

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];
},

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right. 👍

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 53b1ff0 into main Jul 18, 2024
@mdjermanovic mdjermanovic deleted the debug-config-docs branch July 18, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants