github-pages-template
github-pages-template copied to clipboard
Add dirty words checker
Add a script to test the build pages.
It must work on the entire file as a string and match regexpes against that.
Configure the regexps using a .dirty-words.json file.
Default config:
[
{
"regexp": "\\?utm_source=chatgpt.com",
"severity": "error",
"ignoreCase": true,
"note": "Copied a link from Chat GPT without reviewing it"
},
{
"regexp": "<\\s*title\\s*>[^<]*\\&amp;[^<]*",
"severity": "error",
"ignoreCase": true,
"note": "Double-escaped HTML quoting"
},
{
"regexp": "href\\s*=\\s*\"[^:]+\\.htm[l]?\"",
"severity": "error",
"ignoreCase": true,
"note": "Linking to an HTML without using extensionless"
}
]