Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODING-ASSISTANT-PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ Follow these guidelines:

10. Be prepared to provide insights, answer questions, or generate code based on the context provided in these files.

11. If you encounter a siutation where the .context.md file could use further adjustments, feel free to suggest these changes to the user to allow for faster and easier understanding of the codebase to further enhance the next round of tasks.
11. If you encounter a situation where the .context.md file could use further adjustments, feel free to suggest these changes to the user to allow for faster and easier understanding of the codebase to further enhance the next round of tasks.

Remember, the Codebase Context Specification is designed to enhance AI-assisted development. Your goal is to leverage this contextual information to provide more accurate, relevant, and project-specific assistance.
3 changes: 3 additions & 0 deletions linters/typescript/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# History
.history

# Dependency directories
node_modules/

Expand Down
154 changes: 152 additions & 2 deletions linters/typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions linters/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"codebase-context-lint": "./dist/cli.js"
},
"scripts": {
"dev": "ts-node src/cli.ts",
"build": "tsc",
"start": "node dist/cli.js",
"lint": "node dist/cli.js",
Expand Down Expand Up @@ -42,6 +43,7 @@
"jest": "^29.7.0",
"semantic-release": "^22.0.12",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.6.2"
},
"dependencies": {
Expand Down
7 changes: 3 additions & 4 deletions linters/typescript/src/contextignore_linter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,10 @@ export class ContextignoreLinter {
*/
public isIgnored(filePath: string, relativeTo: string): boolean {
try {
const directoryPath = path.dirname(filePath);
let currentDir = directoryPath;
let currentDir = path.dirname(filePath);

// Traverse up the directory tree to find the nearest .contextignore file
while (currentDir.length >= relativeTo.length) {
do {
const ig = this.ignoreCache.get(currentDir);
if (ig) {
const relativeFilePath = path.relative(currentDir, filePath);
Expand All @@ -174,7 +173,7 @@ export class ContextignoreLinter {
return ignored;
}
currentDir = path.dirname(currentDir);
}
} while (currentDir.length >= relativeTo.length && currentDir !== path.dirname(currentDir));

this.log(LogLevel.DEBUG, `File ${filePath} is not ignored (no .contextignore found)`);
return false;
Expand Down