feat(lint): added my linting configs

This commit is contained in:
2023-09-27 14:25:53 +03:00
parent 2415dff0e2
commit 1d056988f4
35 changed files with 3479 additions and 524 deletions

3
.commitlintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@ivuorinen/commitlint-config"]
}

3
.eslintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@ivuorinen"]
}

2
.gitattributes vendored
View File

@@ -13,7 +13,7 @@
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto
* text=auto oel=lf
# Source code
*.bash text eol=lf

View File

@@ -1,7 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "weekly"
interval: 'weekly'

View File

@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>ivuorinen/.github:renovate-config"
]
"extends": ["local>ivuorinen/.github:renovate-config"]
}

View File

@@ -18,7 +18,7 @@ module.exports = {
renderTypeSection: function (label, commits) {
let text = `\n## ${label}\n\n`
commits.forEach((commit) => {
commits.forEach(commit => {
const scope = commit.scope ? `**${commit.scope}:** ` : ''
text += `- ${scope}${commit.subject}\n`
})
@@ -28,8 +28,8 @@ module.exports = {
renderChangelog: function (release, changes) {
const now = new Date()
const d = now.toISOString().substring(0, 10);
const header = `# ${ release } - ${ d }\n`;
const d = now.toISOString().substring(0, 10)
const header = `# ${release} - ${d}\n`
return header + changes + '\n\n'
},
}

View File

@@ -12,7 +12,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: "Echo results"
- name: 'Echo results'
id: output-changelog
run: |
echo "${{ steps.changelog.outputs.changes }}"

View File

@@ -2,7 +2,7 @@ name: Release Daily State # Workflow name displayed on GitHub
on:
workflow_dispatch: # Trigger manually
schedule:
- cron: "30 20 * * *" # UTC is 2-3 hours behind Europe/Helsinki, my timezone
- cron: '30 20 * * *' # UTC is 2-3 hours behind Europe/Helsinki, my timezone
permissions:
contents: write
jobs:

1
.gitignore vendored
View File

@@ -14,4 +14,5 @@ ssh/local.d/*
!.gitkeep
.env
local/share/fonts/NerdFonts
node_modules

View File

@@ -3,4 +3,4 @@ config/cheat/cheatsheets/community/**
tools/dotbot/**
tools/dotbot-brew/**
tools/dotbot-include/**
node_modules

View File

@@ -1,5 +1,5 @@
{
"extends": "markdownlint/style/prettier",
"extends": "@ivuorinen/markdownlint-config",
"code-block-style": {
"style": "fenced"
},

6
.markdownlintignore Normal file
View File

@@ -0,0 +1,6 @@
# only care about files that are under our control
config/cheat/cheatsheets/community/*
config/tmux/plugins/*
tools/*
node_modules/*

8
.prettierignore Normal file
View File

@@ -0,0 +1,8 @@
.mypy_cache/*
tools/dotbot*
local/bin/antigen.zsh
config/cheat/cheatsheets/community
config/tmux/plugins/*
lazy-lock.json
Brewfile.lock.json

14
.prettierrc.js Normal file
View File

@@ -0,0 +1,14 @@
module.exports = {
...require('@ivuorinen/prettier-config'),
trailingComma: 'all',
// Add custom options below:
overrides: [
{
files: '*.md',
options: {
printWidth: 120,
proseWrap: 'preserve',
},
},
],
}

View File

@@ -1,21 +0,0 @@
formatter:
type: basic
indent: 2
retain_line_breaks: false
disallow_anchors: false
max_line_length: 0
scan_folded_as_literal: false
indentless_arrays: false
doublestar: true
extensions:
- yaml
- yml
include:
- ./*.{yml,yaml}
- ./**/*.{yml,yaml}
exclude:
- ./tools/**

View File

@@ -1,2 +0,0 @@
# .yamlignore

View File

@@ -78,82 +78,82 @@ debug.render_timer: false
# https://github.com/catppuccin/alacritty
colors:
primary:
background: "#1E1E2E" # base
foreground: "#CDD6F4" # text
background: '#1E1E2E' # base
foreground: '#CDD6F4' # text
# Bright and dim foreground colors
dim_foreground: "#CDD6F4" # text
bright_foreground: "#CDD6F4" # text
dim_foreground: '#CDD6F4' # text
bright_foreground: '#CDD6F4' # text
# Cursor colors
cursor:
text: "#1E1E2E" # base
cursor: "#F5E0DC" # rosewater
text: '#1E1E2E' # base
cursor: '#F5E0DC' # rosewater
vi_mode_cursor:
text: "#1E1E2E" # base
cursor: "#B4BEFE" # lavender
text: '#1E1E2E' # base
cursor: '#B4BEFE' # lavender
# Search colors
search:
matches:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
foreground: '#1E1E2E' # base
background: '#A6ADC8' # subtext0
focused_match:
foreground: "#1E1E2E" # base
background: "#A6E3A1" # green
foreground: '#1E1E2E' # base
background: '#A6E3A1' # green
footer_bar:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
foreground: '#1E1E2E' # base
background: '#A6ADC8' # subtext0
# Keyboard regex hints
hints:
start:
foreground: "#1E1E2E" # base
background: "#F9E2AF" # yellow
foreground: '#1E1E2E' # base
background: '#F9E2AF' # yellow
end:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
foreground: '#1E1E2E' # base
background: '#A6ADC8' # subtext0
# Selection colors
selection:
text: "#1E1E2E" # base
background: "#F5E0DC" # rosewater
text: '#1E1E2E' # base
background: '#F5E0DC' # rosewater
# Normal colors
normal:
black: "#45475A" # surface1
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#BAC2DE" # subtext1
black: '#45475A' # surface1
red: '#F38BA8' # red
green: '#A6E3A1' # green
yellow: '#F9E2AF' # yellow
blue: '#89B4FA' # blue
magenta: '#F5C2E7' # pink
cyan: '#94E2D5' # teal
white: '#BAC2DE' # subtext1
# Bright colors
bright:
black: "#585B70" # surface2
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#A6ADC8" # subtext0
black: '#585B70' # surface2
red: '#F38BA8' # red
green: '#A6E3A1' # green
yellow: '#F9E2AF' # yellow
blue: '#89B4FA' # blue
magenta: '#F5C2E7' # pink
cyan: '#94E2D5' # teal
white: '#A6ADC8' # subtext0
# Dim colors
dim:
black: "#45475A" # surface1
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#BAC2DE" # subtext1
black: '#45475A' # surface1
red: '#F38BA8' # red
green: '#A6E3A1' # green
yellow: '#F9E2AF' # yellow
blue: '#89B4FA' # blue
magenta: '#F5C2E7' # pink
cyan: '#94E2D5' # teal
white: '#BAC2DE' # subtext1
indexed_colors:
- { index: 16, color: "#FAB387" }
- { index: 17, color: "#F5E0DC" }
- { index: 16, color: '#FAB387' }
- { index: 17, color: '#F5E0DC' }
# Visual Bell
#
@@ -262,7 +262,7 @@ key_bindings:
- { key: F10, chars: "\e[21~" }
- { key: F11, chars: "\e[23~" }
- { key: F12, chars: "\e[24~" }
- { key: Back, chars: "" }
- { key: Back, chars: '' }
- { key: Back, mods: Alt, chars: "\e" }
- { key: Insert, chars: "\e[2~" }
- { key: Delete, chars: "\e[3~" }

View File

@@ -6,7 +6,7 @@ colorize: true
# Which 'chroma' colorscheme should be applied to the output?
# Options are available here:
# https://github.com/alecthomas/chroma/tree/master/styles
style: "catppuccin"
style: 'catppuccin'
# Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256
@@ -74,7 +74,6 @@ cheatpaths:
path: ~/.dotfiles/config/cheat/cheatsheets/tldr
tags: [tldr]
readonly: true
# While it requires no configuration here, it's also worth noting that
# cheat will automatically append directories named '.cheat' within the
# current working directory to the 'cheatpath'. This can be very useful if

View File

@@ -51,4 +51,4 @@ keybindings:
prs: []
repoPaths: {}
pager:
diff: ""
diff: ''

View File

@@ -1,6 +1,6 @@
{
"Badge Text": "",
"Working Directory" : "\/Users\/ivuorinen\/Code",
"Working Directory": "/Users/ivuorinen/Code",
"Prompt Before Closing 2": false,
"Selected Text Color": {
"Red Component": 0.80392156862745101,
@@ -50,12 +50,7 @@
"Disable Window Resizing": true,
"Description": "Default",
"Close Sessions On End": true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Jobs to Ignore": ["rlogin", "ssh", "slogin", "telnet"],
"Scrollback Lines": 0,
"Draw Powerline Glyphs": true,
"Flashing Bell": true,
@@ -274,9 +269,7 @@
},
"Send Code When Idle": false,
"ASCII Anti Aliased": true,
"Tags" : [
],
"Tags": [],
"Ansi 9 Color": {
"Red Component": 0.95294117647058818,
"Color Space": "sRGB",

View File

@@ -20,62 +20,62 @@ wtf:
# that support ten line of text and one of four.
rows: [10, 10, 10, 20, 10, 4]
refreshInterval: 1
openFileUtil: "open"
openFileUtil: 'open'
mods:
# You can have multiple widgets of the same type.
# The "key" is the name of the widget and the type is the actual
# widget you want to implement.
europe_time:
title: "Europe"
title: 'Europe'
type: clocks
colors:
rows:
even: "lightblue"
odd: "white"
even: 'lightblue'
odd: 'white'
enabled: true
locations:
GMT: "Etc/GMT"
Amsterdam: "Europe/Amsterdam"
Berlin: "Europe/Berlin"
Barcelona: "Europe/Madrid"
Copenhagen: "Europe/Copenhagen"
London: "Europe/London"
Rome: "Europe/Rome"
Stockholm: "Europe/Stockholm"
GMT: 'Etc/GMT'
Amsterdam: 'Europe/Amsterdam'
Berlin: 'Europe/Berlin'
Barcelona: 'Europe/Madrid'
Copenhagen: 'Europe/Copenhagen'
London: 'Europe/London'
Rome: 'Europe/Rome'
Stockholm: 'Europe/Stockholm'
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 15
sort: "alphabetical"
sort: 'alphabetical'
americas_time:
title: "Americas"
title: 'Americas'
type: clocks
colors:
rows:
even: "lightblue"
odd: "white"
even: 'lightblue'
odd: 'white'
enabled: true
locations:
UTC: "Etc/UTC"
Vancouver: "America/Vancouver"
New_York: "America/New_York"
Sao_Paulo: "America/Sao_Paulo"
Denver: "America/Denver"
Iqaluit: "America/Iqaluit"
Bahamas: "America/Nassau"
Chicago: "America/Chicago"
UTC: 'Etc/UTC'
Vancouver: 'America/Vancouver'
New_York: 'America/New_York'
Sao_Paulo: 'America/Sao_Paulo'
Denver: 'America/Denver'
Iqaluit: 'America/Iqaluit'
Bahamas: 'America/Nassau'
Chicago: 'America/Chicago'
position:
top: 0
left: 1
height: 1
width: 1
refreshInterval: 15
sort: "alphabetical"
sort: 'alphabetical'
battery:
type: power
title: "⚡️"
title: '⚡️'
enabled: true
position:
top: 1
@@ -85,14 +85,14 @@ wtf:
refreshInterval: 15
todolist:
type: todo
checkedIcon: "X"
checkedIcon: 'X'
colors:
checked: gray
highlight:
fore: "black"
back: "orange"
fore: 'black'
back: 'orange'
enabled: true
filename: "todo.yml"
filename: 'todo.yml'
position:
top: 1
left: 0
@@ -101,10 +101,10 @@ wtf:
refreshInterval: 3600
ip:
type: ipinfo
title: "My IP"
title: 'My IP'
colors:
name: "lightblue"
value: "white"
name: 'lightblue'
value: 'white'
enabled: true
position:
top: 0
@@ -114,7 +114,7 @@ wtf:
refreshInterval: 150
security_info:
type: security
title: "Staying safe"
title: 'Staying safe'
enabled: true
position:
top: 1
@@ -126,9 +126,9 @@ wtf:
type: textfile
enabled: true
filePaths:
- "~/.config/wtf/config.yml"
- '~/.config/wtf/config.yml'
format: true
formatStyle: "monokai"
formatStyle: 'monokai'
position:
top: 3
left: 0
@@ -137,7 +137,7 @@ wtf:
refreshInterval: 15
news:
type: hackernews
title: "HackerNews"
title: 'HackerNews'
enabled: true
numberOfStories: 10
position:
@@ -159,7 +159,7 @@ wtf:
uptime:
type: cmdrunner
args: []
cmd: "uptime"
cmd: 'uptime'
enabled: true
position:
top: 5
@@ -169,8 +169,8 @@ wtf:
refreshInterval: 30
disks:
type: cmdrunner
cmd: "df"
args: ["-h"]
cmd: 'df'
args: ['-h']
enabled: true
position:
top: 4

View File

@@ -1,6 +1,6 @@
# nvim keybindings
```md
```
n ! * <Cmd>lua require("which-key").show("!", {mode = "n", auto = true})<CR>
n ' * <Cmd>lua require("which-key").show("'", {mode = "n", auto = true})<CR>
n " * <Cmd>lua require("which-key").show("\"", {mode = "n", auto = true})<CR>

View File

@@ -1,9 +1,7 @@
# tmux keybindings
Leader: `<ctrl><space>`
```
bind-key -T copy-mode C-Space send-keys -X begin-selection
bind-key -T copy-mode C-a send-keys -X start-of-line
@@ -298,4 +296,3 @@ bind-key -T root M-Right select-pane -R
bind-key -T root C-Tab previous-window
bind-key -T root C-S-Tab next-window
```

View File

@@ -1,4 +1,4 @@
- include: "tools/dotbot-defaults.yaml"
- include: 'tools/dotbot-defaults.yaml'
- shell:
- echo "Configuring air"
- brewfile:
@@ -8,7 +8,7 @@
force: true
glob: true
path: hosts/air/base/**
prefix: "."
prefix: '.'
~/.config/:
glob: true
force: true

View File

@@ -1,4 +1,4 @@
- include: "tools/dotbot-defaults.yaml"
- include: 'tools/dotbot-defaults.yaml'
- shell:
- echo "Configuring lakka"
- link:
@@ -6,7 +6,7 @@
force: true
glob: true
path: hosts/lakka/base/**
prefix: "."
prefix: '.'
~/.config/:
glob: true
force: true

View File

@@ -1,4 +1,4 @@
- include: "tools/dotbot-defaults.yaml"
- include: 'tools/dotbot-defaults.yaml'
- shell:
- echo "Configuring tunkki"
- link:
@@ -6,8 +6,11 @@
force: true
glob: true
path: hosts/tunkki/base/**
prefix: "."
prefix: '.'
~/.config/:
glob: true
force: true
path: hosts/tunkki/config/**
- snap:
- nvim:
classic: true

View File

@@ -1,4 +1,4 @@
- include: "tools/dotbot-defaults.yaml"
- include: 'tools/dotbot-defaults.yaml'
- shell:
- echo "Configuring v"
- link:
@@ -6,7 +6,7 @@
force: true
glob: true
path: hosts/v/base/**
prefix: "."
prefix: '.'
~/.config/:
glob: true
force: true

View File

@@ -1,4 +1,4 @@
- include: "tools/dotbot-defaults.yaml"
- include: 'tools/dotbot-defaults.yaml'
- clean:
~/:
~/.config:
@@ -26,7 +26,7 @@
force: true
glob: true
path: base/*
prefix: "."
prefix: '.'
~/.config/:
glob: true
relink: true
@@ -65,6 +65,3 @@
platform: linux # Optional
- time: 0 5 * * *
command: task sync
- snap:
- nvim:
classic: true

View File

@@ -13,7 +13,7 @@ Some problematic code has been fixed per `shellcheck` suggestions.
## Sourced
| Script | Source |
|-------------------------|-------------------|
| ----------------------- | ----------------- |
| `x-dupes` | skx/sysadmin-util |
| `x-foreach` | mvdan/dotfiles |
| `x-multi-ping` | skx/sysadmin-util |

View File

@@ -4,6 +4,7 @@
# Updates $HOME/.dotfiles/docs/tmux.md with my keybindings.
# shellcheck source=./../../scripts/shared.sh
DOTFILES_SHARED_LOADED=""
source "$HOME/.dotfiles/scripts/shared.sh"
have tmux || {
@@ -15,7 +16,7 @@ TMUX_KEYBINDINGS_DOCS="$DOTFILES/docs/tmux-keybindings.md"
CB="\n\`\`\`\n"
KB=$(tmux list-keys)
H="# tmux keybindings\n"
L="\n\nLeader: \`<ctrl><space>\`\n\n"
L="\nLeader: \`<ctrl><space>\`\n"
# Generalize expanded $HOME to "$HOME"
KB="${KB//$HOME/\$HOME}"

36
package.json Normal file
View File

@@ -0,0 +1,36 @@
{
"name": "ivuorinen-dotfiles",
"version": "1.0.0",
"description": "ivuorinen's dotfiles, this is for linting and formatters",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"lint:markdown": "npx markdownlint -d .",
"fix:markdown": "npx markdownlint -df .",
"lint:prettier": "npx prettier . --check",
"fix:prettier": "npx prettier . --write",
"test": "echo \"Error: no test specified\" && exit 0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ivuorinen/dotfiles.git"
},
"keywords": [
"dotfiles",
"ivuorinen"
],
"author": "Ismo Vuorinen",
"license": "ISC",
"bugs": {
"url": "https://github.com/ivuorinen/dotfiles/issues"
},
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
"devDependencies": {
"@ivuorinen/commitlint-config": "^0.1.10",
"@ivuorinen/eslint-config": "^0.2.13",
"@ivuorinen/markdownlint-config": "^0.1.6",
"@ivuorinen/prettier-config": "^0.1.1"
}
}

2919
yarn.lock Normal file

File diff suppressed because it is too large Load Diff