Skip to content

Commit 5287a75

Browse files
authored
move .eslintrc.js to .eslintrc to fix issues... (redhat-developer#1233)
* move .eslintrc.js to .eslintrc to fix issues with using import in .mjs files Signed-off-by: Nick Boldt <[email protected]> remove eslint-disable now that we can use it for .mjs modules Signed-off-by: Nick Boldt <[email protected]> * switch to Paul's solution for removing millis; allow prettier to run on ./scripts/*.mjs now that the eslint config is fixed Signed-off-by: Nick Boldt <[email protected]> --------- Signed-off-by: Nick Boldt <[email protected]>
1 parent dd858d2 commit 5287a75

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.eslintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"root": true,
3+
"parserOptions": {
4+
"ecmaVersion": "latest",
5+
"sourceType": "module"
6+
}
7+
}

.eslintrc.js

-3
This file was deleted.

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npm run lint-staged
54
npm run versions:metadata
5+
npm run lint-staged

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ coverage
55
*.yaml
66
.yarn
77
packages/app/src/build-metadata.json
8-
scripts/update-backstage.mjs

packages/app/src/build-metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"card": [
44
"RHDH Version: 1.2.0",
55
"Backstage Version: 1.25.2",
6-
"Last Commit: 2024-05-03T14:19:20Z"
6+
"Last Commit: 2024-05-06T13:23:08Z"
77
]
88
}

scripts/update-backstage.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/* eslint-disable */
21
import glob from 'glob';
32
import { execSync } from 'node:child_process';
43
import { existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
54
import { dirname, join } from 'node:path';
65
import { fileURLToPath } from 'node:url';
76
import semver from 'semver';
8-
import { updateBuildMetadata } from './update-metadata.mjs'
7+
import { updateBuildMetadata } from './update-metadata.mjs';
98

109
const __filename = fileURLToPath(import.meta.url);
1110
const __dirname = dirname(__filename);

scripts/update-metadata.mjs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable */
2-
import { execSync } from 'node:child_process';
31
import { readFileSync, writeFileSync } from 'node:fs';
42
import { dirname, join } from 'node:path';
53
import { fileURLToPath } from 'node:url';
@@ -28,8 +26,8 @@ export function updateBuildMetadata(backstageVersion) {
2826
readFileSync('package.json', 'utf8'),
2927
).version.toString();
3028

31-
const commitTime = new Date().toISOString() // 2024-05-03T12:12:08.174Z
32-
29+
const commitTime = new Date().toISOString().slice(0, -5) + 'Z'; // eg., 2024-05-03T12:12:08Z
30+
3331
const card = [
3432
`RHDH Version: ${rhdhVersion}`,
3533
`Backstage Version: ${backstageVersion}`,

0 commit comments

Comments
 (0)