Problem: JS files in root /js/ are ignored by Prettier
Current Behavior
Steps to reproduce the behavior
- Run the following command:
npm run check-format -- --loglevel debug - Note the only files checked by prettier are
webpack.config.jsand Javascript + Sass files inplugins/arDominionB5Plugin. None of the files in the root/js/directory are picked up by prettier.
If you go back to a previous release, e.g., 2.9, and run this same command you'll see all the files in arDominionB5Plugin/js/ get picked up, but it looks like those were moved to the root of the repository when BS2 themes were deprecated. The prettier ignore file wasn't updated to reflect the files being moved.
Expected Behavior
Javascript files in the root /js/ directory should be checked when running Prettier.
My reasoning is that since plugins/arDominionB5Plugin/js/main.js imports the code from the root /js/ directory, those files should be checked for formatting.
Possible Solution
Add this line to .prettierignore:
!/js
And fix Prettier issues in /js/.
Context and Notes
The syntax-checks workflow is allowing non-formatted Javascript code in /js/.
Version used
AtoM 2.10 (latest qa/2.x)
Operating System and version
Docker (php:8.3-fpm-alpine)
Default installation culture
en
PHP version
PHP 8.3
Contact details
No response