Skip to content

Add JavaScript linter support and update requirements - #3

Open
vidhiverma123 wants to merge 1 commit into
thesujai:mainfrom
vidhiverma123:add-js-linter-support
Open

Add JavaScript linter support and update requirements#3
vidhiverma123 wants to merge 1 commit into
thesujai:mainfrom
vidhiverma123:add-js-linter-support

Conversation

@vidhiverma123

Copy link
Copy Markdown

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

@thesujai thesujai left a comment

Copy link
Copy Markdown
Owner

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
Copy Markdown
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