-
Notifications
You must be signed in to change notification settings - Fork 6
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
#318 Add ESLint support and configure it to use Drupal standards. #319
#318 Add ESLint support and configure it to use Drupal standards. #319
Conversation
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.
Tested and works 👍 💯
.lando.yml
Outdated
build_as_root: | ||
# To be able to run ESLint with GrumPHP, we need Node.js on appserver. | ||
- "apt-get update" | ||
- "apt-get install -y nodejs" |
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.
I would avoid such things in a template - they slow down the build time. Perhaps we should consider using custom PHP images instead with nodejs
included?
@@ -1,3 +1,2761 @@ | |||
{ | |||
"lockfileVersion": 2 | |||
"name": "wunderio-drupal-project", |
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.
@@ -23,6 +23,9 @@ grumphp: | |||
# PHPUnit will fail with 0 tests. | |||
phpunit: | |||
testsuite: unit | |||
eslint: |
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.
Let's consider other options as well like using Husky via node
service.
How to test:
git clone git@github.com:wunderio/drupal-project.git
cd drupal-project
git checkout feature/#318-Add-ESLint-support-and-configure-it-to-use-Drupal-standards
lando start
(orlando rebuild
if you've working on existing Lando project)echo 'var foo="bar"' > web/modules/custom/phpunit_example/example.js
git add web/modules/custom/phpunit_example/example.js
git commit
There's also an alternative PR here #320 that uses node service but it's currently proof of work. It breaks Code Quality scans, you need to configure name and e-mail in the node service.