1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-13 07:35:35 -04:00

lint all of the things

stylelint, markdownlint, linkinator
This commit is contained in:
2020-01-08 10:17:55 -05:00
parent e8569ee535
commit 892cd20c40
15 changed files with 130 additions and 49 deletions

9
.browserslistrc Normal file
View File

@@ -0,0 +1,9 @@
>= 1%,
last 4 major versions,
not dead,
chrome >= 54,
firefox >= 49,
ie 11,
android >= 5,
ios_saf >= 9.3,
not ie_mob <= 11

12
.dependabot/config.yml Normal file
View File

@@ -0,0 +1,12 @@
version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "live"
default_labels:
- "dependencies"
- package_manager: "docker"
directory: "/"
update_schedule: "weekly"
default_labels:
- "dependencies"

18
.markdownlint.json Normal file
View File

@@ -0,0 +1,18 @@
{
"default": true,
"code-block-style": { "style": "fenced" },
"code-fence-style": { "style": "backtick" },
"fenced-code-language": true,
"heading-increment": false,
"heading-style": { "style": "atx" },
"hr-style": { "style": "---" },
"line-length": false,
"no-blanks-blockquote": true,
"no-empty-links": false,
"no-hard-tabs": false,
"no-inline-html": { "allowed_elements": [ "span" ] },
"no-multiple-blanks": false,
"no-trailing-punctuation": false,
"single-h1": false,
"whitespace": false
}

23
.stylelintrc.json Normal file
View File

@@ -0,0 +1,23 @@
{
"extends": "stylelint-config-sass-guidelines",
"plugins": [
"stylelint-declaration-block-no-ignored-properties"
],
"rules": {
"color-hex-length": "long",
"function-parentheses-space-inside": null,
"indentation": [ 2, { "severity": "warning" } ],
"max-nesting-depth": 5,
"number-no-trailing-zeros": null,
"order/properties-alphabetical-order": null,
"plugin/declaration-block-no-ignored-properties": true,
"rule-empty-line-before": null,
"scss/dollar-variable-colon-space-after": null,
"selector-list-comma-newline-after": null,
"selector-max-compound-selectors": null,
"selector-max-id": null,
"selector-no-qualifying-type": null,
"shorthand-property-no-redundant-values": null,
"string-quotes": [ "double", { "severity": "warning" } ]
}
}

View File

