Skip to content

Commit f57d426

Browse files
committed
Initialize meta in constructor
1 parent 228284b commit f57d426

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/node_modules/@stdlib/_tools/repl-txt/validate/lib/linter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ function report( id, severity, message, node ) {
6666
*/
6767
function initialize( meta ) {
6868
this.messages = [];
69-
this.meta = meta;
69+
if ( meta ) {
70+
this.meta.filepath = meta.filepath;
71+
}
7072
}
7173

7274
/**
@@ -140,6 +142,7 @@ function Linter() {
140142
throw new Error( 'couldn\'t parse `.rtlintrc` file' );
141143
}
142144
this.messages = [];
145+
this.meta = {};
143146
this.validators = registerValidators( this );
144147
return this;
145148
}

lib/node_modules/@stdlib/_tools/repl-txt/validate/lib/register_validators.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function registerValidators( linter ) {
5656
'section': [],
5757
'signature': []
5858
};
59-
6059
config = linter.config;
6160
rules = objectKeys( config );
6261
for ( i = 0; i < rules.length; i++ ) {

0 commit comments

Comments
 (0)