Skip to content

Feature/683 lint sticky header.js #725

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

Draft
wants to merge 2 commits into
base: 1.x
Choose a base branch
from

Conversation

markconroy
Copy link
Member

Closes #683


Thanks to Big Blue Door for sponsoring my time to work on this.

@markconroy markconroy requested review from finnlewis and millnut March 10, 2025 16:52
@millnut
Copy link
Member

millnut commented Mar 10, 2025

@markconroy this might be false, due to prettier needing to be in a higher level for local linting and instead flagging a false result. I think this is the related bug https://www.drupal.org/project/drupal/issues/3314585

The drupal core config actually wants single quote https://git.drupalcode.org/project/drupal/-/blob/11.x/core/.prettierrc.json?ref_type=heads#L4

@markconroy
Copy link
Member Author

Darn. Thanks @millnut

Let's try figure this out in MT tomorrow.

@msayoung msayoung self-requested a review March 11, 2025 08:19
@millnut
Copy link
Member

millnut commented Mar 11, 2025

@markconroy yep lets discuss in MT. On the github workflows we copy the prettier file to a location where it reads correctly as part of the eslint check.

cd html/web/core
cp -f .prettierrc.json ../.prettierrc.json
node ./node_modules/eslint/bin/eslint.js --ext .yml --resolve-plugins-relative-to=./web/core ../../${{inputs.project_path}}

The drupal.org GitLab CI does similar but uses a symlink instead before running the eslint check

$ test -e .prettierrc.json || ln -s $CI_PROJECT_DIR/$_WEB_ROOT/core/.prettierrc.json .
$ $CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/eslint --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$CI_PROJECT_DIR/$_WEB_ROOT/core --ext=.js,.yml --format=junit --output-file=$CI_PROJECT_DIR/junit.xml $_ESLINT_EXTRA . || EXIT_CODE_FILE=$?

@finnlewis
Copy link
Member

@markconroy wants to review this again.

@finnlewis finnlewis marked this pull request as draft March 11, 2025 12:40
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.

Fix eslint issues in sticky-header.js
4 participants