@@ -14,9 +14,9 @@ I keep an ongoing list of [blog post ideas](https://github.com/jakejarvis/jarv.i
## Running a local testing server
#### Using Yarn:
#### Using Yarn/NPM:
Run `yarn install` then `yarn start` ([Yarn must be installed](https://yarnpkg.com/en/docs/install) first), then open [http://localhost:1313/](http://localhost:1313/). Pages will live-refresh when source files are changed.
Run `yarn install` (or `npm install`) and `yarn start` (or `npm start`) ([Yarn must be installed](https://yarnpkg.com/en/docs/install) first), then open [http://localhost:1313/](http://localhost:1313/). Pages will live-refresh when source files are changed.
#### Using Docker:

View File

@@ -20,9 +20,9 @@
font-style: $style;
font-weight: $weight;
font-display: $display;
src: local('#{$src-local}'), local('#{$src-local-alt}'),
url('#{$src}.woff2') format('woff2'),
url('#{$src}.woff') format('woff');
src: local("#{$src-local}"), local("#{$src-local-alt}"),
url("#{$src}.woff2") format("woff2"),
url("#{$src}.woff") format("woff");
// url('#{$src}.ttf') format('truetype'),
// url('#{$src}.eot') format('embedded-opentype');
}

View File

@@ -1,6 +1,6 @@
@charset "UTF-8";
/*! Roboto Latin | Apache License 2.0 | fonts.google.com/specimen/Roboto */
@include font-face('Roboto', 'Roboto', 'Roboto-Regular', './fonts/roboto-latin-regular', normal, 400);
@include font-face('Roboto', 'Roboto Medium', 'Roboto-Medium', './fonts/roboto-latin-medium', normal, 500);
@include font-face('Roboto', 'Roboto Bold', 'Roboto-Bold', './fonts/roboto-latin-bold', normal, 700);
@include font-face("Roboto", "Roboto", "Roboto-Regular", "./fonts/roboto-latin-regular", normal, 400);
@include font-face("Roboto", "Roboto Medium", "Roboto-Medium", "./fonts/roboto-latin-medium", normal, 500);
@include font-face("Roboto", "Roboto Bold", "Roboto-Bold", "./fonts/roboto-latin-bold", normal, 700);

View File

@@ -66,7 +66,7 @@ main#home {
// easter egg emoji cursor
&#birthday {
&:hover {
cursor: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzNiIgdmlld3BvcnQ9IjAgMCAxMDAgMTAwIiBzdHlsZT0iZm9udC1zaXplOjE4cHgiPjx0ZXh0IHk9IjUwJSI+8J+nmjwvdGV4dD48L3N2Zz4=) 5 5, auto;
cursor: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzNiIgdmlld3BvcnQ9IjAgMCAxMDAgMTAwIiBzdHlsZT0iZm9udC1zaXplOjE4cHgiPjx0ZXh0IHk9IjUwJSI+8J+nmjwvdGV4dD48L3N2Zz4=") 5 5, auto;
}
}
}

View File

@@ -184,7 +184,8 @@ main#single {
li {
display: inline;
margin: 0 0.8em;
margin-left: 0.8em;
margin-right: 0.8em;
text-transform: uppercase;
letter-spacing: 0.15em;
}
@@ -201,7 +202,7 @@ main#single {
padding: 0.8em 1.5em;
article {
div#meta{
div#meta {
h1 {
font-size: 1.8em;
}

View File

@@ -118,7 +118,7 @@ Undo the most recent commit in current Git repo:
alias gundo="git push -f origin HEAD^:master"
```
Un-quarantine an "unidentified developer's" application [blocked by Gatekeeper](https://support.apple.com/en-us/HT202491) on macOS's walled <del>prison</del> garden:
Un-quarantine an "unidentified developer's" application [blocked by Gatekeeper](https://support.apple.com/en-us/HT202491) on macOS's walled ~~prison~~ garden:
```bash
alias unq="sudo xattr -rd com.apple.quarantine"

View File

@@ -33,7 +33,7 @@ Here are the actions I've made so far, sorted by popularity as of this posting:
- **[🔄 Backblaze B2 Sync](https://github.com/jakejarvis/backblaze-b2-action)** — Sync a directory with a remote [Backblaze B2](https://www.backblaze.com/b2/cloud-storage.html) storage bucket.
- **[💤 Wait](https://github.com/jakejarvis/wait-action)** — A very, very simple action to sleep for a given amount of time (10s, 2m, etc.)
----
---
As an example of an *extremely* simple (and almost completely unnecessary) action, the [Wait action](https://github.com/jakejarvis/wait-action) takes one input — a unit of time — and has the pipeline sleep for that amount of time. The [`Dockerfile`](https://github.com/jakejarvis/wait-action/blob/master/Dockerfile) is as simple as this:

View File

@@ -202,4 +202,4 @@ Again, [Restic's documentation](https://restic.readthedocs.io/en/latest/index.ht
Literally every company's Doomsday protocols can *always* be improved, and external backups are just one part of redundancy. But pat yourself on the back — this might have been a convoluted process, but hopefully you'll be able to sleep better at night knowing your startup or personal server now has a **far** better chance of surviving whatever the cloud rains down upon you!
If you have any questions, feel free to leave a comment or <a href="&#x6D;&#x61;&#x69;&#x6C;&#x74;&#x6F;&#x3A;&#x6A;&#x61;&#x6B;&#x65;&#x40;&#x6A;&#x61;&#x72;&#x76;&#x2E;&#x69;&#x73;">get in touch with me</a>. Be safe out there!
If you have any questions, feel free to leave a comment or [get in touch with me](mailto:jake@jarv.is). Be safe out there!

View File

@@ -3,7 +3,7 @@
publish = "public"
[build.environment]
NODE_VERSION = "12.14.0"
NODE_VERSION = "12.14.1"
YARN_VERSION = "1.21.1"
YARN_FLAGS = "--no-ignore-optional --frozen-lockfile"

View File

@@ -21,23 +21,23 @@
"hugo:dev": "hugo --environment development --baseURL \"${DEPLOY_PRIME_URL:-/}\" --buildDrafts --buildFuture --gc --cleanDestinationDir --verbose",
"start": "hugo server --buildDrafts --buildFuture --port 1313 --bind 0.0.0.0 --verbose",
"optimize": "run-s optimize:**",
"optimize:html": "html-minifier --html5 --collapse-whitespace --preserve-line-breaks --minify-css --file-ext html --input-dir public --output-dir public **/*.html",
"optimize:html": "html-minifier --html5 --collapse-whitespace --collapse-boolean-attributes --preserve-line-breaks --minify-css --file-ext html --input-dir public --output-dir public **/*.html",
"optimize:css": "postcss public/style.css --use autoprefixer --no-map --replace --verbose && sleep 10 && cleancss -O0 --format 'keep-breaks' -o public/style.css public/style.css",
"optimize:img": "find public/ -type d | xargs -n1 -P8 -I{} imagemin {}/* --plugin=jpegoptim --plugin.jpegoptim.progressive --plugin.jpegoptim.stripAll --plugin=pngquant --plugin.pngquant.speed=5 --plugin.pngquant.strip --plugin=optipng --plugin.optipng.optimizationLevel=2 --plugin=svgo --plugin=gifsicle --out-dir={}",
"lint": "run-p lint:**",
"lint:markdown": "markdownlint content/notes/**/*.md",
"lint:sass": "stylelint assets/sass/**/* --syntax scss",
"lint:links": "linkinator http://localhost:1313/ --recurse --silent --skip https://www.shodan.io/ --skip https://archive.today/ --skip https://archive.is/",
"lint:links": "linkinator http://localhost:1313/ --recurse --silent --skip https://www.shodan.io/ --skip https://images.shodan.io/ --skip https://archive.today/ --skip https://archive.is/ --skip https://www.linkedin.com/ --skip http://localhost:1313/y2k/ --skip 'asdfasdf404/?$'",
"debug:hugo": "hugo version; hugo env",
"debug:size": "get-folder-size --folder=public"
},
"dependencies": {},
"devDependencies": {
"autoprefixer": "^9.7.3",
"clean-css-cli": "~4.3.0",
"clean-css-cli": "^4.3.0",
"cross-env": "^6.0.3",
"get-folder-size": "^2.0.1",
"html-minifier": "~4.0.0",
"html-minifier": "^4.0.0",
"hugo-bin": "0.50.1",
"imagemin-cli": "^5.1.0",
"imagemin-gifsicle": "^6.0.1",
@@ -53,12 +53,13 @@
"postcss-cli": "^7.0.0",
"rimraf": "^3.0.0",
"stylelint": "~12.0.1",
"stylelint-config-recommended-scss": "~4.1.0",
"stylelint-config-sass-guidelines": "~6.2.0",
"stylelint-declaration-block-no-ignored-properties": "~2.2.0",
"stylelint-scss": "~3.13.0"
},
"engines": {
"node": ">=12.13.0",
"npm": "*** Use Yarn instead, please! https://yarnpkg.com/en/docs/cli/install ***",
"npm": "^6.13.0",
"yarn": "^1.19.2"
},
"hugo-bin": {
@@ -66,22 +67,10 @@
},
"postcss": {
"plugins": {
"autoprefixer": {}
"autoprefixer": {},
"stylelint": {
"configFile": ".stylelintrc.json"
}
}
},
"browserslist": [
">= 1%",
"last 4 major versions",
"not dead",
"chrome >= 54",
"firefox >= 49",
"ie 11",
"android >= 5",
"ios_saf >= 9.3",
"not ie_mob <= 11"
],
"stylelint": {
"extends": "stylelint-config-recommended-scss",
"rules": {}
}
}

View File

@@ -1455,7 +1455,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
clean-css-cli@~4.3.0:
clean-css-cli@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/clean-css-cli/-/clean-css-cli-4.3.0.tgz#8502aa86d1879e5b111af51b3c2abb799e0684ce"
integrity sha512-8GHZfr+mG3zB/Lgqrr27qHBFsPSn0fyEI3f2rIZpxPxUbn2J6A8xyyeBRVTW8duDuXigN0s80vsXiXJOEFIO5Q==
@@ -3692,7 +3692,7 @@ html-comment-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==
html-minifier@~4.0.0:
html-minifier@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-4.0.0.tgz#cca9aad8bce1175e02e17a8c33e46d8988889f56"
integrity sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==
@@ -6682,6 +6682,14 @@ postcss-selector-parser@^6.0.2:
indexes-of "^1.0.1"
uniq "^1.0.1"
postcss-sorting@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/postcss-sorting/-/postcss-sorting-5.0.1.tgz#10d5d0059eea8334dacc820c0121864035bc3f11"
integrity sha512-Y9fUFkIhfrm6i0Ta3n+89j56EFqaNRdUKqXyRp6kvTcSXnmgEjaVowCXH+JBe9+YKWqd4nc28r2sgwnzJalccA==
dependencies:
lodash "^4.17.14"
postcss "^7.0.17"
postcss-syntax@^0.36.2:
version "0.36.2"
resolved "https://registry.yarnpkg.com/postcss-syntax/-/postcss-syntax-0.36.2.tgz#f08578c7d95834574e5593a82dfbfa8afae3b51c"
@@ -6710,6 +6718,15 @@ postcss@^7.0.0, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.2
source-map "^0.6.1"
supports-color "^6.1.0"
postcss@^7.0.17:
version "7.0.26"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587"
integrity sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
supports-color "^6.1.0"
precinct@^6.1.1, precinct@^6.1.2:
version "6.2.0"
resolved "https://registry.yarnpkg.com/precinct/-/precinct-6.2.0.tgz#1755c369316d58ffeed2332a31442d5498f3cc33"
@@ -7903,19 +7920,31 @@ style-search@^0.1.0:
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=
stylelint-config-recommended-scss@~4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-4.1.0.tgz#ff8f72f187833915640f8ab05fc57692c76a4bf5"
integrity sha512-4012ca0weVi92epm3RRBRZcRJIyl5vJjJ/tJAKng+Qat5+cnmuCwyOI2vXkKdjNfGd0gvzyKCKEkvTMDcbtd7Q==
stylelint-config-sass-guidelines@~6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-6.2.0.tgz#f71f2b4341b7dc64c6404bd12ef9c2b91512046c"
integrity sha512-weTmQt+D/qp9t3gPMgvdtu02W07m5pEKXFXnz7Jb0I85W02IxPSBVpaAu2mibvU0wk5e3McasEnHut5UuwXE/Q==
dependencies:
stylelint-config-recommended "^3.0.0"
stylelint-order "^3.0.0"
stylelint-scss "^3.4.0"
stylelint-config-recommended@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz#e0e547434016c5539fe2650afd58049a2fd1d657"
integrity sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==
stylelint-declaration-block-no-ignored-properties@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/stylelint-declaration-block-no-ignored-properties/-/stylelint-declaration-block-no-ignored-properties-2.2.0.tgz#fdde13fdd53b2f7e8930e5986e768f41649a576e"
integrity sha512-SUq40z02Cu0SHF7tY4TLQG88qSPE55R2AZlczHOt/j6IEN8vk2o1mEr+HIWVqOS31sK2JtdvCQzvGSM7R5nOWw==
dependencies:
postcss "^7.0.17"
stylelint-scss@~3.13.0:
stylelint-order@^3.0.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/stylelint-order/-/stylelint-order-3.1.1.tgz#ba9ea6844d1482f97f31204e7c9605c7b792c294"
integrity sha512-4gP/r8j/6JGZ/LL41b2sYtQqfwZl4VSqTp7WeIwI67v/OXNQ08dnn64BGXNwAUSgb2+YIvIOxQaMzqMyQMzoyQ==
dependencies:
lodash "^4.17.15"
postcss "^7.0.17"
postcss-sorting "^5.0.1"
stylelint-scss@^3.4.0, stylelint-scss@~3.13.0:
version "3.13.0"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-3.13.0.tgz#875c76e61d95333c4f0ae737a310be6f1d27d780"
integrity sha512-SaLnvQyndaPcsgVJsMh6zJ1uKVzkRZJx+Wg/stzoB1mTBdEmGketbHrGbMQNymzH/0mJ06zDSpeCDvNxqIJE5A==