-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Ensure ESLint actually runs in project mode (#1572) #2455
Conversation
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ BASH | bash-exec | 6 | 0 | 0.01s | |
✅ BASH | shellcheck | 6 | 0 | 0.16s | |
✅ BASH | shfmt | 6 | 0 | 0 | 0.43s |
✅ COPYPASTE | jscpd | yes | no | 3.43s | |
✅ DOCKERFILE | hadolint | 116 | 0 | 18.82s | |
✅ JSON | eslint-plugin-jsonc | 21 | 0 | 0 | 2.61s |
✅ JSON | jsonlint | 19 | 0 | 0.24s | |
✅ JSON | v8r | 21 | 0 | 15.46s | |
markdownlint | 312 | 0 | 230 | 7.51s | |
✅ MARKDOWN | markdown-link-check | 312 | 0 | 5.83s | |
✅ MARKDOWN | markdown-table-formatter | 312 | 0 | 0 | 21.7s |
✅ OPENAPI | spectral | 1 | 0 | 1.64s | |
bandit | 185 | 54 | 2.51s | ||
✅ PYTHON | black | 185 | 0 | 0 | 5.01s |
✅ PYTHON | flake8 | 185 | 0 | 2.33s | |
✅ PYTHON | isort | 185 | 0 | 0 | 0.91s |
✅ PYTHON | mypy | 185 | 0 | 9.11s | |
✅ PYTHON | pylint | 185 | 0 | 13.69s | |
pyright | 185 | 251 | 20.81s | ||
✅ PYTHON | ruff | 185 | 0 | 0 | 0.49s |
✅ REPOSITORY | checkov | yes | no | 39.19s | |
✅ REPOSITORY | git_diff | yes | no | 0.42s | |
✅ REPOSITORY | secretlint | yes | no | 15.63s | |
✅ REPOSITORY | trivy | yes | no | 37.45s | |
✅ SPELL | cspell | 753 | 0 | 29.16s | |
✅ SPELL | misspell | 572 | 0 | 0 | 1.06s |
✅ XML | xmllint | 3 | 0 | 0 | 0.44s |
✅ YAML | prettier | 81 | 0 | 0 | 4.2s |
✅ YAML | v8r | 23 | 0 | 75.17s | |
✅ YAML | yamllint | 82 | 0 | 1.38s |
See detailed report in MegaLinter reports
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ BASH | bash-exec | 6 | 0 | 0.01s | |
✅ BASH | shellcheck | 6 | 0 | 0.13s | |
✅ BASH | shfmt | 6 | 0 | 0 | 0.05s |
✅ COPYPASTE | jscpd | yes | no | 2.8s | |
✅ DOCKERFILE | hadolint | 116 | 0 | 14.01s | |
✅ JSON | eslint-plugin-jsonc | 21 | 0 | 0 | 1.77s |
✅ JSON | jsonlint | 19 | 0 | 0.17s | |
✅ JSON | npm-package-json-lint | yes | no | 0.66s | |
✅ JSON | v8r | 21 | 0 | 13.2s | |
markdownlint | 312 | 2 | 230 | 5.83s | |
✅ MARKDOWN | markdown-link-check | 312 | 0 | 5.05s | |
✅ MARKDOWN | markdown-table-formatter | 312 | 2 | 0 | 15.55s |
✅ OPENAPI | spectral | 1 | 0 | 1.33s | |
bandit | 185 | 54 | 2.46s | ||
✅ PYTHON | black | 185 | 0 | 0 | 3.3s |
✅ PYTHON | flake8 | 185 | 0 | 1.84s | |
✅ PYTHON | isort | 185 | 0 | 0 | 0.41s |
✅ PYTHON | mypy | 185 | 0 | 6.95s | |
✅ PYTHON | pylint | 185 | 0 | 10.36s | |
pyright | 185 | 251 | 15.4s | ||
✅ PYTHON | ruff | 185 | 0 | 0 | 0.12s |
✅ REPOSITORY | checkov | yes | no | 29.89s | |
devskim | yes | 61 | 1.23s | ||
✅ REPOSITORY | dustilock | yes | no | 1.18s | |
✅ REPOSITORY | git_diff | yes | no | 0.08s | |
✅ REPOSITORY | secretlint | yes | no | 7.49s | |
✅ REPOSITORY | syft | yes | no | 0.93s | |
✅ REPOSITORY | trivy | yes | no | 21.53s | |
✅ SPELL | cspell | 753 | 0 | 17.74s | |
✅ SPELL | misspell | 572 | 2 | 0 | 0.43s |
✅ XML | xmllint | 3 | 0 | 0 | 0.03s |
✅ YAML | prettier | 81 | 0 | 0 | 2.36s |
✅ YAML | v8r | 23 | 0 | 65.39s | |
✅ YAML | yamllint | 82 | 0 | 1.17s |
See detailed report in MegaLinter reports
You could have same capabilities but better runtime performances if you request a new MegaLinter flavor.
In project mode, ESLint succeeds without doing anything when called without any files, so pass it the current directory.
@nvuillam, please let me know if you have any feedback on this one. |
Are you sure eslint needs a folder when in project mode ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)
Yeah, I ran it via npx to confirm that the directory was needed. It seems like a bug that it silently succeeds without any file paths. |
Fixes #1572
In project mode, ESLint succeeds without doing anything when called without any files, so pass it the current directory.
Proposed Changes
EslintLinter.py
, pass ESLint an extra.
at the end of its command line when it is in project mode.Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance