[PR #4181] [MERGED] Added standard JS formatting via ESLint #6318

Closed
opened 2026-02-05 10:29:10 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4181
Author: @ssddanbrown
Created: 4/19/2023
Status: Merged
Merged: 4/20/2023
Merged by: @ssddanbrown

Base: developmentHead: js_formatting


📝 Commits (5)

  • 752ee66 Added code formatting standard via eslint
  • e711290 Ran eslint fix on existing codebase
  • 0519e58 ESLINT: Started inital pass at addressing issues
  • da3ae3b ESLINT: Addressed remaining detected issues
  • 9743906 ESLINT: Added GH action and details to dev docs

📊 Changes

110 files changed (+3174 additions, -1661 deletions)

View changed files

.github/workflows/lint-js.yml (+16 -0)
📝 dev/docs/development.md (+17 -1)
📝 package-lock.json (+1315 -5)
📝 package.json (+87 -1)
📝 resources/js/app.js (+15 -12)
📝 resources/js/code/index.mjs (+54 -55)
📝 resources/js/code/languages.js (+7 -8)
📝 resources/js/code/legacy-modes.mjs (+8 -4)
📝 resources/js/code/setups.js (+11 -7)
📝 resources/js/code/simple-editor-interface.js (+6 -5)
📝 resources/js/code/themes.js (+94 -54)
📝 resources/js/code/views.js (+5 -5)
📝 resources/js/components/add-remove-rows.js (+8 -6)
📝 resources/js/components/ajax-delete-row.js (+6 -4)
📝 resources/js/components/ajax-form.js (+5 -5)
📝 resources/js/components/attachments-list.js (+7 -6)
📝 resources/js/components/attachments.js (+4 -4)
📝 resources/js/components/auto-submit.js (+2 -2)
📝 resources/js/components/auto-suggest.js (+11 -10)
📝 resources/js/components/back-to-top.js (+10 -10)

...and 80 more files

📄 Description

Closes #4180

Todo

  • Fix existing 577 reported issues 😟
  • Add details of new linting NPM scripts/commands to dev docs
  • Add to actions (Maybe existing PHP lint action)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4181 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 4/19/2023 **Status:** ✅ Merged **Merged:** 4/20/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `js_formatting` --- ### 📝 Commits (5) - [`752ee66`](https://github.com/BookStackApp/BookStack/commit/752ee664c24ccb928cddf0f4e1ba9ea3e7a8817a) Added code formatting standard via eslint - [`e711290`](https://github.com/BookStackApp/BookStack/commit/e711290d8b1ce06b38e0560248806e8de2077870) Ran eslint fix on existing codebase - [`0519e58`](https://github.com/BookStackApp/BookStack/commit/0519e58fbf4e0da0ee42e1954dd159755ee1718c) ESLINT: Started inital pass at addressing issues - [`da3ae3b`](https://github.com/BookStackApp/BookStack/commit/da3ae3ba8b47800058f8613b2608a4084d64eb43) ESLINT: Addressed remaining detected issues - [`9743906`](https://github.com/BookStackApp/BookStack/commit/974390688d0e94f947322890b41fca4c6d3039b4) ESLINT: Added GH action and details to dev docs ### 📊 Changes **110 files changed** (+3174 additions, -1661 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/lint-js.yml` (+16 -0) 📝 `dev/docs/development.md` (+17 -1) 📝 `package-lock.json` (+1315 -5) 📝 `package.json` (+87 -1) 📝 `resources/js/app.js` (+15 -12) 📝 `resources/js/code/index.mjs` (+54 -55) 📝 `resources/js/code/languages.js` (+7 -8) 📝 `resources/js/code/legacy-modes.mjs` (+8 -4) 📝 `resources/js/code/setups.js` (+11 -7) 📝 `resources/js/code/simple-editor-interface.js` (+6 -5) 📝 `resources/js/code/themes.js` (+94 -54) 📝 `resources/js/code/views.js` (+5 -5) 📝 `resources/js/components/add-remove-rows.js` (+8 -6) 📝 `resources/js/components/ajax-delete-row.js` (+6 -4) 📝 `resources/js/components/ajax-form.js` (+5 -5) 📝 `resources/js/components/attachments-list.js` (+7 -6) 📝 `resources/js/components/attachments.js` (+4 -4) 📝 `resources/js/components/auto-submit.js` (+2 -2) 📝 `resources/js/components/auto-suggest.js` (+11 -10) 📝 `resources/js/components/back-to-top.js` (+10 -10) _...and 80 more files_ </details> ### 📄 Description Closes #4180 ### Todo - [x] Fix existing 577 reported issues :worried: - [x] Add details of new linting NPM scripts/commands to dev docs - [x] Add to actions (Maybe existing PHP lint action) ### Handy Links - [Airbnb Style Guide](https://github.com/airbnb/javascript#table-of-contents) - (Base style for our formatting) - [ESLint rule list](https://eslint.org/docs/latest/rules/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:29:10 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6318