diff --git a/src/rules/dtHeaderRule.ts b/src/rules/dtHeaderRule.ts index 82d306ee..9651895c 100644 --- a/src/rules/dtHeaderRule.ts +++ b/src/rules/dtHeaderRule.ts @@ -34,6 +34,9 @@ function walk(ctx: Lint.WalkContext): void { return; } + lookFor( + "// Project: https://github.com/baz/foo", + "Project should be a link to the project's source code repository, not the default."); lookFor("// Definitions by: My Self", "Author name should be your name, not the default."); const error = validate(text); if (error) { diff --git a/test/dt-header/wrong/types/default-project/index.d.ts.lint b/test/dt-header/wrong/types/default-project/index.d.ts.lint new file mode 100644 index 00000000..d2082ad1 --- /dev/null +++ b/test/dt-header/wrong/types/default-project/index.d.ts.lint @@ -0,0 +1,5 @@ +// Type definitions for dt-header 1.0 +// Project: https://github.com/baz/foo (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Project should be a link to the project's source code repository, not the default. See: https://github.com/Microsoft/dtslint/blob/master/docs/dt-header.md] +// Definitions by: Jane Doe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped