Skip to content

#318 Add ESLint support and configure it to use Drupal standards. #319

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: drupal-project
recipe: drupal9

config:
# Also update custom image under appserver when updating PHP verson.
php: "8.0"
via: nginx
webroot: web
Expand Down Expand Up @@ -43,6 +44,10 @@ services:
build:
- "composer install"
overrides:
# Use extended image that adds Node.js.
# This is needed for ESLint.
# Custom image Github page: https://github.com/wunderio/lando/blob/main/images/php8.0-fpm/Dockerfile
image: hkirsman/php8.0-fpm:latest
environment:
HASH_SALT: notsosecurehash
ENVIRONMENT_NAME: lando
Expand Down
3 changes: 3 additions & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ grumphp:
# PHPUnit will fail with 0 tests.
phpunit:
testsuite: unit
eslint:
Copy link
Member

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.

bin: 'node_modules/.bin/eslint'
config: 'web/core/.eslintrc.passing.json'
extensions:
- Wunderio\GrumPHP\Task\PhpCompatibility\PhpCompatibilityExtensionLoader
- Wunderio\GrumPHP\Task\PhpCheckSyntax\PhpCheckSyntaxExtensionLoader
Expand Down
Loading