eslint-rules-obvious

Obviously show correct and incorrect rules demo.

目前为 2023-02-17 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name eslint-rules-obvious
  3. // @version 0.1
  4. // @author Finn
  5. // @description Obviously show correct and incorrect rules demo.
  6. // @namespace https://github.com/Germxu
  7. // @match https://eslint.org/*/rules/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=eslint.org
  9. // @run-at document-start
  10. // @grant GM_addStyle
  11. // @license MIT
  12. // @compatible Chrome Latest
  13. // @compatible Firefox Latest
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18. const eslint_style = `
  19. div.incorrect pre{
  20. background: darkred!important;
  21. }
  22. div.correct pre{
  23. background: darkgreen!important;
  24. }
  25. `
  26. GM_addStyle(eslint_style)
  27. })();