main
Julius Riegel 8 months ago
parent 04401bd60c
commit 616343cadf

@ -0,0 +1,143 @@
version: 2
root-markers:
- .git/
- package.json
- Cargo.toml
lint-debounce: 1s
commands: []
tools:
css-prettier: &css-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} ${--single-quote:singleQuote} --parser css'
csv-csvlint: &csv-csvlint
lint-command: 'csvlint'
dockerfile-hadolint: &dockerfile-hadolint
lint-command: 'hadolint'
lint-formats:
- '%f:%l %m'
gitcommit-gitlint: &gitcommit-gitlint
lint-command: 'gitlint'
lint-stdin: true
lint-formats:
- '%l: %m: "%r"'
- '%l: %m'
html-prettier: &html-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} ${--single-quote:singleQuote} --parser html'
javascript-eslint: &javascript-eslint
lint-command: 'eslint -f visualstudio --stdin --stdin-filename ${INPUT}'
lint-ignore-exit-code: true
lint-stdin: true
lint-formats:
- "%f(%l,%c): %tarning %m"
- "%f(%l,%c): %rror %m"
typescript-eslint: &typescript-eslint
lint-command: 'eslint -f visualstudio --stdin --stdin-filename ${INPUT}'
lint-ignore-exit-code: true
lint-stdin: true
lint-formats:
- "%f(%l,%c): %tarning %m"
- "%f(%l,%c): %rror %m"
json-fixjson: &json-fixjson
format-command: 'fixjson'
json-jq: &json-jq
lint-command: 'jq .'
json-prettier: &json-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} --parser json'
lua-lua-format: &lua-lua-format
format-command: 'lua-format -i'
format-stdin: true
markdown-markdownlint: &markdown-markdownlint
lint-command: 'markdownlint -s -c %USERPROFILE%\.markdownlintrc'
lint-stdin: true
lint-formats:
- '%f:%l %m'
- '%f:%l:%c %m'
- '%f: %l: %m'
markdown-pandoc: &markdown-pandoc
format-command: 'pandoc -f markdown -t gfm -sp --tab-stop=2'
prettierd: &prettierd
format-command: >
prettierd ${INPUT} ${--range-start=charStart} ${--range-end=charEnd} \
${--tab-width=tabSize}
format-stdin: true
root-markers:
- .prettierrc
- .prettierrc.json
- .prettierrc.js
- .prettierrc.yml
- .prettierrc.yaml
- .prettierrc.json5
- .prettierrc.mjs
- .prettierrc.cjs
- .prettierrc.toml
sh-shellcheck: &sh-shellcheck
lint-command: 'shellcheck -f gcc -x'
lint-source: 'shellcheck'
lint-formats:
- '%f:%l:%c: %trror: %m'
- '%f:%l:%c: %tarning: %m'
- '%f:%l:%c: %tote: %m'
sh-shfmt: &sh-shfmt
format-command: 'shfmt -ci -s -bn'
format-stdin: true
yaml-yamllint: &yaml-yamllint
lint-command: 'yamllint -f parsable -'
lint-stdin: true
languages:
css:
- <<: *css-prettier
csv:
- <<: *csv-csvlint
dockerfile:
- <<: *dockerfile-hadolint
gitcommit:
- <<: *gitcommit-gitlint
html:
- <<: *html-prettier
javascript:
- <<: *javascript-eslint
- <<: *prettierd
typescript:
- <<: *typescript-eslint
json:
- <<: *json-fixjson
- <<: *json-jq
lua:
- <<: *lua-lua-format
markdown:
- <<: *markdown-markdownlint
- <<: *markdown-pandoc
sh:
- <<: *sh-shellcheck
- <<: *sh-shfmt
yaml:
- <<: *yaml-yamllint

@ -2,36 +2,42 @@
command = "biome"
args = ["lsp-proxy"]
[language-server.eslint]
command = "vscode-eslint-language-server"
args = []
[language-server.efm]
command = "efm-langserver"
[language-server.roc_lang_server]
command = "roc_lang_server"
args = []
[language-server.graphql-language-service]
command = "graphql-lsp"
args = ["server", "-m", "stream"]
# languages
[[language]]
name = "typescript"
language-servers = ["typescript-language-server", "biome", "graphql-language-service", "eslint"]
language-servers = ["typescript-language-server", "biome", "graphql-language-service", { name = "efm", only-features = ["diagnostics", "format"]}]
auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.ts"] }
indent = { tab-width = 4, unit = " " }
[[language]]
name = "javascript"
language-servers = ["typescript-language-server", "biome", "eslint"]
language-servers = ["typescript-language-server", "biome", { name = "efm", only-features = ["diagnostics", "format"]}]
auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.js"] }
indent = { tab-width = 4, unit = " " }
[[language]]
name = "json"
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.json"] }
[[language]]
name = "handlebars"
injection-regex = "hbs"
@ -60,6 +66,7 @@ roots = []
formatter = { command = "roc", args = ['format', '--stdin', '--stdout'] }
grammar = "roc"
[[language]]
name = "bash"
auto-format = true

@ -28,15 +28,19 @@ export def info [] {
# notify in background
export def notify-bg [] {
use task.nu
task spawn -l "ci-notify" {
task spawn -i -l "ci-notify" -g (task-group) {
ci notify
}
}
export def watch-bg [] {
use task.nu
task spawn -l "ci-watch" {
ci watch
task spawn -l "ci-watch" -g (task-group) {
while (ci info | get status) != "running" {
sleep 10sec;
}
ci notify
ci watch-bg
}
}
@ -48,3 +52,14 @@ export def get-ci [] {
"github"
}
}
def task-group [] {
let name = ($env.PWD | path basename)
let groupname = $"ci-($name)"
if not ($groupname in ...(task group | columns)) {
task group add $groupname -p 4
}
$groupname
}

@ -54,6 +54,7 @@ config.modules = {
'pastel',
'pueue',
'onefetch',
'efm-langserver',
},
gui = mod {
'kdePackages.breeze-icons',

Loading…
Cancel
Save