Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 2.95 KB

CONTRIBUTING.md

File metadata and controls

46 lines (32 loc) · 2.95 KB

We're really happy to accept contributions to the mdn-browser-compat-data repository! This file lists some general guidelines to help you contributing effectively.

Types of contribution

There are many ways you can help improve this repository! For example:

  • Adding new compat data: familiarize yourself with the schema and read the schema docs to add new files.
  • Fixing existing compat data: maybe a browser now supports a certain feature. Yay! If you open a PR to fix a browser's data, it would be most helpful if you include a link to a bug report or similar so that we can double-check the good news.
  • Fixing a bug: we have a list of issues, or maybe you found your own.
  • Reviewing a pull request: there is a list of PRs. Let us know if these look good to you.

Validating the data

You can use npm test to validate data against the schema. You might need to install the devDependencies using npm install --dev. The JSON data is validated against the schema using ajv.

Test rendering

You can use npm run render $query $dept $aggregateMode to output the table HTML as it would be rendered on MDN. The parameters are the same as the {{compat}} macro.

Paste the generated HTML into the MDN editor (source mode). You can use a new page, for example: https://developer.mozilla.org/en-US/docs/new and verify if the output looks correct.

Checklist

Not everything is enforced or validated by the schema. A few things to pay attention to:

  • Feature identifiers (the data namespaces, like css.properties.background) should make sense and are spelled correctly.
  • Nesting of feature identifiers should make sense.
  • Notes use correct grammar and spelling. They should be complete sentences ending with a period.
  • Browser versions are valid (planned be validated automatically in the future, see issue 168 which tracks adding tests and docs about browser versions).

Code style

The JSON files should be formatted according to the .editorconfig file.

Licensing

Please note that the compatibility data is made available under the CC0 license, so any contributions must be compatible with that license. If you're not sure about that, just ask.

Getting help

If you need help with this repository or have any questions, contact the MDN team in the #mdn IRC channel on irc.mozilla.org or write us on discourse.