Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Run lint-staged on tests and example files #78

Closed
diego3g opened this issue May 24, 2019 · 1 comment · Fixed by #84
Closed

Run lint-staged on tests and example files #78

diego3g opened this issue May 24, 2019 · 1 comment · Fixed by #84

Comments

@diego3g
Copy link
Contributor

diego3g commented May 24, 2019

What would you like to be added:

Run lint-staged in tests and example folder.

Why is this needed:

People have different editors and configuration and sometimes Prettier is messing with those files and Pull Requests get rejected because of style guide.

Is your enhancement request related to a problem? Please describe.

Not a problem itself, but there are a lot of PR's with linting problems.

Additional context

Maybe something like this solve the issue:

"lint-staged": {
  "lib/**/*.{ts,tsx}": [
    "eslint --fix",
    "prettier --write",
    "jest --bail --findRelatedTests"
  ],
  "__tests__/**/*.{ts,tsx}" : [
    "eslint --fix",
    "prettier --write"
  ],
  "example/**/*.{ts,tsx}" : [
    "eslint --fix",
    "prettier --write"
  ]
},
@italomlp
Copy link
Contributor

I think that in some cases the configuration of the editor can change *.md files too (happened with me). So, I suggest adding a configuration in lint-staged to achieve this too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants