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

[feature request] shareable configs #686

Closed
JounQin opened this issue Aug 15, 2019 · 5 comments
Closed

[feature request] shareable configs #686

JounQin opened this issue Aug 15, 2019 · 5 comments

Comments

@JounQin
Copy link

@JounQin JounQin commented Aug 15, 2019

It would be great to simplify duplicate codes over repositories.

My personal config:

{
  "lint-staged": {
    "*.{mdx,mjs,js,jsx,ts,tsx}": [
      "eslint",
      "git add"
    ],
    ".*rc": [
      "prettier --write",
      "git add"
    ],
    "*.{css,gql,html,json,less,md,sass,scss,yml}": [
      "prettier --write",
      "git add"
    ]
  }
}

related #216

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Aug 15, 2019

Workaround like husky for now:
typicode/husky#245 (comment)

@okonet

This comment has been minimized.

Copy link
Owner

@okonet okonet commented Aug 17, 2019

We recommend using mrm

@okonet okonet closed this Aug 17, 2019
@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Aug 17, 2019

Fine, I prefer the workaround solution then.

@okonet

This comment has been minimized.

Copy link
Owner

@okonet okonet commented Aug 17, 2019

You’re welcome to draft a PR with an implementation for this feature.

@iiroj

This comment has been minimized.

Copy link
Collaborator

@iiroj iiroj commented Aug 17, 2019

you could also specify the config file via the cli option: lint-staged -c ./node_modules/my-lint-staged-config/index.json. Not the most eloquent solution, but doesn’t require a new file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.