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 JavaScript linter support and update requirements #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vidhiverma123
Copy link

Summary of Changes

This pull request introduces support for linting JavaScript (.js) files in the lintmate CLI tool. It includes:

  • Updates to the setup.py file to include ESLint as a dependency.
  • Implementation of logic in formatters.

Importance of Changes

Adding support for JavaScript linting expands the functionality of lintmate, allowing developers to maintain code quality across multiple languages. This enhancement facilitates the use of lintmate in JavaScript projects, making it a more versatile tool for developers.

Testing Instructions

To test the changes:

  1. Install the JavaScript linter by running:
    npm install -g eslint

Copy link
Owner

@thesujai thesujai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are few things to consider to take this in the right direction:

  1. If js is added as linters then the eslints and other js specific linters should be added with npm. So pip install lintmate[javascript] should actually install eslint and other linters using npm. Currently you are assuming pip will install eslint, which is not the case
  2. The format_javascript is okay, but you should also add changes in linter-cli/linters/
  3. You should also update the cli.lint_cli() function.

I would suggest you to first use this package and to understand it start reading code from cli,py

@thesujai
Copy link
Owner

npm install -g eslint

The users of the library should just be able to do pip install lintmate[javascript]. The above command should run from our code

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

Successfully merging this pull request may close these issues.

2 participants