@kirill.konshin/lint 0.4.5 → 0.4.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirill.konshin/lint",
3
3
  "description": "ESLint + Prettier + lint-staged config and AI agent rules/skills for monorepos",
4
- "version": "0.4.5",
4
+ "version": "0.4.6",
5
5
  "type": "module",
6
6
  "skipGenerate": true,
7
7
  "bin": {
package/rules/github.md CHANGED
@@ -3,8 +3,13 @@ type: always_apply
3
3
  description: Set of rules for projects which use Github
4
4
  paths:
5
5
  - '**/.github/*.yml'
6
+ - '**/.github/**/*.yml'
7
+ - '**/.github/**/*.yaml'
6
8
  ---
7
9
 
10
+ - Agentic review MUST verify this effective CI order: checkout -> enable Corepack -> setup Node with Yarn cache -> restore build caches -> immutable install -> prepare -> verification (lint/test/build) -> publish; publishing MUST depend on successful verification.
11
+ - In multi-job workflows, use job-specific build-cache keys with a same-run fallback so downstream jobs reuse upstream results without immutable-key collisions.
12
+
8
13
  # Example Workflow
9
14
 
10
15
  ```yml
@@ -42,46 +47,36 @@ jobs:
42
47
  - name: Checkout Repo
43
48
  uses: actions/checkout@v4
44
49
 
50
+ - name: Enable Corepack
51
+ run: corepack enable
52
+
45
53
  - name: Setup Node.js
46
54
  uses: actions/setup-node@v6
47
55
  with:
48
- node-version: 26
56
+ node-version: 24
49
57
  registry-url: 'https://registry.npmjs.org'
50
58
  cache: yarn
51
59
  cache-dependency-path: yarn.lock
52
60
 
53
- - name: Enable Corepack
54
- run: corepack enable
55
-
56
- - name: Get yarn cache directory path
57
- id: yarn-cache-dir-path
58
- run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
59
-
60
- - uses: actions/cache@v6
61
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
62
- with:
63
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
64
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65
- restore-keys: |
66
- ${{ runner.os }}-yarn-
67
-
68
61
  #TODO https://turbo.build/repo/docs/guides/ci-vendors/github-actions#remote-caching
69
62
  #TODO https://turborepo.dev/docs/guides/ci-vendors/github-actions#remote-caching-with-github-actionscache
70
63
  - name: Cache Turbo
71
64
  uses: actions/cache@v6
72
65
  with:
73
66
  path: .turbo
74
- key: ${{ runner.os }}-turbo-${{ github.sha }}
67
+ key: ${{ runner.os }}-turbo-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
75
68
  restore-keys: |
69
+ ${{ runner.os }}-turbo-${{ github.run_id }}-${{ github.run_attempt }}-
76
70
  ${{ runner.os }}-turbo-
77
71
 
78
- - name: Cache NX
72
+ - name: Cache Nx
79
73
  uses: actions/cache@v6
80
74
  with:
81
- path: .nx
82
- key: ${{ runner.os }}-turbo-${{ github.sha }}
75
+ path: .nx/cache
76
+ key: ${{ runner.os }}-nx-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
83
77
  restore-keys: |
84
- ${{ runner.os }}-turbo-
78
+ ${{ runner.os }}-nx-${{ github.run_id }}-${{ github.run_attempt }}-
79
+ ${{ runner.os }}-nx-
85
80
 
86
81
  - name: Install dependencies
87
82
  run: yarn install --immutable
package/rules/gitlab.md CHANGED
@@ -3,10 +3,14 @@ type: always_apply
3
3
  description: Set of rules for projects which use Gitlab
4
4
  paths:
5
5
  - '**/.gitlab-ci.yml'
6
+ - '**/.gitlab/**/*.yml'
7
+ - '**/.gitlab/**/*.yaml'
6
8
  ---
7
9
 
8
10
  - Always collect coverage from tests
9
11
  - Always publish important build stats as artifacts
12
+ - Agentic review MUST verify this effective CI order: checkout and cache restore -> enable Corepack -> immutable install -> prepare -> verification (lint/test/build) -> publish; publishing MUST depend on successful verification.
13
+ - Keep local build-cache keys job-specific in parallel pipelines; use a remote Nx or Turbo cache when results must be shared across jobs.
10
14
 
11
15
  # Example
12
16
 
@@ -18,21 +22,23 @@ variables:
18
22
 
19
23
  cache:
20
24
  - key:
25
+ prefix: yarn
21
26
  files:
22
27
  - yarn.lock # dependencies cached based on lockfile
23
28
  paths:
24
- - .yarn
25
- - .pnp.js
26
- - yarn.lock
27
- - node_modules
28
- - '**/node_modules'
29
- - key: $CI_COMMIT_REF_NAME # build-related files cached per-branch
29
+ - .yarn/cache
30
+ policy: pull-push
31
+ # Job-specific keys prevent parallel jobs from replacing each other's local build cache.
32
+ - key: build-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
33
+ fallback_keys:
34
+ - build-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
30
35
  paths:
31
- - '**/.turbo'
32
- - '**/.nx'
36
+ - .turbo
37
+ - .nx/cache
33
38
  - '**/.tscache'
34
39
  - '**/.tsbuildinfo'
35
40
  - '**/.next/cache'
41
+ policy: pull-push
36
42
 
37
43
  stages:
38
44
  - install
@@ -80,11 +86,4 @@ build:
80
86
  - web/build
81
87
  ```
82
88
 
83
- Cache `.yarn` individually is possible but not needed:
84
-
85
- ```yaml
86
- - .yarn/cache
87
- - .yarn/unplugged
88
- - .yarn/build-state.yml
89
- - .yarn/install-state.gz
90
- ```
89
+ - Use Nx Cloud or Turbo Remote Cache when build results must be shared safely across parallel jobs.