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: rewrite parser config docs to mainly use flat config #514

Merged
merged 3 commits into from May 9, 2024

Conversation

ota-meshi
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Apr 29, 2024

⚠️ No Changeset found

Latest commit: 4cfa42a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coveralls
Copy link

coveralls commented Apr 29, 2024

Pull Request Test Coverage Report for Build 9010065864

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.733%

Totals Coverage Status
Change from base Build 9010062321: 0.0%
Covered Lines: 2793
Relevant Lines: 2968

💛 - Coveralls

@baseballyama
Copy link
Member

Do we need to care that making confusion for users who cannot yet use flat confog?

@ota-meshi
Copy link
Member Author

ota-meshi commented May 4, 2024

Hmm. I personally want Svelte users to use flat configs. That's because I think Svelte users prefer ESM. (Legacy JS config format only supports commonjs.)
Also, if you create eslint.config.js in ESM, you can import svelte.config.js into eslint.config.js.
I expect that in the future if parsers and rules can use svelte.config.js, they will be able to lint better since they will understand how users use Svelte.

@baseballyama
Copy link
Member

My suggestion is to put both configs in the README for a while.
If one of the ESLint plugins a user uses does not support flat config, they cannot use flat config, so isn't this something we and Svelte users can control?

@ota-meshi
Copy link
Member Author

My suggestion is to put both configs in the README for a while.

I will do that 👍

For example:

```json
{
"parser": "svelte-eslint-parser",
Copy link
Member

Choose a reason for hiding this comment

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

[ask]

Is it ok to lose this line?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we limit the explanation to parserOptions, the same explanation can be given for both configs, so we have removed the description specific to the legacy config.

}
```

#### Parser Object
Copy link
Member

Choose a reason for hiding this comment

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

[ask]

Can we remove this section?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since the explanation of eslint.config.js uses the parser object, there is no need to explain it again, so I removed it. I added that feature for support for eslint.config.js.

Copy link
Member

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

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

Thank you!

@baseballyama baseballyama merged commit 5dc6d3e into main May 9, 2024
13 checks passed
@baseballyama baseballyama deleted the docs-flat branch May 9, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants