Skip to content

Commit 47eb661

Browse files
feat: add biome, eslint, prettier
1 parent e91d29a commit 47eb661

File tree

240 files changed

+7095
-7184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+7095
-7184
lines changed

.eslintignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Dependencies
2+
node_modules/
3+
vendor/
4+
web/core/
5+
web/modules/contrib/
6+
web/themes/contrib/
7+
web/profiles/contrib/
8+
9+
# Build outputs
10+
web/sites/**/files/
11+
web/sites/**/libraries/
12+
**/js_test_files/
13+
14+
# E2E tests
15+
e2e/
16+
17+
# Generated files
18+
local/files/
19+
local/private/
20+
21+
# Docker/Infrastructure files
22+
local/docker-compose.yaml
23+
docker/
24+
25+
# Drupal default config files
26+
web/sites/default/default.services.yml
27+
28+
# Theme config files (YAML with single quotes - valid Drupal style)
29+
web/themes/**/*.yml
30+
web/themes/**/*.yaml
31+
32+
# Other
33+
*.min.js
34+
*.bundle.js
35+

.eslintrc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"extends": ["./web/core/.eslintrc.json"],
3+
"root": true,
4+
"env": {
5+
"browser": true,
6+
"es6": true,
7+
"node": true
8+
},
9+
"parserOptions": {
10+
"ecmaVersion": 2020
11+
},
12+
"globals": {
13+
"Drupal": true,
14+
"drupalSettings": true,
15+
"drupalTranslations": true,
16+
"jQuery": true,
17+
"umami": true
18+
},
19+
"rules": {
20+
"no-console": "warn",
21+
"no-use-before-define": ["error", { "functions": false, "classes": true, "variables": true }]
22+
}
23+
}

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
## PR Checklist
2+
23
- [ ] Linked issue added (e.g., `Fixes #123`)
34
- [ ] If styles were updated:
45
- [ ] Stylesheet version has been bumped
56

67
## Summary
8+
79
<!-- What has been updated and why -->

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
Network Trash Folder
5555
Temporary Items
5656
.apdisk
57-
tmp
57+
tmp
58+
59+
# Node.js dependencies
60+
node_modules/
61+
package-lock.json
62+
yarn.lock

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,28 @@ Please refer to the instructions here: https://github.com/interledger/interledge
88

99
## Staging environment
1010

11-
We now have a [staging environment avilable](https://interledger-org-staging-395917053417.us-east1.run.app/). It is not fully functional yet, but we hope that this will form the backbone of how we will deploy the website in the future.
11+
We now have a [staging environment avilable](https://interledger-org-staging-395917053417.us-east1.run.app/). It is not fully functional yet, but we hope that this will form the backbone of how we will deploy the website in the future.
1212

1313
The staging environment runs as a [Google Cloud Run based container](https://console.cloud.google.com/run/detail/us-east1/interledger-org-staging/observability/metrics?hl=en&project=interledger-websites).
14+
1415
- The `files` folder is mounted in from a GCS bucket called `interledger-org-staging-bucket`
1516
- The GCP project called `interledger-websites` and access is required if developers want to make changes here.
1617
- If you have the appropriate access you can manipulate the files folder directly on there, or you can use the [gsutil utility](https://cloud.google.com/storage/docs/gsutil_install) to upload or download files
17-
from and to the bucket.
18+
from and to the bucket.
1819
- The Database lives in a MySQL Cloud SQL instance and should be managed directly through Google Cloud SQL Studio. Databases can be imported and exported from there.
1920

2021
Pipelines for Github Actions have been configured to automatically create a new container containing the drupal modifications on any merge to main.
2122

2223
Known issues
24+
2325
- At this point in time, the developer portal is not correctly being patched in for the staging environment.
2426

2527
Uploading new files to the staging bucket. For this to work you should be authenticated into Google Cloud.
28+
2629
```sh
2730
# Upload files to the staging environment
2831
gsutil -m cp -r files/* gs://interledger-org-staging-bucket/files
2932

3033
# Download to local
3134
gsutil -m cp -r gs://interledger-org-staging-bucket/files files
3235
```
33-

biome.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.6/schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"indentStyle": "space",
6+
"indentWidth": 2,
7+
"lineWidth": 100
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true
13+
}
14+
},
15+
"javascript": {
16+
"formatter": {
17+
"quoteStyle": "double",
18+
"semicolons": "always",
19+
"trailingCommas": "none",
20+
"jsxQuoteStyle": "double"
21+
}
22+
},
23+
"files": {
24+
"includes": [
25+
"**/*.{js,jsx,ts,tsx,json}",
26+
"!**/node_modules",
27+
"!**/vendor",
28+
"!**/web/core",
29+
"!**/web/modules/contrib",
30+
"!**/web/themes/contrib",
31+
"!**/web/profiles/contrib",
32+
"!**/*.min.js",
33+
"!**/*.bundle.js"
34+
]
35+
}
36+
}

composer.json

Lines changed: 101 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,108 @@
11
{
2-
"name": "drupal/recommended-project",
3-
"description": "Project template for Drupal projects with a relocated document root",
4-
"type": "project",
5-
"license": "GPL-2.0-or-later",
6-
"homepage": "https://www.drupal.org/project/drupal",
7-
"support": {
8-
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
9-
"chat": "https://www.drupal.org/node/314178"
2+
"name": "drupal/recommended-project",
3+
"description": "Project template for Drupal projects with a relocated document root",
4+
"type": "project",
5+
"license": "GPL-2.0-or-later",
6+
"homepage": "https://www.drupal.org/project/drupal",
7+
"support": {
8+
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
9+
"chat": "https://www.drupal.org/node/314178"
10+
},
11+
"repositories": [
12+
{
13+
"type": "composer",
14+
"url": "https://packages.drupal.org/8"
15+
}
16+
],
17+
"require": {
18+
"composer/installers": "^2.3",
19+
"cweagans/composer-patches": "~1.0",
20+
"drupal/admin_toolbar": "^3.6.2",
21+
"drupal/conditional_fields": "4.0.0-alpha6",
22+
"drupal/core-composer-scaffold": "^11.1",
23+
"drupal/core-project-message": "^11.1",
24+
"drupal/core-recommended": "^10.4.3",
25+
"drupal/ds": "^3.30.0",
26+
"drupal/entity_block": "^2.0",
27+
"drupal/feeds": "^3.0",
28+
"drupal/feeds_ex": "^1.0@beta",
29+
"drupal/feeds_tamper": "^2.0@beta",
30+
"drupal/honeypot": "^2.2",
31+
"drupal/layout_builder_admin_theme": "^2.0",
32+
"drupal/metatag": "^2.2.0",
33+
"drupal/paragraphs": "^1.19.0",
34+
"drupal/pathauto": "^1.14.0",
35+
"drupal/redirect": "^1.12.0",
36+
"drupal/rename_admin_paths": "^3.0@beta",
37+
"drupal/securitytxt": "^1.4",
38+
"drupal/svg_image_field": "^2.3",
39+
"drupal/tamper": "1.0.0-beta1",
40+
"drupal/token": "^1.16",
41+
"drupal/twig_tweak": "^3.4.1",
42+
"drupal/webform": "^6.2.9",
43+
"drupal/weight": "^3.6",
44+
"drush/drush": "^13.6.2"
45+
},
46+
"conflict": {
47+
"drupal/drupal": "*"
48+
},
49+
"minimum-stability": "stable",
50+
"prefer-stable": true,
51+
"config": {
52+
"allow-plugins": {
53+
"composer/installers": true,
54+
"drupal/core-composer-scaffold": true,
55+
"drupal/core-project-message": true,
56+
"phpstan/extension-installer": true,
57+
"dealerdirect/phpcodesniffer-composer-installer": true,
58+
"cweagans/composer-patches": true
59+
},
60+
"sort-packages": true
61+
},
62+
"extra": {
63+
"enable-patching": true,
64+
"composer-exit-on-patch-failure": true,
65+
"patchLevel": {
66+
"drupal/core": "-p2"
1067
},
11-
"repositories": [
12-
{
13-
"type": "composer",
14-
"url": "https://packages.drupal.org/8"
15-
}
16-
],
17-
"require": {
18-
"composer/installers": "^2.3",
19-
"cweagans/composer-patches": "~1.0",
20-
"drupal/admin_toolbar": "^3.6.2",
21-
"drupal/conditional_fields": "4.0.0-alpha6",
22-
"drupal/core-composer-scaffold": "^11.1",
23-
"drupal/core-project-message": "^11.1",
24-
"drupal/core-recommended": "^10.4.3",
25-
"drupal/ds": "^3.30.0",
26-
"drupal/entity_block": "^2.0",
27-
"drupal/feeds": "^3.0",
28-
"drupal/feeds_ex": "^1.0@beta",
29-
"drupal/feeds_tamper": "^2.0@beta",
30-
"drupal/honeypot": "^2.2",
31-
"drupal/layout_builder_admin_theme": "^2.0",
32-
"drupal/metatag": "^2.2.0",
33-
"drupal/paragraphs": "^1.19.0",
34-
"drupal/pathauto": "^1.14.0",
35-
"drupal/redirect": "^1.12.0",
36-
"drupal/rename_admin_paths": "^3.0@beta",
37-
"drupal/securitytxt": "^1.4",
38-
"drupal/svg_image_field": "^2.3",
39-
"drupal/tamper": "1.0.0-beta1",
40-
"drupal/token": "^1.16",
41-
"drupal/twig_tweak": "^3.4.1",
42-
"drupal/webform": "^6.2.9",
43-
"drupal/weight": "^3.6",
44-
"drush/drush": "^13.6.2"
68+
"patches": {
69+
"drupal/core": {
70+
"[PP-1] Use hook_theme_suggestions in views": "https://www.drupal.org/files/issues/2023-06-12/2923634-92.patch"
71+
}
4572
},
46-
"conflict": {
47-
"drupal/drupal": "*"
73+
"drupal-scaffold": {
74+
"locations": {
75+
"web-root": "web/"
76+
}
4877
},
49-
"minimum-stability": "stable",
50-
"prefer-stable": true,
51-
"config": {
52-
"allow-plugins": {
53-
"composer/installers": true,
54-
"drupal/core-composer-scaffold": true,
55-
"drupal/core-project-message": true,
56-
"phpstan/extension-installer": true,
57-
"dealerdirect/phpcodesniffer-composer-installer": true,
58-
"cweagans/composer-patches": true
59-
},
60-
"sort-packages": true
78+
"installer-paths": {
79+
"web/core": ["type:drupal-core"],
80+
"web/libraries/{$name}": ["type:drupal-library"],
81+
"web/modules/contrib/{$name}": ["type:drupal-module"],
82+
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
83+
"web/themes/contrib/{$name}": ["type:drupal-theme"],
84+
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
85+
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
86+
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
87+
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
6188
},
62-
"extra": {
63-
"enable-patching": true,
64-
"composer-exit-on-patch-failure": true,
65-
"patchLevel": {
66-
"drupal/core": "-p2"
67-
},
68-
"patches": {
69-
"drupal/core": {
70-
"[PP-1] Use hook_theme_suggestions in views": "https://www.drupal.org/files/issues/2023-06-12/2923634-92.patch"
71-
}
72-
},
73-
"drupal-scaffold": {
74-
"locations": {
75-
"web-root": "web/"
76-
}
77-
},
78-
"installer-paths": {
79-
"web/core": [
80-
"type:drupal-core"
81-
],
82-
"web/libraries/{$name}": [
83-
"type:drupal-library"
84-
],
85-
"web/modules/contrib/{$name}": [
86-
"type:drupal-module"
87-
],
88-
"web/profiles/contrib/{$name}": [
89-
"type:drupal-profile"
90-
],
91-
"web/themes/contrib/{$name}": [
92-
"type:drupal-theme"
93-
],
94-
"drush/Commands/contrib/{$name}": [
95-
"type:drupal-drush"
96-
],
97-
"web/modules/custom/{$name}": [
98-
"type:drupal-custom-module"
99-
],
100-
"web/profiles/custom/{$name}": [
101-
"type:drupal-custom-profile"
102-
],
103-
"web/themes/custom/{$name}": [
104-
"type:drupal-custom-theme"
105-
]
106-
},
107-
"drupal-core-project-message": {
108-
"include-keys": [
109-
"homepage",
110-
"support"
111-
],
112-
"post-create-project-cmd-message": [
113-
"<bg=blue;fg=white> </>",
114-
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
115-
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
116-
"<bg=blue;fg=white> </>",
117-
"",
118-
"<bg=yellow;fg=black>Next steps</>:",
119-
" * Install the site: https://www.drupal.org/docs/installing-drupal",
120-
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
121-
" * Get support: https://www.drupal.org/support",
122-
" * Get involved with the Drupal community:",
123-
" https://www.drupal.org/getting-involved",
124-
" * Remove the plugin that prints this message:",
125-
" composer remove drupal/core-project-message"
126-
]
127-
}
89+
"drupal-core-project-message": {
90+
"include-keys": ["homepage", "support"],
91+
"post-create-project-cmd-message": [
92+
"<bg=blue;fg=white> </>",
93+
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
94+
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
95+
"<bg=blue;fg=white> </>",
96+
"",
97+
"<bg=yellow;fg=black>Next steps</>:",
98+
" * Install the site: https://www.drupal.org/docs/installing-drupal",
99+
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
100+
" * Get support: https://www.drupal.org/support",
101+
" * Get involved with the Drupal community:",
102+
" https://www.drupal.org/getting-involved",
103+
" * Remove the plugin that prints this message:",
104+
" composer remove drupal/core-project-message"
105+
]
128106
}
107+
}
129108
}

0 commit comments

Comments
 (0)