mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
fix(lint): remove unnecessary escape characters in regex patterns
- doc-file-warning.js: \/ → / inside character classes (4 occurrences) - project-detect.js: \[ → [ inside character classes (2 occurrences) These are pre-existing no-useless-escape errors on upstream main.
This commit is contained in:
@@ -5,20 +5,24 @@
|
||||
*/
|
||||
|
||||
let data = '';
|
||||
process.stdin.on('data', c => data += c);
|
||||
process.stdin.on('data', c => (data += c));
|
||||
process.stdin.on('end', () => {
|
||||
try {
|
||||
const input = JSON.parse(data);
|
||||
const filePath = input.tool_input?.file_path || '';
|
||||
|
||||
if (/\.(md|txt)$/.test(filePath) &&
|
||||
!/(README|CLAUDE|AGENTS|CONTRIBUTING|CHANGELOG|LICENSE|SKILL)\.md$/i.test(filePath) &&
|
||||
!/\.claude[\/\\]plans[\/\\]/.test(filePath) &&
|
||||
!/(^|[\/\\])(docs|skills|\.history)[\/\\]/.test(filePath)) {
|
||||
if (
|
||||
/\.(md|txt)$/.test(filePath) &&
|
||||
!/(README|CLAUDE|AGENTS|CONTRIBUTING|CHANGELOG|LICENSE|SKILL)\.md$/i.test(filePath) &&
|
||||
!/\.claude[/\\]plans[/\\]/.test(filePath) &&
|
||||
!/(^|[/\\])(docs|skills|\.history)[/\\]/.test(filePath)
|
||||
) {
|
||||
console.error('[Hook] WARNING: Non-standard documentation file detected');
|
||||
console.error('[Hook] File: ' + filePath);
|
||||
console.error('[Hook] Consider consolidating into README.md or docs/ directory');
|
||||
}
|
||||
} catch { /* ignore parse errors */ }
|
||||
} catch {
|
||||
/* ignore parse errors */
|
||||
}
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user