Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable eslint for CLI package #1851

Closed
4 tasks
bajtos opened this issue Oct 15, 2018 · 4 comments
Closed
4 tasks

Enable eslint for CLI package #1851

bajtos opened this issue Oct 15, 2018 · 4 comments
Assignees
Labels
CLI feature Internal Tooling Issues related to our tooling and monorepo infrastructore tech-debt

Comments

@bajtos
Copy link
Member

bajtos commented Oct 15, 2018

The package packages/cli is the only package written in JavaScript and because it's an exception in our TypeScript-based project, it's not covered by any linter. As a result, this part of our codebase may contain silly bugs that could have been caught by a linter.

I am proposing to start running eslint for packages/cli.

Alternatively, we can rewrite @loopback/cli into TypeScript, but that would be a larger task IMO.

Acceptance criteria

  • npm run lint executes eslint for packages/cli
  • npm run lint:fix executes eslint --fix
  • eslint is configured using eslint-config-loopback with custom configuration to disable eslint rules clashing with our Prettier formatting.
  • all linting errors are fixed - this should be a standalone commit in the pull request.
@raymondfeng
Copy link
Contributor

  1. +1 to use eslint as the short-term improvement.

  2. Converting the package into TypeScript might not be too complicated as we have used ES6 classes for most of the code.

@bajtos bajtos added the Internal Tooling Issues related to our tooling and monorepo infrastructore label Mar 1, 2019
@bajtos
Copy link
Member Author

bajtos commented Mar 1, 2019

eslint is configured using eslint-config-loopback with custom configuration to disable eslint rules clashing with our Prettier formatting.

We can use eslint-plugin-prettier or eslint-config-prettier to help with that.

@bajtos
Copy link
Member Author

bajtos commented May 14, 2019

Let's wait until #2608 is done.

@dhmlau dhmlau added the p2 label May 14, 2019
@dhmlau dhmlau added 2019Q3 and removed 2019Q2 labels Jun 11, 2019
@dhmlau
Copy link
Member

dhmlau commented Jun 25, 2019

Closing it as done.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CLI feature Internal Tooling Issues related to our tooling and monorepo infrastructore tech-debt
Projects
None yet
Development

No branches or pull requests

4 participants