Skip to content

Commit 8b8b21f

Browse files
committed
ci(lint): lint all js files and ignore dist
1 parent 42e9851 commit 8b8b21f

File tree

9 files changed

+28
-21
lines changed

9 files changed

+28
-21
lines changed

.oxlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.oxlintrc.jsonc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@
4444
"max-lines-per-function": "off",
4545
"promise/prefer-await-to-callbacks": "off"
4646
}
47+
},
48+
{
49+
"files": [
50+
"commitlint.config.cjs"
51+
],
52+
"rules": {
53+
"eslint/no-magic-numbers": "off"
54+
}
55+
},
56+
{
57+
"files": [
58+
"release.config.cjs"
59+
],
60+
"rules": {
61+
"eslint/no-template-curly-in-string": "off"
62+
}
4763
}
4864
]
4965
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

dist/index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28663,7 +28663,7 @@ module.exports = {
2866328663

2866428664
/***/ }),
2866528665

28666-
/***/ 1113:
28666+
/***/ 7092:
2866728667
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2866828668

2866928669
const { EXIT_CODE_FAILURE } = __nccwpck_require__(461);
@@ -28705,14 +28705,11 @@ module.exports = ConsoleReporter;
2870528705

2870628706
/***/ }),
2870728707

28708-
/***/ 2294:
28708+
/***/ 1424:
2870928709
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2871028710

2871128711
const core = __nccwpck_require__(7484);
28712-
const {
28713-
HEADING_LEVEL_2,
28714-
escapeHtml,
28715-
} = __nccwpck_require__(461);
28712+
const { HEADING_LEVEL_2, escapeHtml } = __nccwpck_require__(461);
2871628713
class GitHubActionsReporter {
2871728714
async reportSuccess() {
2871828715
await core.summary
@@ -28782,9 +28779,8 @@ module.exports = GitHubActionsReporter;
2878228779
/***/ 3657:
2878328780
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2878428781

28785-
28786-
const ConsoleReporter = __nccwpck_require__(1113);
28787-
const GitHubActionsReporter = __nccwpck_require__(2294);
28782+
const ConsoleReporter = __nccwpck_require__(7092);
28783+
const GitHubActionsReporter = __nccwpck_require__(1424);
2878828784

2878928785
module.exports = {
2879028786
ConsoleReporter,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
},
1515
"scripts": {
1616
"build": "ncc build index.js --license licenses.txt",
17-
"lint": "oxlint --config .oxlintrc.jsonc --max-warnings 0 *.js && prettier --check *.js",
18-
"lint:fix": "oxlint --config .oxlintrc.jsonc --max-warnings 0 --fix --fix-suggestions *.js && prettier --write *.js",
17+
"lint": "oxlint --config .oxlintrc.jsonc --ignore-path=.oxlintignore --max-warnings 0 . && prettier --check \"**/*.js\"",
18+
"lint:fix": "oxlint --config .oxlintrc.jsonc --ignore-path=.oxlintignore --max-warnings 0 --fix --fix-suggestions . && prettier --write \"**/*.js\"",
1919
"start": "npm run build",
2020
"test": "jest",
2121
"test:coverage": "jest --coverage"

release.config.cjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
const { readFileSync } = require('node:fs');
2-
const path = require('node:path');
3-
41
module.exports = {
52
branches: [
63
'main',
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
const core = require('@actions/core');
2-
const {
3-
HEADING_LEVEL_2,
4-
escapeHtml,
5-
} = require('../constants');
2+
const { HEADING_LEVEL_2, escapeHtml } = require('../constants');
63
class GitHubActionsReporter {
74
async reportSuccess() {
85
await core.summary

reporters/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
2-
const ConsoleReporter = require('./ConsoleReporter');
3-
const GitHubActionsReporter = require('./GitHubActionsReporter');
1+
const ConsoleReporter = require('./console-reporter');
2+
const GitHubActionsReporter = require('./github-actions-reporter');
43

54
module.exports = {
65
ConsoleReporter,

0 commit comments

Comments
 (0)