build: Use prettier for javascript

Stop ignoring .js and .json files in prettier and fix existing issues.

The `prettier-plugin-multiline-arrays` plugin is used to split arrays
with multiple elements into one line per element.
This commit is contained in:
Ralph Hopman
2024-12-19 10:19:28 +01:00
committed by Adam Saghy
parent 2ec9ba81d6
commit f693318c2e
25 changed files with 7770 additions and 7608 deletions
+9 -6
View File
@@ -4,15 +4,16 @@ const { writeFileSync } = require('fs-extra');
const moment = require('moment');
const gitInfo = gitDescribeSync({
dirtyMark: false,
dirtySemver: false
dirtyMark: false,
dirtySemver: false
});
gitInfo.version = moment().format('YYMMDD');;
gitInfo.version = moment().format('YYMMDD');
const file = resolve(__dirname, '.', 'src', 'environments', '.env.ts');
writeFileSync(file,
`// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
writeFileSync(
file,
`// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
/* tslint:disable */
export default {
'mifos_x': {
@@ -22,6 +23,8 @@ export default {
'allow_switching_backend_instance': true
};
/* tslint:enable */
`, { encoding: 'utf-8' });
`,
{ encoding: 'utf-8' }
);
console.log(`Wrote version info ${gitInfo.raw} to ${relative(resolve(__dirname, '..'), file)}`);