Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vars to replace check_extra_args #54

Open
jdx opened this issue Mar 30, 2025 · 0 comments
Open

vars to replace check_extra_args #54

jdx opened this issue Mar 30, 2025 · 0 comments

Comments

@jdx
Copy link
Owner

jdx commented Mar 30, 2025

I'm thinking we could do this:

linters = new {
    ["prettier"] = new builtins.Prettier {
      vars {
        ["check_extra_args"] = "--foo"
      }
    }
}

which would be defined in the builtin like this:

import "../hk.pkl"

class Prettier extends hk.Step {
    glob = new { "**/*.{js,jsx,ts,tsx,css,scss,less,html,json,jsonc,yaml,markdown,markdown.mdx,graphql,handlebars,svelte,astro,htmlangular}" }
    check = """prettier --check{{vars["check_extra_args"]}} {{ files }}"""
    fix = """prettier --write{{vars["fix_extra_args"]}} {{ files }}"""
} 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant