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

Use same ESLint config as GitLab #90

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

claudiu-cristea
Copy link
Contributor

The Issue

GitLab Templates uses core/.eslintrc.passing.json configuration. Quoting from https://git.drupalcode.org/project/gitlab_templates/-/blob/main/docs/jobs/eslint.md?ref_type=heads#eslint

Your project does not need a .eslintrc.json file because a default one matching Core's standards core/.eslintrc.passing.json is used. If you do create a .eslintrc.json file then it only needs to contain the specific rules that you want to override, because all other rules will be inherited due to ESLint's cascading configuration.

The core/.eslintrc.passing.json config includes/merges core/.eslintrc.json and core/..eslintrc.jquery.json.

But this add-on only uses core/.eslintrc.json, meaning core/.eslintrc.jquery.json is ignored. It happens that you test locally with ddev eslint but in CI pipeline you will get failures caused by running core/.eslintrc.jquery.json

How This PR Solves The Issue

Aligns ddev eslint with GitLab Templates.

Manual Testing Instructions

  • Run ddev eslint against JS with a lot of jQuery. The test passed.
  • Check in pipeline the failures.

Automated Testing Overview

N/A

Related Issue Link(s)

None

Release/Deployment Notes

N/A

@weitzman weitzman merged commit 46dacc8 into ddev:main Nov 1, 2024
6 checks passed
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