pr-checkmate 1.19.9 → 1.19.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -36
- package/cspell.json +31 -2
- package/dist/index.js +1 -3
- package/dist/init.js +16 -1
- package/package.json +10 -3
- package/src/config/.eslintignore +72 -0
- package/src/config/.prettierrc +8 -0
- package/src/config/cspell.json +75 -0
- package/src/config/eslint.config.mjs +140 -0
- package/src/config/pr-checkmate-workflow.yml +147 -0
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/config/config.d.ts +0 -3
- package/dist/config/config.d.ts.map +0 -1
- package/dist/config/constants.d.ts +0 -33
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/index.d.ts +0 -24
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/loader.d.ts +0 -15
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.d.ts.map +0 -1
- package/dist/init.d.ts +0 -3
- package/dist/init.d.ts.map +0 -1
- package/dist/interfaces/index.d.ts +0 -52
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/scripts/copy-configs.d.ts +0 -3
- package/dist/scripts/copy-configs.d.ts.map +0 -1
- package/dist/scripts/dependency-check.d.ts +0 -5
- package/dist/scripts/dependency-check.d.ts.map +0 -1
- package/dist/scripts/index.d.ts +0 -7
- package/dist/scripts/index.d.ts.map +0 -1
- package/dist/scripts/lint.d.ts +0 -2
- package/dist/scripts/lint.d.ts.map +0 -1
- package/dist/scripts/npm-audit.d.ts +0 -5
- package/dist/scripts/npm-audit.d.ts.map +0 -1
- package/dist/scripts/prettier-autoformat.d.ts +0 -2
- package/dist/scripts/prettier-autoformat.d.ts.map +0 -1
- package/dist/scripts/publish-github.d.ts +0 -2
- package/dist/scripts/publish-github.d.ts.map +0 -1
- package/dist/scripts/security.d.ts +0 -5
- package/dist/scripts/security.d.ts.map +0 -1
- package/dist/scripts/spellcheck.d.ts +0 -2
- package/dist/scripts/spellcheck.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -19
- package/dist/utils/logger.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# ♟️ PR CheckMate
|
|
7
|
-
> **PR CheckMate** is an npm package for automating Pull Request checks.
|
|
7
|
+
> **PR CheckMate** is an npm package for automating Pull Request checks.
|
|
8
8
|
> It helps teams maintain code quality by automatically validating linting, formatting, dependencies, and spelling before merging to `main`.
|
|
9
9
|
|
|
10
10
|
## 🔍 Why PR CheckMate?
|
|
11
|
-
* ✅ Automatic checks on every PR without extra setup.
|
|
12
|
-
* ✅ No need to install ESLint, Prettier, or cspell in your project — all included.
|
|
13
|
-
* ✅ Enforces a unified code style across repositories.
|
|
14
|
-
* ✅ Checks `package.json` / `package-lock.json` for dependency changes.
|
|
15
|
-
* ✅ Spellcheck for code, documentation, and JSON files.
|
|
11
|
+
* ✅ Automatic checks on every PR without extra setup.
|
|
12
|
+
* ✅ No need to install ESLint, Prettier, or cspell in your project — all included.
|
|
13
|
+
* ✅ Enforces a unified code style across repositories.
|
|
14
|
+
* ✅ Checks `package.json` / `package-lock.json` for dependency changes.
|
|
15
|
+
* ✅ Spellcheck for code, documentation, and JSON files with multilingual support (EN, RU, UK, HE, FR).
|
|
16
16
|
* ✅ Package Vulnerabilities Check
|
|
17
|
-
* ✅ Scans for secrets using
|
|
17
|
+
* ✅ Scans for secrets using gitleaks
|
|
18
18
|
|
|
19
19
|
<br>
|
|
20
20
|
> ⚠️ **Note:** Currently, PR CheckMate only supports **Node.js projects**.
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
- [PR CheckMate](https://www.npmjs.com/package/pr-checkmate) – Zero-config CLI that automates ESLint, Prettier, spellcheck, dependency checks, and npm audit for pull requests.
|
|
24
24
|
|
|
25
25
|
## 🚀 Zero-Config by Default
|
|
26
|
-
You don
|
|
26
|
+
You don't need to install or configure:
|
|
27
27
|
- ESLint
|
|
28
28
|
- Prettier
|
|
29
|
-
- cspell
|
|
29
|
+
- cspell (with multilingual dictionaries)
|
|
30
30
|
- Security scanning tools
|
|
31
31
|
|
|
32
32
|
> Everything works out of the box.
|
|
@@ -47,7 +47,7 @@ User configuration is stored in:
|
|
|
47
47
|
<br>
|
|
48
48
|
|
|
49
49
|
### ⚙️ Example: pr-checkmate.json
|
|
50
|
-
```
|
|
50
|
+
```json
|
|
51
51
|
{
|
|
52
52
|
"sourcePath": "src",
|
|
53
53
|
"commands": {
|
|
@@ -91,77 +91,130 @@ npm install --save-dev pr-checkmate
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
### 2. Initialize
|
|
94
|
-
```
|
|
94
|
+
```bash
|
|
95
95
|
npx pr-checkmate init
|
|
96
96
|
```
|
|
97
|
-
> This creates
|
|
97
|
+
> This creates:
|
|
98
|
+
> - `pr-checkmate.json` - Configuration file where you can specify the source code path and customize rules
|
|
99
|
+
> - `.github/workflows/pr-checkmate.yml` - GitHub Actions workflow for automated PR checks with auto-commit support
|
|
98
100
|
|
|
99
101
|
### 3. Run Checks
|
|
100
|
-
```
|
|
102
|
+
```bash
|
|
101
103
|
npx pr-checkmate <job>
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
#### ⚡ Jobs
|
|
105
107
|
| Job | Description |
|
|
106
108
|
|------------|-------------|
|
|
107
|
-
| `all` | Run all checks: ESLint, dependency check, Prettier, spellcheck |
|
|
109
|
+
| `all` | Run all checks: ESLint, dependency check, Prettier, spellcheck, security scan |
|
|
108
110
|
| `lint` | Lint code using ESLint |
|
|
109
111
|
| `prettier` | Format code using Prettier |
|
|
110
112
|
| `deps` | Check project dependencies |
|
|
111
113
|
| `security` | Run security scan for secrets |
|
|
112
|
-
| `spellcheck` | Run spellcheck via cspell |
|
|
114
|
+
| `spellcheck` | Run spellcheck via cspell (supports EN, RU, UK, HE, FR) |
|
|
113
115
|
| `audit` | Run `npm audit --audit-level=moderate` to check for vulnerable packages |
|
|
114
116
|
|
|
115
117
|
<br>
|
|
116
118
|
|
|
117
|
-
##
|
|
119
|
+
## 🤖 GitHub Actions Workflow (Auto-Generated)
|
|
120
|
+
|
|
121
|
+
When you run `npx pr-checkmate init`, it automatically creates `.github/workflows/pr-checkmate.yml`:
|
|
118
122
|
|
|
119
123
|
```yaml
|
|
120
|
-
name: PR
|
|
124
|
+
name: PR Checkmate Quality Checks
|
|
121
125
|
|
|
122
126
|
on:
|
|
123
127
|
pull_request:
|
|
128
|
+
branches: [main, master, develop]
|
|
129
|
+
types: [opened, synchronize, reopened]
|
|
130
|
+
|
|
131
|
+
permissions:
|
|
132
|
+
contents: write
|
|
133
|
+
pull-requests: write
|
|
124
134
|
|
|
125
135
|
jobs:
|
|
126
|
-
pr-
|
|
136
|
+
pr-checkmate-all:
|
|
137
|
+
name: PR Checkmate All Checks
|
|
127
138
|
runs-on: ubuntu-latest
|
|
128
139
|
steps:
|
|
129
|
-
- name:
|
|
140
|
+
- name: Checkout code
|
|
130
141
|
uses: actions/checkout@v4
|
|
131
142
|
with:
|
|
143
|
+
ref: ${{ github.head_ref }}
|
|
132
144
|
fetch-depth: 0
|
|
133
|
-
|
|
134
|
-
- name:
|
|
145
|
+
|
|
146
|
+
- name: Setup Node.js
|
|
135
147
|
uses: actions/setup-node@v4
|
|
136
148
|
with:
|
|
137
149
|
node-version: 20
|
|
138
|
-
|
|
139
|
-
- name:
|
|
150
|
+
|
|
151
|
+
- name: Install dependencies
|
|
140
152
|
run: npm ci
|
|
141
|
-
|
|
142
|
-
- name:
|
|
153
|
+
|
|
154
|
+
- name: Run PR Checkmate All Checks
|
|
143
155
|
run: npx pr-checkmate all
|
|
156
|
+
continue-on-error: true
|
|
157
|
+
|
|
158
|
+
- name: Auto-commit formatting changes
|
|
159
|
+
run: |
|
|
160
|
+
git config user.name "github-actions[bot]"
|
|
161
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
162
|
+
git add -A
|
|
163
|
+
if ! git diff --cached --quiet; then
|
|
164
|
+
git commit -m "style: auto-format code with Prettier"
|
|
165
|
+
git push origin HEAD:${{ github.head_ref }}
|
|
166
|
+
echo "Formatting changes committed and pushed"
|
|
167
|
+
else
|
|
168
|
+
echo "No formatting changes needed"
|
|
169
|
+
fi
|
|
170
|
+
env:
|
|
171
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
144
172
|
```
|
|
145
|
-
> Fully automated process: no need to install ESLint, Prettier, or cspell in your repository.
|
|
146
173
|
|
|
174
|
+
### ⚙️ GitHub Actions Permissions
|
|
175
|
+
|
|
176
|
+
For the auto-commit feature to work, ensure your repository has the correct permissions:
|
|
177
|
+
|
|
178
|
+
1. Go to **Settings** → **Actions** → **General** → **Workflow permissions**
|
|
179
|
+
2. Select **"Read and write permissions"**
|
|
180
|
+
3. Save changes
|
|
181
|
+
|
|
182
|
+
> The workflow will automatically commit Prettier formatting fixes directly to your PR branch.
|
|
183
|
+
|
|
184
|
+
<br>
|
|
185
|
+
|
|
186
|
+
## 🌍 Multilingual Spellcheck Support
|
|
187
|
+
|
|
188
|
+
PR CheckMate includes built-in dictionaries for:
|
|
189
|
+
- 🇬🇧 English (en)
|
|
190
|
+
- 🇷🇺 Russian (ru)
|
|
191
|
+
- 🇺🇦 Ukrainian (uk)
|
|
192
|
+
- 🇮🇱 Hebrew (he)
|
|
193
|
+
- 🇫🇷 French (fr)
|
|
194
|
+
|
|
195
|
+
No additional configuration needed - just use `npx pr-checkmate spellcheck` and it will check spelling in all supported languages!
|
|
196
|
+
|
|
197
|
+
<br>
|
|
147
198
|
|
|
148
199
|
## 📌 Benefits
|
|
149
200
|
|
|
150
|
-
* ✅ Self-contained — the package handles all checks internally
|
|
151
|
-
* ✅ Works locally and in CI/CD (GitHub Actions, GitLab CI, etc.)
|
|
152
|
-
* ✅ Enforces a unified code style across repositories
|
|
153
|
-
* ✅ Automatic formatting and commits when needed
|
|
201
|
+
* ✅ Self-contained — the package handles all checks internally
|
|
202
|
+
* ✅ Works locally and in CI/CD (GitHub Actions, GitLab CI, etc.)
|
|
203
|
+
* ✅ Enforces a unified code style across repositories
|
|
204
|
+
* ✅ Automatic formatting and commits when needed
|
|
205
|
+
* ✅ Multilingual spellcheck support out of the box
|
|
154
206
|
* ✅ Minimal setup — just `init` and `npx pr-checkmate all`
|
|
155
207
|
|
|
156
208
|
|
|
157
209
|
## 🧰 Tech Stack
|
|
158
210
|
|
|
159
|
-
* **Node.js 20** — executes CLI scripts
|
|
160
|
-
* **TypeScript** — fully typed code
|
|
161
|
-
* **ESLint + @typescript-eslint** — code linting
|
|
162
|
-
* **Prettier** — auto-formatting
|
|
163
|
-
* **cspell** — spellchecking
|
|
164
|
-
* **execa** — running CLI commands from Node.js
|
|
211
|
+
* **Node.js 20** — executes CLI scripts
|
|
212
|
+
* **TypeScript** — fully typed code
|
|
213
|
+
* **ESLint + @typescript-eslint** — code linting
|
|
214
|
+
* **Prettier** — auto-formatting
|
|
215
|
+
* **cspell** — spellchecking with multilingual dictionaries
|
|
216
|
+
* **execa** — running CLI commands from Node.js
|
|
217
|
+
* **gitleaks** — secret scanning
|
|
165
218
|
|
|
166
219
|
|
|
167
220
|
## 📜 License
|
package/cspell.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.2",
|
|
3
|
-
"language": "en",
|
|
3
|
+
"language": "en,ru,uk,he,fr",
|
|
4
|
+
"import": [
|
|
5
|
+
"./node_modules/@cspell/dict-ru_ru/cspell-ext.json",
|
|
6
|
+
"./node_modules/@cspell/dict-uk-ua/cspell-ext.json",
|
|
7
|
+
"./node_modules/@cspell/dict-he/cspell-ext.json",
|
|
8
|
+
"./node_modules/@cspell/dict-fr-fr/cspell-ext.json"
|
|
9
|
+
],
|
|
4
10
|
"words": [
|
|
5
11
|
"Artur",
|
|
6
12
|
"Polishchuk",
|
|
@@ -20,7 +26,30 @@
|
|
|
20
26
|
"pycache",
|
|
21
27
|
"wdio",
|
|
22
28
|
"htmlcov",
|
|
23
|
-
"mochawesome"
|
|
29
|
+
"mochawesome",
|
|
30
|
+
"dont",
|
|
31
|
+
"appinstalled",
|
|
32
|
+
"beforeinstallprompt",
|
|
33
|
+
"nav",
|
|
34
|
+
"navs",
|
|
35
|
+
"pr",
|
|
36
|
+
"recaptcha",
|
|
37
|
+
"tsconfig",
|
|
38
|
+
"vite",
|
|
39
|
+
"vitejs",
|
|
40
|
+
"Mavox",
|
|
41
|
+
"sultansadikov",
|
|
42
|
+
"Appi",
|
|
43
|
+
"Validatable",
|
|
44
|
+
"Osek",
|
|
45
|
+
"Patur",
|
|
46
|
+
"Mursheh",
|
|
47
|
+
"Hevra",
|
|
48
|
+
"Baam",
|
|
49
|
+
"Amuta",
|
|
50
|
+
"Sachir",
|
|
51
|
+
"gitleaks",
|
|
52
|
+
"mybono"
|
|
24
53
|
],
|
|
25
54
|
"ignorePaths": [
|
|
26
55
|
"**/node_modules/**",
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.runNpmAudit = exports.runSecurityScan = exports.runSpellcheck = exports.runPrettier = exports.runDependencyCheck = exports.runLint = exports.hasLocalConfig = exports.getPackageConfigPath = exports.getSourcePath = void 0;
|
|
4
4
|
exports.runAllChecks = runAllChecks;
|
|
5
5
|
exports.runChecks = runChecks;
|
|
6
6
|
/**
|
|
@@ -55,5 +55,3 @@ async function runChecks(config = {}) {
|
|
|
55
55
|
if (!config.skipFormat && config.autoCommit)
|
|
56
56
|
await (0, prettier_autoformat_1.runPrettier)();
|
|
57
57
|
}
|
|
58
|
-
var utils_1 = require("./utils");
|
|
59
|
-
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return utils_1.logger; } });
|
package/dist/init.js
CHANGED
|
@@ -60,8 +60,23 @@ async function init() {
|
|
|
60
60
|
};
|
|
61
61
|
fs_1.default.writeFileSync(exports.CONFIG_FILE, JSON.stringify(config, null, 2));
|
|
62
62
|
utils_1.logger.info(`[init]: ✅ Created pr-checkmate.json with sourcePath: ${sourcePath}`);
|
|
63
|
-
utils_1.logger.info(`[init]: 💡 You can now customize ESLint rules, Prettier settings,
|
|
63
|
+
utils_1.logger.info(`[init]: 💡 You can now customize ESLint rules, Prettier settings,
|
|
64
64
|
and cspell words in pr-checkmate.json`);
|
|
65
|
+
// Copy workflow file to .github/workflows/
|
|
66
|
+
const workflowSource = path_1.default.join(__dirname, 'config', 'pr-checkmate-workflow.yml');
|
|
67
|
+
const workflowDir = path_1.default.join(root, '.github', 'workflows');
|
|
68
|
+
const workflowDest = path_1.default.join(workflowDir, 'pr-checkmate.yml');
|
|
69
|
+
if (fs_1.default.existsSync(workflowSource)) {
|
|
70
|
+
if (!fs_1.default.existsSync(workflowDir)) {
|
|
71
|
+
fs_1.default.mkdirSync(workflowDir, { recursive: true });
|
|
72
|
+
}
|
|
73
|
+
fs_1.default.copyFileSync(workflowSource, workflowDest);
|
|
74
|
+
utils_1.logger.info('[init]: ✅ Created .github/workflows/pr-checkmate.yml');
|
|
75
|
+
utils_1.logger.info('[init]: 🚀 GitHub Actions workflow is ready for your PRs!');
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
utils_1.logger.warn('[init]: ⚠️ Workflow template not found, skipping workflow setup');
|
|
79
|
+
}
|
|
65
80
|
const tsconfigPath = path_1.default.join(root, 'tsconfig.json');
|
|
66
81
|
if (!fs_1.default.existsSync(tsconfigPath)) {
|
|
67
82
|
const newTsConfig = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-checkmate",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.19",
|
|
4
4
|
"description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"automation"
|
|
13
13
|
],
|
|
14
14
|
"main": "./dist/cli.js",
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
15
|
"type": "commonjs",
|
|
17
16
|
"bin": {
|
|
18
17
|
"pr-checkmate": "dist/cli.js"
|
|
@@ -25,6 +24,7 @@
|
|
|
25
24
|
".prettierrc",
|
|
26
25
|
".eslintignore",
|
|
27
26
|
"cspell.json",
|
|
27
|
+
"src/config/pr-checkmate-workflow.yml",
|
|
28
28
|
"LICENSE"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
"author": "Artur Polishchuk",
|
|
58
58
|
"license": "LicenseRef-Proprietary",
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"@cspell/dict-fr-fr": "^2.2.2",
|
|
61
|
+
"@cspell/dict-he": "^4.0.2",
|
|
62
|
+
"@cspell/dict-ru_ru": "^2.2.1",
|
|
63
|
+
"@cspell/dict-uk-ua": "^4.0.0",
|
|
60
64
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
61
65
|
"@typescript-eslint/parser": "^8.47.0",
|
|
62
66
|
"cspell": "^9.3.2",
|
|
@@ -66,7 +70,7 @@
|
|
|
66
70
|
"eslint-plugin-import": "^2.29.0",
|
|
67
71
|
"eslint-plugin-prettier": "^5.5.4",
|
|
68
72
|
"execa": "^9.6.0",
|
|
69
|
-
"gitleaks-secret-scanner": "^1.
|
|
73
|
+
"gitleaks-secret-scanner": "^2.1.1",
|
|
70
74
|
"inquirer": "^13.0.1",
|
|
71
75
|
"prettier": ">=3.0.0",
|
|
72
76
|
"ts-node": "^10.9.1",
|
|
@@ -78,5 +82,8 @@
|
|
|
78
82
|
"peerDependencies": {
|
|
79
83
|
"eslint": ">=8.0.0",
|
|
80
84
|
"prettier": ">=3.0.0"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"tar": "^7.5.7"
|
|
81
88
|
}
|
|
82
89
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build outputs
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
out/
|
|
8
|
+
.next/
|
|
9
|
+
.nuxt/
|
|
10
|
+
|
|
11
|
+
# Test reports & artifacts
|
|
12
|
+
allure-report/
|
|
13
|
+
allure-results/
|
|
14
|
+
reports/
|
|
15
|
+
report/
|
|
16
|
+
test-reports/
|
|
17
|
+
test-report/
|
|
18
|
+
test-output/
|
|
19
|
+
test-results/
|
|
20
|
+
results/
|
|
21
|
+
result/
|
|
22
|
+
coverage/
|
|
23
|
+
.coverage/
|
|
24
|
+
htmlcov/
|
|
25
|
+
|
|
26
|
+
# Jest
|
|
27
|
+
jest-html-reporters-*/
|
|
28
|
+
jest-stare/
|
|
29
|
+
jest.config.js
|
|
30
|
+
|
|
31
|
+
# Cypress
|
|
32
|
+
cypress/reports/
|
|
33
|
+
cypress/videos/
|
|
34
|
+
cypress/screenshots/
|
|
35
|
+
|
|
36
|
+
# Playwright
|
|
37
|
+
playwright-report/
|
|
38
|
+
test-results/
|
|
39
|
+
|
|
40
|
+
# WebdriverIO
|
|
41
|
+
.wdio/
|
|
42
|
+
wdio-logs/
|
|
43
|
+
|
|
44
|
+
# Mocha/Mochawesome
|
|
45
|
+
mochawesome-report/
|
|
46
|
+
mochawesome-reports/
|
|
47
|
+
|
|
48
|
+
# Maven/JUnit
|
|
49
|
+
target/
|
|
50
|
+
|
|
51
|
+
# Logs
|
|
52
|
+
logs/
|
|
53
|
+
*.log
|
|
54
|
+
npm-debug.log*
|
|
55
|
+
yarn-debug.log*
|
|
56
|
+
|
|
57
|
+
# Python
|
|
58
|
+
__pycache__/
|
|
59
|
+
.pytest_cache/
|
|
60
|
+
.venv/
|
|
61
|
+
venv/
|
|
62
|
+
|
|
63
|
+
# Git
|
|
64
|
+
.git/
|
|
65
|
+
|
|
66
|
+
# Config files
|
|
67
|
+
*.config.js
|
|
68
|
+
*.config.ts
|
|
69
|
+
jest.config.*
|
|
70
|
+
wdio.config.*
|
|
71
|
+
playwright.config.*
|
|
72
|
+
cypress.config.*
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2",
|
|
3
|
+
"language": "en,ru,uk,he,fr",
|
|
4
|
+
"import": [
|
|
5
|
+
"./node_modules/@cspell/dict-ru_ru/cspell-ext.json",
|
|
6
|
+
"./node_modules/@cspell/dict-uk-ua/cspell-ext.json",
|
|
7
|
+
"./node_modules/@cspell/dict-he/cspell-ext.json",
|
|
8
|
+
"./node_modules/@cspell/dict-fr-fr/cspell-ext.json"
|
|
9
|
+
],
|
|
10
|
+
"words": [
|
|
11
|
+
"Artur",
|
|
12
|
+
"Polishchuk",
|
|
13
|
+
"uiautomator",
|
|
14
|
+
"UiAutomator2",
|
|
15
|
+
"checkmate",
|
|
16
|
+
"eslint",
|
|
17
|
+
"prettier",
|
|
18
|
+
"cspell",
|
|
19
|
+
"typescript",
|
|
20
|
+
"execa",
|
|
21
|
+
"playwright",
|
|
22
|
+
"pytest",
|
|
23
|
+
"creds",
|
|
24
|
+
"UITM",
|
|
25
|
+
"venv",
|
|
26
|
+
"pycache",
|
|
27
|
+
"wdio",
|
|
28
|
+
"htmlcov",
|
|
29
|
+
"mochawesome",
|
|
30
|
+
"dont",
|
|
31
|
+
"appinstalled",
|
|
32
|
+
"beforeinstallprompt",
|
|
33
|
+
"nav",
|
|
34
|
+
"navs",
|
|
35
|
+
"pr",
|
|
36
|
+
"recaptcha",
|
|
37
|
+
"tsconfig",
|
|
38
|
+
"vite",
|
|
39
|
+
"vitejs",
|
|
40
|
+
"Mavox",
|
|
41
|
+
"sultansadikov",
|
|
42
|
+
"Appi",
|
|
43
|
+
"Validatable",
|
|
44
|
+
"Osek",
|
|
45
|
+
"Patur",
|
|
46
|
+
"Mursheh",
|
|
47
|
+
"Hevra",
|
|
48
|
+
"Baam",
|
|
49
|
+
"Amuta",
|
|
50
|
+
"Sachir",
|
|
51
|
+
"gitleaks",
|
|
52
|
+
"mybono"
|
|
53
|
+
],
|
|
54
|
+
"ignorePaths": [
|
|
55
|
+
"**/node_modules/**",
|
|
56
|
+
"**/dist/**",
|
|
57
|
+
"**/.git/**",
|
|
58
|
+
"**/build/**",
|
|
59
|
+
"**/coverage/**",
|
|
60
|
+
"**/.next/**",
|
|
61
|
+
"**/.nuxt/**",
|
|
62
|
+
"**/out/**",
|
|
63
|
+
"**/__pycache__/**",
|
|
64
|
+
"**/.pytest_cache/**",
|
|
65
|
+
"**/.venv/**",
|
|
66
|
+
"**/venv/**",
|
|
67
|
+
"**/package-lock.json",
|
|
68
|
+
"**/yarn.lock",
|
|
69
|
+
"**/pnpm-lock.yaml",
|
|
70
|
+
"**/*.min.js",
|
|
71
|
+
"**/*.min.css"
|
|
72
|
+
],
|
|
73
|
+
"enableFiletypes": ["typescript", "javascript", "markdown", "json"],
|
|
74
|
+
"ignoreRegExpList": ["/https?:\\/\\/[^\\s]+/g", "/\\b[0-9a-f]{7,40}\\b/gi"]
|
|
75
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
4
|
+
import tsParser from '@typescript-eslint/parser';
|
|
5
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Default ESLint rules - can be exported for use in init.ts
|
|
9
|
+
*/
|
|
10
|
+
export const defaultRules = {
|
|
11
|
+
'no-console': 'warn',
|
|
12
|
+
'no-debugger': 'error',
|
|
13
|
+
'prefer-const': 'error',
|
|
14
|
+
'eqeqeq': ['error', 'always'],
|
|
15
|
+
'@typescript-eslint/no-unused-vars': [
|
|
16
|
+
'error',
|
|
17
|
+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
18
|
+
],
|
|
19
|
+
'@typescript-eslint/explicit-function-return-type': ['warn'],
|
|
20
|
+
'@typescript-eslint/no-explicit-any': ['warn'],
|
|
21
|
+
'@typescript-eslint/no-floating-promises': ['error'],
|
|
22
|
+
'space-before-function-paren': 'off',
|
|
23
|
+
'operator-linebreak': 'off',
|
|
24
|
+
'max-len': ['warn', { code: 100 }],
|
|
25
|
+
'semi': ['error', 'always'],
|
|
26
|
+
'quotes': ['error', 'single', { avoidEscape: true }],
|
|
27
|
+
'object-curly-spacing': ['error', 'always'],
|
|
28
|
+
'space-infix-ops': 'error',
|
|
29
|
+
'keyword-spacing': ['error', { before: true, after: true }],
|
|
30
|
+
'padding-line-between-statements': [
|
|
31
|
+
'error',
|
|
32
|
+
{ blankLine: 'always', prev: 'block', next: '*' },
|
|
33
|
+
{ blankLine: 'always', prev: '*', next: 'return' },
|
|
34
|
+
],
|
|
35
|
+
'prettier/prettier': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
semi: true,
|
|
39
|
+
singleQuote: true,
|
|
40
|
+
bracketSpacing: true,
|
|
41
|
+
arrowParens: 'avoid',
|
|
42
|
+
printWidth: 100,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Default ignore patterns
|
|
49
|
+
*/
|
|
50
|
+
const defaultIgnores = [
|
|
51
|
+
'**/node_modules/**',
|
|
52
|
+
'**/dist/**',
|
|
53
|
+
'**/.git/**',
|
|
54
|
+
'**/build/**',
|
|
55
|
+
'**/coverage/**',
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Load user's pr-checkmate.json from project root
|
|
60
|
+
* Works both when developing the package and when installed in node_modules
|
|
61
|
+
*/
|
|
62
|
+
function loadUserConfig() {
|
|
63
|
+
let currentDir = process.cwd();
|
|
64
|
+
let configPath = path.join(currentDir, 'pr-checkmate.json');
|
|
65
|
+
|
|
66
|
+
// If running from node_modules, find project root
|
|
67
|
+
if (currentDir.includes('node_modules')) {
|
|
68
|
+
const parts = currentDir.split(path.sep);
|
|
69
|
+
const nodeModulesIndex = parts.lastIndexOf('node_modules');
|
|
70
|
+
if (nodeModulesIndex > 0) {
|
|
71
|
+
currentDir = parts.slice(0, nodeModulesIndex).join(path.sep);
|
|
72
|
+
configPath = path.join(currentDir, 'pr-checkmate.json');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (fs.existsSync(configPath)) {
|
|
77
|
+
try {
|
|
78
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
79
|
+
console.log(`[loadUserConfig]: ✅ Loaded user config from: ${configPath}`);
|
|
80
|
+
return config;
|
|
81
|
+
} catch (err) {
|
|
82
|
+
console.warn(`[loadUserConfig]: ⚠️ Failed to parse ${configPath}:`, err.message);
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
console.log(`[loadUserConfig]: ℹ️ No pr-checkmate.json found, using defaults`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return { sourcePath: 'src', eslint: {} };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const userConfig = loadUserConfig();
|
|
92
|
+
const SRC = userConfig.sourcePath || 'src';
|
|
93
|
+
|
|
94
|
+
// Merge default rules with user-defined rules
|
|
95
|
+
const mergedRules = {
|
|
96
|
+
...defaultRules,
|
|
97
|
+
...(userConfig.eslint?.rules || {}),
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Merge default ignores with user-defined ignores
|
|
101
|
+
const mergedIgnores = [
|
|
102
|
+
...defaultIgnores,
|
|
103
|
+
...(userConfig.eslint?.ignorePatterns || []),
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
// Log customization info
|
|
107
|
+
const customRulesCount = Object.keys(userConfig.eslint?.rules || {}).length;
|
|
108
|
+
const customIgnoresCount = (userConfig.eslint?.ignorePatterns || []).length;
|
|
109
|
+
|
|
110
|
+
if (customRulesCount > 0) {
|
|
111
|
+
console.log(`🔧 Applied ${customRulesCount} custom ESLint rules`);
|
|
112
|
+
}
|
|
113
|
+
if (customIgnoresCount > 0) {
|
|
114
|
+
console.log(`🚫 Applied ${customIgnoresCount} custom ignore patterns`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
console.log(`📋 ESLint checking: ${SRC}/**/*.{ts,tsx,js,jsx}`);
|
|
118
|
+
|
|
119
|
+
export default [
|
|
120
|
+
{
|
|
121
|
+
files: [`${SRC}/**/*.{ts,tsx,js,jsx}`],
|
|
122
|
+
ignores: mergedIgnores,
|
|
123
|
+
|
|
124
|
+
languageOptions: {
|
|
125
|
+
parser: tsParser,
|
|
126
|
+
parserOptions: {
|
|
127
|
+
ecmaVersion: 2020,
|
|
128
|
+
sourceType: 'module',
|
|
129
|
+
project: './tsconfig.json',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
plugins: {
|
|
134
|
+
'@typescript-eslint': tsPlugin,
|
|
135
|
+
prettier: prettierPlugin,
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
rules: mergedRules,
|
|
139
|
+
},
|
|
140
|
+
];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
name: PR Checkmate Quality Checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main, master, develop]
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
pr-checkmate-all:
|
|
14
|
+
name: PR Checkmate All Checks
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
ref: ${{ github.head_ref }}
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- name: Setup Node.js
|
|
24
|
+
uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: 20
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: npm ci
|
|
30
|
+
|
|
31
|
+
- name: Run PR Checkmate All Checks
|
|
32
|
+
run: npx pr-checkmate all
|
|
33
|
+
continue-on-error: true
|
|
34
|
+
|
|
35
|
+
- name: Auto-commit formatting changes
|
|
36
|
+
run: |
|
|
37
|
+
git config user.name "github-actions[bot]"
|
|
38
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
39
|
+
git add -A
|
|
40
|
+
if ! git diff --cached --quiet; then
|
|
41
|
+
git commit -m "style: auto-format code with Prettier"
|
|
42
|
+
git push origin HEAD:${{ github.head_ref }}
|
|
43
|
+
echo "Formatting changes committed and pushed"
|
|
44
|
+
else
|
|
45
|
+
echo "No formatting changes needed"
|
|
46
|
+
fi
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
|
|
50
|
+
lint:
|
|
51
|
+
name: ESLint
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- name: Checkout code
|
|
55
|
+
uses: actions/checkout@v4
|
|
56
|
+
|
|
57
|
+
- name: Setup Node.js
|
|
58
|
+
uses: actions/setup-node@v4
|
|
59
|
+
with:
|
|
60
|
+
node-version: 20
|
|
61
|
+
|
|
62
|
+
- name: Install dependencies
|
|
63
|
+
run: npm ci
|
|
64
|
+
|
|
65
|
+
- name: Run ESLint
|
|
66
|
+
run: npx pr-checkmate lint
|
|
67
|
+
continue-on-error: true
|
|
68
|
+
|
|
69
|
+
prettier:
|
|
70
|
+
name: Prettier
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- name: Checkout code
|
|
74
|
+
uses: actions/checkout@v4
|
|
75
|
+
|
|
76
|
+
- name: Setup Node.js
|
|
77
|
+
uses: actions/setup-node@v4
|
|
78
|
+
with:
|
|
79
|
+
node-version: 20
|
|
80
|
+
|
|
81
|
+
- name: Install dependencies
|
|
82
|
+
run: npm ci
|
|
83
|
+
|
|
84
|
+
- name: Run Prettier
|
|
85
|
+
run: npx pr-checkmate prettier
|
|
86
|
+
continue-on-error: true
|
|
87
|
+
|
|
88
|
+
spellcheck:
|
|
89
|
+
name: Spellcheck
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
steps:
|
|
92
|
+
- name: Checkout code
|
|
93
|
+
uses: actions/checkout@v4
|
|
94
|
+
|
|
95
|
+
- name: Setup Node.js
|
|
96
|
+
uses: actions/setup-node@v4
|
|
97
|
+
with:
|
|
98
|
+
node-version: 20
|
|
99
|
+
|
|
100
|
+
- name: Install dependencies
|
|
101
|
+
run: npm ci
|
|
102
|
+
|
|
103
|
+
- name: Run Spellcheck
|
|
104
|
+
run: npx pr-checkmate spellcheck
|
|
105
|
+
continue-on-error: true
|
|
106
|
+
|
|
107
|
+
security:
|
|
108
|
+
name: Security Scan
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
steps:
|
|
111
|
+
- name: Checkout code
|
|
112
|
+
uses: actions/checkout@v4
|
|
113
|
+
with:
|
|
114
|
+
fetch-depth: 0
|
|
115
|
+
|
|
116
|
+
- name: Setup Node.js
|
|
117
|
+
uses: actions/setup-node@v4
|
|
118
|
+
with:
|
|
119
|
+
node-version: 20
|
|
120
|
+
|
|
121
|
+
- name: Install dependencies
|
|
122
|
+
run: npm ci
|
|
123
|
+
|
|
124
|
+
- name: Run Security Scan
|
|
125
|
+
run: npx pr-checkmate security
|
|
126
|
+
continue-on-error: true
|
|
127
|
+
|
|
128
|
+
dependency-check:
|
|
129
|
+
name: Dependency Check
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
steps:
|
|
132
|
+
- name: Checkout code
|
|
133
|
+
uses: actions/checkout@v4
|
|
134
|
+
with:
|
|
135
|
+
fetch-depth: 0
|
|
136
|
+
|
|
137
|
+
- name: Setup Node.js
|
|
138
|
+
uses: actions/setup-node@v4
|
|
139
|
+
with:
|
|
140
|
+
node-version: 20
|
|
141
|
+
|
|
142
|
+
- name: Install dependencies
|
|
143
|
+
run: npm ci
|
|
144
|
+
|
|
145
|
+
- name: Run Dependency Check
|
|
146
|
+
run: npx pr-checkmate dependencies
|
|
147
|
+
continue-on-error: true
|
package/dist/cli.d.ts
DELETED
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/config/config.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,KAEM,CAAC;AAE1B,eAAO,MAAM,WAAW,KAAoB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common patterns to ignore in all checks
|
|
3
|
-
*/
|
|
4
|
-
export declare const IGNORE_PATTERNS: string[];
|
|
5
|
-
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
-
/**
|
|
7
|
-
* File extensions to check
|
|
8
|
-
*/
|
|
9
|
-
export declare const SOURCE_EXTENSIONS: {
|
|
10
|
-
typescript: string[];
|
|
11
|
-
javascript: string[];
|
|
12
|
-
markdown: string[];
|
|
13
|
-
json: string[];
|
|
14
|
-
all: string[];
|
|
15
|
-
};
|
|
16
|
-
export declare const DEFAULT_COMMANDS: {
|
|
17
|
-
'npx pr-checkmate init': string;
|
|
18
|
-
'npx pr-checkmate all': string;
|
|
19
|
-
'npx pr-checkmate lint': string;
|
|
20
|
-
'npx pr-checkmate prettier': string;
|
|
21
|
-
'npx pr-checkmate deps': string;
|
|
22
|
-
'npx pr-checkmate npm-audit': string;
|
|
23
|
-
'npx pr-checkmate security': string;
|
|
24
|
-
'npx pr-checkmate spellcheck': string;
|
|
25
|
-
};
|
|
26
|
-
export declare const documentation: {
|
|
27
|
-
eslint: string;
|
|
28
|
-
typescriptEslint: string;
|
|
29
|
-
prettier: string;
|
|
30
|
-
cspell: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const CONFIG_FILE: string;
|
|
33
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,eAAe,UAyD3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAOhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AAEF,eAAO,MAAM,WAAW,QAAmD,CAAC"}
|
package/dist/config/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export * from './constants';
|
|
2
|
-
export { loadProjectConfig } from '../config/loader';
|
|
3
|
-
/**
|
|
4
|
-
* Get SOURCE_PATH dynamically
|
|
5
|
-
* This ensures fresh config is always read
|
|
6
|
-
*/
|
|
7
|
-
export declare function getSourcePath(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Get path to package config files
|
|
10
|
-
*/
|
|
11
|
-
export declare function getPackageConfigPath(fileName: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Check if project has local config
|
|
14
|
-
*/
|
|
15
|
-
export declare function hasLocalConfig(configNames: string[]): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* For backward compatibility, also export as constant
|
|
18
|
-
* But this will be evaluated at module load time
|
|
19
|
-
*/
|
|
20
|
-
export declare const config: {
|
|
21
|
-
sourcePath: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const SOURCE_PATH: string;
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAmBrD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAItC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAI7D;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM;gBA9CkB,MAAM;CA8CT,CAAC;AACnC,eAAO,MAAM,WAAW,QAAoB,CAAC"}
|
package/dist/config/loader.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PRCheckMateConfig } from '../interfaces';
|
|
2
|
-
/**
|
|
3
|
-
* Load project configuration from pr-checkmate.json
|
|
4
|
-
* Falls back to defaults if not found
|
|
5
|
-
*/
|
|
6
|
-
export declare function loadProjectConfig(): PRCheckMateConfig;
|
|
7
|
-
/**
|
|
8
|
-
* Get default configuration
|
|
9
|
-
*/
|
|
10
|
-
export declare function getDefaultConfig(): PRCheckMateConfig;
|
|
11
|
-
/**
|
|
12
|
-
* Export config for external use
|
|
13
|
-
*/
|
|
14
|
-
export declare const DEFAULT_CONFIG: PRCheckMateConfig;
|
|
15
|
-
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,CAgBrD;AAgCD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CAoDpD;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,mBAAqB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CheckmateConfig } from './interfaces';
|
|
2
|
-
export { getSourcePath, getPackageConfigPath, hasLocalConfig } from './config';
|
|
3
|
-
export { runLint } from './scripts/lint';
|
|
4
|
-
export { runDependencyCheck } from './scripts/dependency-check';
|
|
5
|
-
export { runPrettier } from './scripts/prettier-autoformat';
|
|
6
|
-
export { runSpellcheck } from './scripts/spellcheck';
|
|
7
|
-
export { runSecurityScan } from './scripts/security';
|
|
8
|
-
export { runNpmAudit } from './scripts/npm-audit';
|
|
9
|
-
/**
|
|
10
|
-
* Run all checks sequentially
|
|
11
|
-
* @returns Promise that resolves when all checks complete
|
|
12
|
-
*/
|
|
13
|
-
export declare function runAllChecks(): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Run checks based on configuration
|
|
16
|
-
*/
|
|
17
|
-
export declare function runChecks(config?: CheckmateConfig): Promise<void>;
|
|
18
|
-
export { logger } from './utils';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAa/C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;GAGG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAOlD;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,MAAM,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAK3E;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/init.d.ts
DELETED
package/dist/init.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,QAAmD,CAAC;AA6B5E,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmF1C"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export interface ConfigFile {
|
|
2
|
-
source: string;
|
|
3
|
-
dest: string;
|
|
4
|
-
}
|
|
5
|
-
export interface PrettierConfig {
|
|
6
|
-
semi: boolean;
|
|
7
|
-
singleQuote: boolean;
|
|
8
|
-
trailingComma: string;
|
|
9
|
-
bracketSpacing: boolean;
|
|
10
|
-
arrowParens: string;
|
|
11
|
-
printWidth: number;
|
|
12
|
-
}
|
|
13
|
-
export interface CspellConfig {
|
|
14
|
-
version: string;
|
|
15
|
-
language: string;
|
|
16
|
-
words: string[];
|
|
17
|
-
ignorePaths: string[];
|
|
18
|
-
enableFiletypes: string[];
|
|
19
|
-
ignoreRegExpList: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface PRCheckMateConfig {
|
|
22
|
-
sourcePath: string;
|
|
23
|
-
lint?: {
|
|
24
|
-
rules?: Record<string, any>;
|
|
25
|
-
ignorePatterns?: string[];
|
|
26
|
-
};
|
|
27
|
-
prettier?: {
|
|
28
|
-
config?: Record<string, any>;
|
|
29
|
-
};
|
|
30
|
-
spellcheck?: {
|
|
31
|
-
words?: string[];
|
|
32
|
-
ignoreWords?: string[];
|
|
33
|
-
ignorePaths?: string[];
|
|
34
|
-
};
|
|
35
|
-
security?: {
|
|
36
|
-
gitleaks?: {
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
};
|
|
39
|
-
'npm-audit'?: {
|
|
40
|
-
enabled: boolean;
|
|
41
|
-
auditLevel: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export interface CheckmateConfig {
|
|
46
|
-
skipLint?: boolean;
|
|
47
|
-
skipDeps?: boolean;
|
|
48
|
-
skipFormat?: boolean;
|
|
49
|
-
skipSpell?: boolean;
|
|
50
|
-
autoCommit?: boolean;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B,CAAC;IACF,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAC;QAChC,WAAW,CAAC,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;KACxD,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-configs.d.ts","sourceRoot":"","sources":["../../src/scripts/copy-configs.ts"],"names":[],"mappings":"AAaA,iBAAS,WAAW,IAAI,IAAI,CAoB3B;AAMD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-check.d.ts","sourceRoot":"","sources":["../../src/scripts/dependency-check.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkCxD"}
|
package/dist/scripts/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './dependency-check';
|
|
2
|
-
export * from './lint';
|
|
3
|
-
export * from './prettier-autoformat';
|
|
4
|
-
export * from './spellcheck';
|
|
5
|
-
export * from './security';
|
|
6
|
-
export declare function runJob(jobName: string): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAOA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD3D"}
|
package/dist/scripts/lint.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/scripts/lint.ts"],"names":[],"mappings":"AAKA,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CA8C7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npm-audit.d.ts","sourceRoot":"","sources":["../../src/scripts/npm-audit.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAiCjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prettier-autoformat.d.ts","sourceRoot":"","sources":["../../src/scripts/prettier-autoformat.ts"],"names":[],"mappings":"AAsFA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish-github.d.ts","sourceRoot":"","sources":["../../src/scripts/publish-github.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/scripts/security.ts"],"names":[],"mappings":"AAsEA;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAkDrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spellcheck.d.ts","sourceRoot":"","sources":["../../src/scripts/spellcheck.ts"],"names":[],"mappings":"AA6FA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAoCnD"}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare class Logger {
|
|
2
|
-
private logs;
|
|
3
|
-
private levelOrder;
|
|
4
|
-
private currentLevel;
|
|
5
|
-
private getTimestamp;
|
|
6
|
-
private shouldLog;
|
|
7
|
-
private colorize;
|
|
8
|
-
private logMessage;
|
|
9
|
-
log(msg: string): void;
|
|
10
|
-
info(msg: string): void;
|
|
11
|
-
warn(msg: string): void;
|
|
12
|
-
error(msg: string, err?: unknown): void;
|
|
13
|
-
debug(msg: string): void;
|
|
14
|
-
getLogs(): string[];
|
|
15
|
-
clear(): void;
|
|
16
|
-
}
|
|
17
|
-
export declare const logger: Logger;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,cAAM,MAAM;IACV,OAAO,CAAC,IAAI,CAAgB;IAE5B,OAAO,CAAC,UAAU,CAMhB;IAEF,OAAO,CAAC,YAAY,CAAoB;IAExC,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,UAAU;IAaX,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAItB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAIvC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,OAAO,IAAI,MAAM,EAAE;IAInB,KAAK,IAAI,IAAI;CAGrB;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
|