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 eslint-plugin-react #337

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Add eslint-plugin-react #337

merged 1 commit into from
Jul 9, 2024

Conversation

Prinzhorn
Copy link
Contributor

We just set up ESlint in a React project and SublimeLinter was complaining

package.json did not contain dependencies or devDependencies required to lint this file type. Manually set 'selector' to override this behavior, or install the required dependencies.

eslint-plugin-react itself comes with other plugins https://github.com/jsx-eslint/eslint-plugin-react/blob/51d342ba350ae7d7dabce1caa648e71926ef283f/package.json#L58

I got the list of extensions from their example config:

module.exports = [
  
  {
    files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
];

@kaste
Copy link
Contributor

kaste commented Jul 9, 2024

I think that LGTM!

@kaste kaste merged commit 956a1fa into SublimeLinter:master Jul 9, 2024
@Prinzhorn
Copy link
Contributor Author

Thanks for the quick turnaround. It does not appear to be working, I'm still getting the same error in the console.

package.json did not contain dependencies or devDependencies required to lint this file type. Manually set 'selector' to override this behavior, or install the required dependencies.

The package.json and project is here: https://github.com/mitmproxy/mitmproxy/blob/main/web/package.json

If you want to check this out locally, you can clone mitmproxy and check out the project in the web folder. Instructions for setting it up are in the https://github.com/mitmproxy/mitmproxy/blob/main/web/README.md but you likely only need npm i I would assume.

Running npm run eslint (or just ./node_modules/.bin/eslint .) works successfully.

Alternatively I'm open for pointer on how I can debug the Python code myself in my local Sublime.

@Prinzhorn
Copy link
Contributor Author

Scratch that, it's working now. I swear I restarted Sublime, but I guess not. Thanks again!

@Prinzhorn Prinzhorn deleted the patch-1 branch July 9, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants