Giter VIP home page Giter VIP logo

doc-linter-rules's Introduction

doc-linter-rules's People

Contributors

elchi3 avatar matonanthony avatar mozilla-github-standards avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

doc-linter-rules's Issues

Document properly and check with Travis the process to add a rule

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.

  • Document the process to add a new rule
  • Check that all necessary elements are there using Travis CI.

Add count link to avoid duplicates URL

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

  1. Add a test getting the number of links for a same URL in an article.
  2. Define thresholds to return INFO, ERRORS or WARNINGS depending of the amount of link.
  3. Implement the feature.

Actions pending:

  • Confirm the plan to action.
  • Define thresholds.
  • Implement the linting feature.
  • Test the linting features.

New rule: language style

Original issue: Elchi3/mdn-doc-tests#128.

If you check against an en-US article, let the doc-linter emit...

  • a warning if the page contains the words "obvious(ly)", "simply", "easily", "clearly", or "just".
  • a warning if the page contains the word "I" (the pronoun).
  • an error if the page contains wrong capitalization for the words "JavaScript", "ECMAScript", "HTML", "Firefox", "SpiderMonkey" ... (likely to be extended)
  • an error if the page contains the words: "he", "she", "whitelist" or "blacklist".

Make rules l10n aware

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

CODE_OF_CONDUCT.md file missing

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:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

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)

New rule: Add test for <pre> with class 'eval'

Original issue: Elchi3/mdn-doc-tests#173

A test should be added checking whether a <pre> tag has eval as class name. Instead of eval people should use brush:.... For blocks not needing syntax highlighting they should use brush: plain.

This test could be added to the existing 'pre-without-class' test.

Sebastian

Remove compat macros from whitelist

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",

Change "lib" directory name to "rules"

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:

  • Move the code from lib to rules
  • Edit index to import from rules instead of lib
  • Edit each tests to import from rules instead of lib

Add a README

Add a short readme to explain the repository, and link to related repositories.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.