diff options
author | tdro <tdro@users.noreply.github.com> | 2022-01-29 00:19:20 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2022-01-29 00:19:20 -0500 |
commit | 0c23bea876d9001e38364dfcbdb0c0dbc45c1d0c (patch) | |
tree | 780a3d07c334529eade83db91de6064d9b3f589a | |
parent | d13a2fd835b6273fb6d654a6bacc65d360f0ce19 (diff) | |
download | dotfiles-0c23bea876d9001e38364dfcbdb0c0dbc45c1d0c.tar.gz dotfiles-0c23bea876d9001e38364dfcbdb0c0dbc45c1d0c.tar.bz2 dotfiles-0c23bea876d9001e38364dfcbdb0c0dbc45c1d0c.zip |
.config/eslintrc.yml -> .config/eslint/config.yaml
-rw-r--r-- | .config/eslint/config.yaml (renamed from .config/eslintrc.yml) | 3 | ||||
-rwxr-xr-x | .local/bin/eslint | 2 | ||||
-rw-r--r-- | .vimrc | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/.config/eslintrc.yml b/.config/eslint/config.yaml index 7dc8a5d..a030580 100644 --- a/.config/eslintrc.yml +++ b/.config/eslint/config.yaml @@ -1,8 +1,9 @@ +--- env: browser: true commonjs: true es6: true -extends: 'eslint:recommended' +extends: eslint:recommended globals: Atomics: readonly SharedArrayBuffer: readonly diff --git a/.local/bin/eslint b/.local/bin/eslint new file mode 100755 index 0000000..d0e6013 --- /dev/null +++ b/.local/bin/eslint @@ -0,0 +1,2 @@ +#!/bin/sh -eu +$(which eslint --all | grep --invert-match "local/bin" | head -n 1) --config "$HOME/.config/eslint/config.yaml" "$@"; @@ -284,11 +284,11 @@ augroup AutoCommands autocmd FileType nim autocmd! BufWritePost <buffer> exe 'Notify(''nimpretty ' . expand('%') . ' 2>&1 && printf "Nim OK: ' . expand('%') . '"'')' | :e autocmd FileType rust autocmd! BufWritePost <buffer> exe 'Notify(''rustfmt ' . expand('%') . ' 2>&1 && printf "rustfmt OK: ' . expand('%') . '"'')' | :e autocmd FileType json autocmd! BufWritePost <buffer> exe 'Notify(''jsonlint -i ' . expand('%') . ' 2>&1 && printf "JSON OK: ' . expand('%') . '"'')' | :e + autocmd FileType javascript autocmd! BufWritePost <buffer> exe 'Notify(''eslint --fix ' . expand('%') . ' 2>&1 && printf "JavaScript OK: '. expand('%') . '"'')' | :e autocmd FileType elixir autocmd! BufWritePost <buffer> exe 'Notify(''mix format ' . expand('%') . ' 2>&1 && printf "Elixir Format OK: ' . expand('%') . '"'')' | :e autocmd FileType haskell autocmd! BufWritePost <buffer> exe 'Notify(''hlint ' . expand('%') . ' 2>&1 && brittany --write-mode inplace ' . expand('%') . ' 2>&1'')' | :e autocmd FileType c autocmd! BufWritePost <buffer> exe 'Notify(''clang-format -i ' . expand('%') . ' 2>&1 && printf "Clang Format OK: ' . expand('%') . '"'')' | :e autocmd FileType bash,sh autocmd! BufWritePost <buffer> exe 'Notify(''shellcheck -x --exclude=SC1090,SC1091 ' . expand('%') . ' 2>&1 && printf "Shellcheck OK: ' . expand('%') . '"'')' - autocmd FileType javascript autocmd! BufWritePost <buffer> exe 'Notify(''eslint -c $HOME/.config/eslintrc.yml --fix ' . expand('%') . ' 2>&1 && printf "JavaScript OK: '. expand('%') . '"'')' | :e autocmd FileType go autocmd! BufWritePost <buffer> exe 'Notify(''gofmt -w -s -e ' . expand('%') . ' 2>&1 && go vet ' . expand('%') . ' 2>&1 && printf "Go Format OK: ' . expand('%') . '"'')' | :e autocmd FileType nix autocmd! BufWritePost <buffer> exe 'Notify(''nix-linter ' . expand('%') . ' 2>&1 && printf "Nix Lint OK: ' . expand('%') . '"' . ' && nixfmt ' . expand('%') . ' 2>&1' . ''')' | :e autocmd FileType tex autocmd! BufWritePost <buffer> exe 'Notify(''latexindent ' . expand('%') . ' 2>&1 && printf "LaTeX OK: ' . expand('%') . '"'')' | :e | :only | :term ++close ++rows=10 latex-compile % |