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

[PROPOSAL] Add linter check and prettier to dashboards-desktop repo #21

Open
seraphjiang opened this issue May 1, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@seraphjiang
Copy link
Member

@CCongWang had successfully introduced linter and prettier to FTRepo to improve the code quality and over all productivity.

Let's bring good practice to this repo

opensearch-project/opensearch-dashboards-functional-test#195

opensearch-project/opensearch-dashboards-functional-test#186

@seraphjiang seraphjiang added the enhancement New feature or request label May 1, 2022
@CCongWang
Copy link

  1. Add prettier:
    checkout the description in this PR, like how to add prettier and config prettier rules
  2. Add ESLint:
    checkout this blog on how to integrate prettier and ESLint
  3. Add Husky precommit hook:
// install husky
npm install husky -D

// install hook
yarn husky install

// add precommit hook
yarn husky add .husky/pre-commit "yarn lint(or your specific lint command defined in package.json)"
git add .husky/pre-commit
  1. Add postinstall script in package.json to automatically install hook
    checkout example PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants