add .prettierrc and editorconfig for auto-formatting

This commit is contained in:
Nils Norman Haukås 2023-03-08 08:01:34 +01:00
parent 7d48863757
commit 839cedbab1
9 changed files with 111 additions and 74 deletions

9
.editorconfig Normal file
View file

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80

View file

@ -1,6 +1,4 @@
module.exports = function(eleventyConfig) {
// Copy static to output folder as-is.
eleventyConfig.addPassthroughCopy("src/static");
};
module.exports = function (eleventyConfig) {
// Copy static to output folder as-is.
eleventyConfig.addPassthroughCopy('src/static')
}

7
.prettierrc Normal file
View file

@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"proseWrap": "always",
"editorconfig": true
}

22
package-lock.json generated
View file

@ -9,6 +9,7 @@
"version": "1.0.0",
"devDependencies": {
"@11ty/eleventy": "^2.0.0",
"prettier": "^2.8.4",
"rimraf": "^4.3.0"
}
},
@ -1868,6 +1869,21 @@
"node": ">= 4"
}
},
"node_modules/prettier": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
@ -3832,6 +3848,12 @@
"promise-each": "^2.2.0"
}
},
"prettier": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",

View file

@ -12,6 +12,7 @@
},
"devDependencies": {
"@11ty/eleventy": "^2.0.0",
"prettier": "^2.8.4",
"rimraf": "^4.3.0"
}
}

View file

@ -4,13 +4,13 @@ title: Poetry for programmers
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="/static/vanilla.css">
</head>
<body>
{{ content | safe }}
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="/static/vanilla.css">
</head>
<body>
{{ content | safe }}
</body>
</html>

View file

@ -4,4 +4,4 @@ title: Poetry for programmers
# Poetry for programmers
Dear web-denizen, welcome to this workshop on poetry for programmers.
Dear web-denizen, welcome to this workshop on poetry for programmers.

View file

@ -1,66 +1,66 @@
---
title: List of randomness
randomness:
- "something about vegetables"
- "a dog and a cat fighting"
- "like you're an old man"
- "there's treasure behind the snack machine"
- "a magic wand fell"
- "the sofa wouldn't let me go"
- "coffe was much too strong today"
- "the sun hasn't shone in a week"
- "the ocean"
- "the mountains spoke and you heard it"
- "there are tiny dinosaurs in the garden"
- "when I was a viking"
- "the sound that rain makes on leaves"
- "a goblet filled with soda"
- "the joy of receipts"
- "when you wave early but your friend is still very far away"
- "my boss and their boss have the same discussion each week"
- "buying a book on spellcasting"
- "friends to have silent moments with"
- "a bonfire"
- "a clearing filled with animals"
- "walking out of a meeting"
- "walking into a meeting"
- "a festival in my heart"
- "an inkpen that supports timetravel"
- "like you're attending a workshop for programmers"
- "you're below deck writing while your crew struggles with the boat"
- "I want to cast magic missile"
- "having a change of heart about magazines"
- "but which bear is best?"
- "fast-growing grass?"
- "but did I close the door on the reactor?"
- "meetings that end early"
- "time runs backwards here"
- "if fax machines could speak"
- "paper jam in the printer"
- "designers and programmers switch tasks for a week"
- "emerging from the forest, spotting a moonlit lake."
- "who planted all these trees in the mountains?"
- "putting post-its around the office"
- "a meeting that never ends"
- "out at sea, and you haven't seen land in a month"
- "the boss keeps suggesting we rewrite our codebase using new frameworks"
- "a soda machine that sighs"
- "my colleague must have cursed me"
- "staring into books "
- "it's a great Monday "
- "who moved my cheese in the lunchroom?"
- "on the topic of company trips "
- "riding my bicycle to work "
- "standing in line at the bakery "
- "there was a showdown at the bus stop "
- "when I tried to help my mechanic fix my car"
- "something about vegetables"
- "a dog and a cat fighting"
- "like you're an old man"
- "there's treasure behind the snack machine"
- "a magic wand fell"
- "the sofa wouldn't let me go"
- "coffe was much too strong today"
- "the sun hasn't shone in a week"
- "the ocean"
- "the mountains spoke and you heard it"
- "there are tiny dinosaurs in the garden"
- "when I was a viking"
- "the sound that rain makes on leaves"
- "a goblet filled with soda"
- "the joy of receipts"
- "when you wave early but your friend is still very far away"
- "my boss and their boss have the same discussion each week"
- "buying a book on spellcasting"
- "friends to have silent moments with"
- "a bonfire"
- "a clearing filled with animals"
- "walking out of a meeting"
- "walking into a meeting"
- "a festival in my heart"
- "an inkpen that supports timetravel"
- "like you're attending a workshop for programmers"
- "you're below deck writing while your crew struggles with the boat"
- "I want to cast magic missile"
- "having a change of heart about magazines"
- "but which bear is best?"
- "fast-growing grass?"
- "but did I close the door on the reactor?"
- "meetings that end early"
- "time runs backwards here"
- "if fax machines could speak"
- "paper jam in the printer"
- "designers and programmers switch tasks for a week"
- "emerging from the forest, spotting a moonlit lake."
- "who planted all these trees in the mountains?"
- "putting post-its around the office"
- "a meeting that never ends"
- "out at sea, and you haven't seen land in a month"
- "the boss keeps suggesting we rewrite our codebase using new frameworks"
- "a soda machine that sighs"
- "my colleague must have cursed me"
- "staring into books "
- "it's a great Monday "
- "who moved my cheese in the lunchroom?"
- "on the topic of company trips "
- "riding my bicycle to work "
- "standing in line at the bakery "
- "there was a showdown at the bus stop "
- "when I tried to help my mechanic fix my car"
---
<h1>List of randomness</h1>
<p>Pick random lines and try to mix them in with your writing. Or make up your own randomness. The world is your oyster.
</p>
<ol>
{% for item in randomness %}
<li>{{ item }}</li>
{% endfor %}
{% for item in randomness %}
<li>{{ item }}</li>
{% endfor %}
</ol>

View file

@ -1,3 +1,3 @@
{
"layout": "layout.njk"
}
"layout": "layout.njk"
}