File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
packages/library-linter/src Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 145145 "sourceMaps" : true ,
146146 "skipFiles" : [" <node_internals>/**/*.js" ],
147147 "cwd" : " C:/Github/Sandbox/playground/cadl/migrate/0.37"
148+ },
149+ {
150+ "type" : " node" ,
151+ "request" : " launch" ,
152+ "name" : " Debug library linter" ,
153+ "program" : " ${workspaceFolder}/packages/compiler/dist/core/cli/cli.js" ,
154+ "args" : [
155+ " compile" ,
156+ " ../samples/scratch" ,
157+ " --import=E:/repos/typespec/packages/library-linter"
158+ ],
159+ "smartStep" : true ,
160+ "sourceMaps" : true ,
161+ "skipFiles" : [" <node_internals>/**/*.js" ],
162+ "outFiles" : [
163+ " ${workspaceFolder}/packages/*/dist/**/*.js" ,
164+ " ${workspaceFolder}/packages/*/dist-dev/**/*.js"
165+ ],
166+ "cwd" : " ${workspaceFolder}/packages/compiler" ,
167+ "presentation" : {
168+ "order" : 2
169+ }
148170 }
149171 ],
150172 "compounds" : [
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ export const libDef = {
99 default : paramMessage `${ "type" } '${ "name" } ' is not in a namespace. This is bad practice for a published library.` ,
1010 } ,
1111 } ,
12+ "missing-documentation" : {
13+ severity : "warning" ,
14+ messages : {
15+ decorator : paramMessage `Decorator ${ "decorator" } is missing documentation.` ,
16+ decoratorParam : paramMessage `Decorator param ${ "param" } is missing documentation.` ,
17+ } ,
18+ } ,
1219 } ,
1320} as const ;
1421const lib = createTypeSpecLibrary ( libDef ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export function $onValidate(program: Program) {
55 const root = program . checker ! . getGlobalNamespaceType ( ) ;
66
77 validateNoExportAtRoot ( program , root ) ;
8+ validateDocumentation ( program , root ) ;
89}
910
1011function validateNoExportAtRoot ( program : Program , root : Namespace ) {
@@ -39,3 +40,7 @@ function validateNoExportAtRoot(program: Program, root: Namespace) {
3940 }
4041 }
4142}
43+
44+ function validateDocumentation ( program : Program , root : Namespace ) {
45+ let test = "best" ;
46+ }
You can’t perform that action at this time.
0 commit comments