-
Notifications
You must be signed in to change notification settings - Fork 3
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
DEV-37: Use eslint to lint custom javascript #146
Conversation
.nvmrc
Outdated
12 | ||
18 |
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.
From #144 - thanks Byron!
.circleci/config.yml
Outdated
- NODE_VERSION: 8 | ||
- NODE_VERSION: 18 |
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.
From #144 - thanks Byron!
``` | ||
composer create-project palantirnet/drupal-skeleton example dev-develop --no-interaction | ||
``` | ||
|
||
This skeleton is based on Drupal 10. If you would like to install and use Drupal 9 instead, run: | ||
``` | ||
composer create-project palantirnet/drupal-skeleton example dev-drupal9 --no-interaction | ||
``` | ||
|
||
2. Go into your new project directory and update the ddev configuration in `.ddev/config.yml`: | ||
``` | ||
composer create-project palantirnet/drupal-skeleton example dev-develop --no-interaction | ||
``` | ||
|
||
This skeleton is based on Drupal 10. If you would like to install and use Drupal 9 instead, run: |
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.
These changes are all just formatting to allow us to just use 1.
README.md
Outdated
Update the `package.json`: | ||
|
||
* Change the `name` from `palantirnet--drupal-skeleton` to `palantirnet--PROJECTNAME` | ||
* Update the `description` with a brief description of your 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.
This is a new addition.
}, | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/palantirnet/the-build" |
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.
This is temporary. After this PR is approved we should be able to remove.
"palantirnet/the-build": "^4@beta" | ||
"palantirnet/the-build": "dev-dev-37-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.
This is temporary. After this PR is approved we should be able to revert or update.
#!/bin/bash | ||
|
||
## Description: Run phing inside the shell with `ddev phing` | ||
|
||
vendor/bin/phing "$@" |
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.
Allows us to run ddev phing ...
@@ -0,0 +1,5 @@ | |||
{ | |||
"extends": [ | |||
"drupal" |
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.
We just use Drupal Core's rules and config for eslint.
This reverts commit 33f184e.
We were able to remove the node dependency in favor of just using yarn ++
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.
Everything here works great for me! I think this will help us out a lot on DHS, so I'd be in favor of merging this in. I'm going to hold off until others have a chance to look though.
I do see there is a test failure, but I'm wondering if we can test that in a different way. I'm not sure how relevant the existing test is. |
User story: DEV-37: Use Drupal core JS and CSS linting as default
Description
This PR adds the necessary configuration and scripting to use eslint on our custom js in projects.
Testing instructions
composer create-project palantirnet/drupal-skeleton test dev-dev-37-eslint
ddev phing code-review
from your host machine${drupal.root}/modules/custom/bad-js/bad.es6.js
:ddev phing code-review
from your host machineNotes
This PR relies on palantirnet/the-build#223