Skip to content
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: Switch to flat config by default #17840

Merged
merged 39 commits into from Dec 27, 2023
Merged

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Dec 11, 2023

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)

Switched the default configuration documentation to refer to flat config instead of eslintrc. Primarily, this involved taking all of the content on configuration-files-new.md and integrating it into the multi-page configuration documentation we already had. This required moving things around and removing duplicate content.

Refs #13481

Is there anything you'd like reviewers to focus on?

Please double-check that I haven't left duplicate content in the files and that the structure makes sense. Everything isn't exactly 1-to-1 with eslintrc, so I did my best.

Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 5b855ca
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/658b2a619d687400085a2686
😎 Deploy Preview https://deploy-preview-17840--docs-eslint.netlify.app/use/configure/configuration-files
📱 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.

Copy link
Sponsor Member

@bmish bmish Dec 11, 2023

Choose a reason for hiding this comment

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

What do you think of keeping the file with a link to the replacement to avoid breaking links? Likely a lot of guides/tickets/PRs link to this page for context. Similar to this discussion: #17792 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

We can just redirect outdated links, right?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Either a link or redirect to the replacement is fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we'll do a redirect, but that needs to be done in the eslint.org repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Since we are going to redirect, perhaps we should remove the configuration-files-new.md file now? It appears in the navigation:

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, yes, good catch.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the configuration-files-new.md file is still here:

image

Copy link
Member

Choose a reason for hiding this comment

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

It would be good to also update order fields in configuration documents. Since the rest of the changes look good, I'm going to merge this now to avoid future merge conflicts, and I'll submit another PR to update this.

@nzakas nzakas marked this pull request as ready for review December 20, 2023 23:11
@nzakas nzakas requested a review from a team as a code owner December 20, 2023 23:11
@mdjermanovic mdjermanovic changed the title docs!: Switch to flat config by default docs: Switch to flat config by default Dec 21, 2023
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Dec 21, 2023
@mdjermanovic mdjermanovic added the breaking This change is backwards-incompatible label Dec 21, 2023
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules-deprecated.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules-deprecated.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/ignore.md Outdated Show resolved Hide resolved
docs/src/use/configure/ignore.md Outdated Show resolved Hide resolved
docs/src/use/configure/ignore.md Outdated Show resolved Hide resolved
docs/src/use/configure/ignore.md Show resolved Hide resolved
docs/src/use/configure/ignore.md Show resolved Hide resolved
docs/src/use/getting-started.md Outdated Show resolved Hide resolved
docs/src/use/getting-started.md Outdated Show resolved Hide resolved
docs/src/use/getting-started.md Outdated Show resolved Hide resolved
docs/src/use/configure/parser.md Outdated Show resolved Hide resolved
docs/src/use/configure/parser.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/rules.md Outdated Show resolved Hide resolved
docs/src/use/configure/index.md Outdated Show resolved Hide resolved
docs/src/use/configure/index.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
nzakas and others added 2 commits December 26, 2023 14:06
Co-authored-by: Percy Ma <kecrily@gmail.com>
nzakas and others added 24 commits December 26, 2023 14:16
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
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 e708496 into main Dec 27, 2023
15 checks passed
@mdjermanovic mdjermanovic deleted the flat-config-docs-default branch December 27, 2023 09:30
bmish added a commit to bmish/eslint that referenced this pull request Dec 27, 2023
* main:
  docs: Migrate to v9.0.0 (eslint#17905)
  docs: Switch to flat config by default (eslint#17840)
  docs: Update Create a Plugin for flat config (eslint#17826)
  feat!: add two more cases to `no-implicit-coercion` (eslint#17832)
  docs: Switch shareable config docs to use flat config (eslint#17827)
  chore: remove creating an unused instance of Linter in tests (eslint#17902)
  feat!: Switch Linter to flat config by default (eslint#17851)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change is backwards-incompatible documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

4 participants