Skip to content

Commit 066c6cc

Browse files
fix: super-linter - .env and javascript_standard
1 parent 8f62280 commit 066c6cc

File tree

4 files changed

+37
-37
lines changed

4 files changed

+37
-37
lines changed

.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# It will force the user to add an e-mail for this project, before committing.
2-
COMMIT_MAIL=[email protected]
2+
COMMIT_MAIL=[email protected]

.github/workflows/linter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ jobs:
3232
VALIDATE_CHECKOV: false
3333
VALIDATE_JSCPD: false
3434
VALIDATE_KOTLIN: false
35+
VALIDATE_JAVASCRIPT_PRETTIER: false
3536
VALIDATE_JSON_PRETTIER: false
3637
VALIDATE_MARKDOWN_PRETTIER: false
3738
VALIDATE_YAML_PRETTIER: false
39+
VALIDATE_BASH_EXEC: false
3840

3941
- name: Set up JDK
4042
uses: actions/[email protected]

scripts/check-commit-mail.js

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
#!/usr/bin/env node
2-
import * as ChildProcess from 'node:child_process';
3-
import * as process from 'node:process';
2+
import * as ChildProcess from 'node:child_process'
3+
import * as process from 'node:process'
44

55
const checkCommitMail = () => {
6-
console.warn(`Check COMMIT_MAIL`);
7-
if (!process.env.COMMIT_MAIL) {
8-
console.error(
9-
`No COMMIT_MAIL set in .env, please take a look at the file '.env.template'`
10-
);
11-
process.exit(1);
12-
}
6+
console.warn('Check COMMIT_MAIL')
7+
if (!process.env.COMMIT_MAIL) {
8+
console.error(
9+
"No COMMIT_MAIL set in .env, please take a look at the file '.env.template'"
10+
)
11+
process.exit(1)
12+
}
1313

14-
const currentMail = ChildProcess.execSync('git config user.email')
15-
.toString()
16-
.trim()
17-
.toLowerCase();
18-
const commitMail = process.env.COMMIT_MAIL.trim().toLowerCase();
19-
if (currentMail !== commitMail) {
20-
console.error(
21-
`currentMail: ${currentMail} !== initialMail: ${commitMail}`
22-
);
23-
console.error(
24-
`Please set your commit user mail for this project like: 'git config user.email '${commitMail}''`
25-
);
26-
process.exit(1);
27-
}
28-
};
14+
const currentMail = ChildProcess.execSync('git config user.email')
15+
.toString()
16+
.trim()
17+
.toLowerCase()
18+
const commitMail = process.env.COMMIT_MAIL.trim().toLowerCase()
19+
if (currentMail !== commitMail) {
20+
console.error(`currentMail: ${currentMail} !== initialMail: ${commitMail}`)
21+
console.error(
22+
`Please set your commit user mail for this project like: 'git config user.email '${commitMail}'`
23+
)
24+
process.exit(1)
25+
}
26+
}
2927

30-
checkCommitMail();
28+
checkCommitMail()

scripts/validate-branch-name.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#!/usr/bin/env node
2-
import * as ChildProcess from 'node:child_process';
3-
import * as process from 'node:process';
2+
import * as ChildProcess from 'node:child_process'
3+
import * as process from 'node:process'
44

55
const checkValidBranchName = () => {
6-
console.warn(`Check VALID_BRANCH_NAME`);
6+
console.warn('Check VALID_BRANCH_NAME')
77

8-
const currentBranchName = ChildProcess.execSync('git symbolic-ref --short HEAD')
9-
.toString()
10-
.trim()
8+
const currentBranchName = ChildProcess.execSync('git symbolic-ref --short HEAD')
9+
.toString()
10+
.trim()
1111

12-
const regex = /^(feature|fix|hotfix|release)\/.+$/g;
13-
const found = currentBranchName.match(regex) !== null;
14-
process.exit(found ? 0 : 1);
15-
};
12+
const regex = /^(feature|fix|hotfix|release)\/.+$/g
13+
const found = currentBranchName.match(regex) !== null
14+
process.exit(found ? 0 : 1)
15+
}
1616

17-
checkValidBranchName();
17+
checkValidBranchName()

0 commit comments

Comments
 (0)