mdn / doc-linter-rules Goto Github PK
View Code? Open in Web Editor NEWLinting rules used to lint MDN Web Documents
License: Mozilla Public License 2.0
Linting rules used to lint MDN Web Documents
License: Mozilla Public License 2.0
Original issue: Elchi3/mdn-doc-tests#173
A test should be added checking whether a
<pre>
tag haseval
as class name. Instead ofeval
people should usebrush:...
. For blocks not needing syntax highlighting they should usebrush: plain
.This test could be added to the existing 'pre-without-class' test.
Sebastian
As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:
If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].
(Message COC001)
Original issue Elchi3/mdn-doc-tests#22
There are some rules, which only target the English version of an article. They don't work on localized pages. These rules are:
Old 'en/' URLs Summary heading 'Example:' headings API syntax headlines
Those should be adjusted to also work correctly on localizations or be hidden on them.
Sebastian
Current behavior:
There is no test regarding potential link duplicates.
Expected behavior:
There should be a test to provide informations regarding duplicates links for SEO purposes.
Plan to action:
This is only a suggested plan to action
Actions pending:
Following the conversation in #2 with @Elchi3 regarding the folder name "lib" being potentially ambiguous it would be interesting to change it from "lib" to "rules".
Steps:
Original issue: Elchi3/mdn-doc-tests#129
The MDN writing style guide says that two spaces should be used in code examples instead of tabs.
So, there should be a test added, which checks that.
Sebastian
Original issue Elchi3/mdn-doc-tests#145.
Check anchor links on the current page and throw an error if those sections do not exist.
Link to #nope should throw:
<h2 id="yay">yay</h2>
<a href="#yay">Link to yay</a>
<a href="#nope">Link to nope</a>
(Probably a regression from changing the selector)
If you have elements inside <pre> (such as <var>, <em>, etc), they are matched as well and the test tells you that there is a class missing.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset$edit where this should be just fine:
<pre class="syntaxbox">
<var>dateObj</var>.getTimezoneOffset()
</pre>
See original issue: Elchi3/mdn-doc-tests#137
Need to have limits on when large image sizes trigger a warning and extra-large images trigger an error.
Original issue: Elchi3/mdn-doc-tests#208.
Guides like Grids within the Learning Area have a summary at the bottom of the article, which provide a conclusion of the previous text.
Those occurrences of 'Summary' headlines must not be marked as errors.
Sebastian
Add a short readme to explain the repository, and link to related repositories.
Original issue Elchi3/mdn-doc-tests#143.
Test if sources are HTTPS (e.g. images) to prevent mixed content.
I believe images and things we embed are already https pretty much everywhere, but it looks like we are not actually testing it.
Original issue: Elchi3/mdn-doc-tests#128.
If you check against an en-US article, let the doc-linter emit...
Remove all of these from https://github.com/mdn/doc-linter-rules/blob/master/lib/invalid-macros.js
The only valid macro should be {{compat}} as it uses the BCD project.
"compatandroid",
"compatchrome",
"compatchromemobile",
"compatedge",
"compatgeckodesktop",
"compatgeckofxos",
"compatgeckomobile",
"compatibilitytable",
"compatie",
"compatnightly",
"compatno",
"compatopera",
"compatoperamobile",
"compatsafari",
"compatunknown",
"compatversionunknown",
"compatwebkit",
Currently the process to add a new rule is a bit tedious and I often happen to forgot one step, so I would like to ensure that all the steps are properly done by documenting them and checking them using Travis CI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.