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

Add linting #585

Closed
3 of 5 tasks
Tracked by #10
raphodn opened this issue May 24, 2024 · 0 comments · Fixed by #586 or #590 · May be fixed by #720
Closed
3 of 5 tasks
Tracked by #10

Add linting #585

raphodn opened this issue May 24, 2024 · 0 comments · Fixed by #586 or #590 · May be fixed by #720

Comments

@raphodn
Copy link
Member

raphodn commented May 24, 2024

Story

Add linting with ESLint

Todo

  • setup eslint
  • run eslint on all files
  • run eslint on commit (pre-commit config with husky & lint-staged)
  • eslint plugin : prettier
  • eslint plugin : cypress

Configuration

Default

yarn add -D eslint

Plugin for Vue

https://eslint.vuejs.org/user-guide/

yarn add -D eslint-plugin-vue

Plugin for prettier

https://github.com/prettier/eslint-plugin-prettier

yarn add -D eslint-plugin-prettier eslint-config-prettier

Plugin for cypress

https://github.com/cypress-io/eslint-plugin-cypress/blob/master/FLAT-CONFIG.md


Pre-commit

With husky & lint-staged

Why not with pre-commit ? Requires to install a python package...

repos:
  - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v9.3.0
    hooks:
    - id: eslint
      types: [javascript]

@raphodn raphodn mentioned this issue May 24, 2024
6 tasks
@raphodn raphodn closed this as completed May 27, 2024
@raphodn raphodn linked a pull request Aug 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
1 participant