Skip to content

docs: add contribution guide#472

Open
43081j wants to merge 2 commits intomainfrom
contrib-doc
Open

docs: add contribution guide#472
43081j wants to merge 2 commits intomainfrom
contrib-doc

Conversation

@43081j
Copy link
Contributor

@43081j 43081j commented Mar 23, 2026

🔗 Linked issue

📚 Description

@gameroman
Copy link
Contributor

Looks good

@AlexanderKaran
Copy link

This is really good. Very clear.

@AlexanderKaran
Copy link

Copy link
Contributor

@paoloricciuti paoloricciuti left a comment

Choose a reason for hiding this comment

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

Overall looks good...left a few comments but are mostly minor things

CONTRIBUTING.md Outdated
- The mapping generally does not need a `url`
- The replacement should have a `url` to its external documentation (e.g. MDN or Node docs)
- The replacement should have a `webFeatureId` if it is a web standard (these come from the [`web-features` dataset](https://github.com/web-platform-dx/web-features/tree/main/features))
- The replacement should have a `nodeFeatureId` if it is a Node built-in (these come from the Node documentation)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an example here to make it easier to understand where to get the nodeFeatureId?

CONTRIBUTING.md Outdated
When using the `simple` type:

- The replacement should be of the form `snippet::{name}` where `name` is a suitable descriptive name for what the snippet does (e.g. `snippet:is-odd` for a snippet that checks if a number is odd)
- The replacement description should be a short human-readable description of what the snippet does, and how it replaces the old module
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember having some issue with this when moving the old data so maybe we could have an example here?

CONTRIBUTING.md Outdated
Comment on lines +100 to +110
- All manifests conform to the JSON schema
- Replacement keys match their `id` property
- `webFeatureId` values reference valid features and compat keys from the `web-features` dataset
- Mapping keys match their `moduleName` for module-type mappings
- Mappings only reference replacements that exist
- All documented modules (in `docs/modules/`) are listed in the modules README
- All documented modules have a corresponding entry in a manifest
- No module appears in multiple manifests
- Mappings and replacements are sorted alphabetically
- No replacement has `engines` set (these are populated automatically at publish time)
- All e18e URLs in mappings and replacements point to documentation files that exist
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep this list here? It can easily go out of sync with the lint and if the errors from the scripts are readable it would be much easier to run the scripts and get the errors instead of reading this list.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can keep part of the list

@43081j 43081j requested a review from paoloricciuti March 23, 2026 16:56
@43081j
Copy link
Contributor Author

43081j commented Mar 23, 2026

@paoloricciuti i have updated it per your comments

can you have another look?

Copy link
Contributor

@paoloricciuti paoloricciuti left a comment

Choose a reason for hiding this comment

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

I'm being veeeeery pedantic so feel free to fuck me off but I've left a couple more comments with suggestions 🧡

- The mapping generally does not need a `url`
- The replacement should have a `url` to its external documentation (e.g. MDN or Node docs)
- The replacement should have a `webFeatureId` if it is a web standard (these come from the [`web-features` dataset](https://github.com/web-platform-dx/web-features/tree/main/features))
- The replacement should have a `nodeFeatureId` if it is a Node built-in (these are of the form `{moduleName[, exportName]}`. For example, `fs` would be `{"moduleName": "fs"}`, while `fs.readFile` would be `{"moduleName": "fs", "exportName": "readFile"}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not this?

Suggested change
- The replacement should have a `nodeFeatureId` if it is a Node built-in (these are of the form `{moduleName[, exportName]}`. For example, `fs` would be `{"moduleName": "fs"}`, while `fs.readFile` would be `{"moduleName": "fs", "exportName": "readFile"}`)
- The replacement should have a `nodeFeatureId` if it is a Node built-in (these are of the form `{ moduleName: string, exportName?: string }`. For example, `fs` would be `{"moduleName": "fs"}`, while `fs.readFile` would be `{"moduleName": "fs", "exportName": "readFile"}`)


- The replacement should be of the form `snippet::{name}` where `name` is a suitable descriptive name for what the snippet does (e.g. `snippet:is-odd` for a snippet that checks if a number is odd)
- The replacement description should be a short human-readable description of what the snippet does, and how it replaces the old module
- The replacement description should be a short human-readable description of what the snippet does, and how it replaces the old module (e.g. "You can use arr.at(-1) to get the last element of an array")
Copy link
Contributor

Choose a reason for hiding this comment

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

Mmm I know I'm being pedantic but this doesn't look like the right example because it includes the snippets itself (and the descriptions for those should not include the snippet no?)

What about

Suggested change
- The replacement description should be a short human-readable description of what the snippet does, and how it replaces the old module (e.g. "You can use arr.at(-1) to get the last element of an array")
- The replacement description should be a short human-readable description of what the snippet does, and how it replaces the old module (e.g. "You can use a combination of filter and includes to calculate the difference between two arrays.")

Copy link
Contributor

Choose a reason for hiding this comment

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

Both are fine I think

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.

5 participants