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 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
Copy link
Author

JounQin commented Aug 15, 2019

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

@okonet
Copy link
Collaborator

okonet commented Aug 17, 2019

We recommend using mrm

@okonet okonet closed this as completed Aug 17, 2019
@JounQin
Copy link
Author

JounQin commented Aug 17, 2019

Fine, I prefer the workaround solution then.

@okonet
Copy link
Collaborator

okonet commented Aug 17, 2019

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

@iiroj
Copy link
Member

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
Labels
None yet
Development

No branches or pull requests

3 participants