Skip to content

docs: add metadata for parser/processor#17438

Merged
harish-sethuraman merged 4 commits into
eslint:mainfrom
JLHwung:add-metadata-to-parser-docs
Aug 1, 2023
Merged

docs: add metadata for parser/processor#17438
harish-sethuraman merged 4 commits into
eslint:mainfrom
JLHwung:add-metadata-to-parser-docs

Conversation

@JLHwung

@JLHwung JLHwung commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

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 metadata descriptions to custom-parsers.md and custom-processors.md. I don't know if metadata object is also implemented for formatters, if so I am happy to add a section covering that, too.

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

The current meta sections are mostly copied from plugins.md. Frankly I don't know if meta object helps ESLint cache the parsers/processors. If not please correct me.

@JLHwung JLHwung requested a review from a team as a code owner July 31, 2023 14:51
@eslint-github-bot eslint-github-bot Bot added the documentation Relates to ESLint's documentation label Jul 31, 2023
@netlify

netlify Bot commented Jul 31, 2023

Copy link
Copy Markdown

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 1d3abe8
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64c7ec0747d83f0008ebbb8c
😎 Deploy Preview https://deploy-preview-17438--docs-eslint.netlify.app/extend/custom-processors
📱 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.

Comment thread docs/src/extend/custom-parsers.md Outdated

### Methods in Custom Parsers

A custom parser is a JavaScript object with either a `parse` or `parseForESLint` method. The `parse` method only returns the AST, whereas `parseForESLint` also returns additional values that let the parser customize the behavior of ESLint even more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you rearrange this so the meta data section comes after these other sections? We'd like people to focus on the methods first and then think about meta data.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Np. I copied the ordering from plugins.md. Also updated the ordering there.

Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 31, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

@harish-sethuraman harish-sethuraman added the accepted There is consensus among the team that this change meets the criteria for inclusion label Aug 1, 2023

@harish-sethuraman harish-sethuraman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks

@harish-sethuraman harish-sethuraman merged commit d743ed3 into eslint:main Aug 1, 2023
@eslint-github-bot eslint-github-bot Bot locked and limited conversation to collaborators Jan 29, 2024
@eslint-github-bot eslint-github-bot Bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants