@kirill.konshin/lint 0.4.6 → 0.4.8
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/dist/lintPrepare.d.ts.map +1 -1
- package/dist/lintPrepare.js +9 -3
- package/package.json +1 -1
- package/rules/webstorm.md +16 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lintPrepare.d.ts","sourceRoot":"","sources":["../src/lintPrepare.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;GAgBG;AASH,KAAK,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5D,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5C,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAuB1F;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,EAAE,CAwBlC;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,KAAK,EAAE,CAQpC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAYhE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAc9D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAa/D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAY1D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAA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;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CA2BpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAKjD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAenG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAW9D;AAED;;GAEG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAuD3B"}
|
package/dist/lintPrepare.js
CHANGED
|
@@ -197,9 +197,15 @@ export function symlinkClaudeMd(cwd) {
|
|
|
197
197
|
*/
|
|
198
198
|
export function generateAgentsFile(rules, cwd, customSection) {
|
|
199
199
|
const relativeRulesDir = path.relative(cwd, RULES_DIR).split(path.sep).join('/');
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
/**
|
|
201
|
+
* @see https://code.claude.com/docs/en/memory#import-additional-files
|
|
202
|
+
* @see https://github.com/anthropics/claude-code/issues/13614 @import -> @path/file.md in Claude
|
|
203
|
+
* @see https://github.com/openai/codex/issues/17401 - no @path/file.md in Codex yet
|
|
204
|
+
*/
|
|
205
|
+
const links = rules
|
|
206
|
+
.map((rule) => `- @${relativeRulesDir}/${rule.file} [${rule.file}](${relativeRulesDir}/${rule.file})`)
|
|
207
|
+
.join('\n');
|
|
208
|
+
const generated = `${HEADER}\n\n${links}\n\n${FOOTER}\n\n${GENERATED_MARKER}`;
|
|
203
209
|
return customSection ? `${generated}\n\n${customSection}\n` : `${generated}\n`;
|
|
204
210
|
}
|
|
205
211
|
/**
|
package/package.json
CHANGED
package/rules/webstorm.md
CHANGED
|
@@ -197,3 +197,19 @@ Ban build directories from search using examples:
|
|
|
197
197
|
</component>
|
|
198
198
|
</project>
|
|
199
199
|
```
|
|
200
|
+
|
|
201
|
+
# Git Worktrees
|
|
202
|
+
|
|
203
|
+
`.idea/%projectName%.iml`, `.idea/modules.xml` and `.idea/.name` are usually tracked. Every git worktree therefore checks out a module with the same name as the main checkout's, and WebStorm refuses to attach it: `Cannot attach project: Module name '%projectName%' already exists`.
|
|
204
|
+
|
|
205
|
+
- When creating a worktree, ALWAYS give it a distinct module and project name derived from the branch, e.g. `Packing Travel App` for `travel-app`:
|
|
206
|
+
1. Copy `.idea/%projectName%.iml` to `.idea/%projectName% %Branch Title%.iml`. The module name is the file name.
|
|
207
|
+
2. Point `.idea/modules.xml` at the copy.
|
|
208
|
+
3. Write the same name into `.idea/.name`.
|
|
209
|
+
- Keep the rename local, and NEVER commit it or merge it back:
|
|
210
|
+
- Run `git update-index --skip-worktree .idea/modules.xml .idea/.name`.
|
|
211
|
+
- Ignore the copy in the shared `.git/info/exclude` with the pattern `.idea/%projectName% *.iml`.
|
|
212
|
+
- Before a rebase, merge or checkout that updates those files:
|
|
213
|
+
1. Run `git update-index --no-skip-worktree .idea/modules.xml .idea/.name`.
|
|
214
|
+
2. Restore the files with `git checkout -- .idea/modules.xml .idea/.name`.
|
|
215
|
+
3. Redo the rename afterwards.
|