File tree Expand file tree Collapse file tree 1 file changed +2
-25
lines changed Expand file tree Collapse file tree 1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -19,33 +19,10 @@ function loadRelativeConfig() {
19
19
var options = {
20
20
formatter : "custom" ,
21
21
formattersDirectory : __dirname + '/formatters/' ,
22
- configuration : { }
22
+ configuration : tslintConfig . findConfiguration ( null , this . resourcePath )
23
23
} ;
24
-
25
- var configPath = locateConfigFile ( "tslint.json" , path . dirname ( this . resourcePath ) ) ;
26
- if ( typeof configPath == "string" ) {
27
- this . addDependency ( configPath ) ;
28
- var file = fs . readFileSync ( configPath , "utf8" ) ;
29
- var config = JSON . parse ( stripJsonComments ( file ) ) ;
30
- options . configuration = config ;
31
- if ( config . rulesDirectory ) {
32
- var resolvedDirectories = tslintConfig . getRulesDirectories ( config . rulesDirectory , path . dirname ( configPath ) ) ;
33
- options . rulesDirectory = resolvedDirectories ;
34
- }
35
- }
36
-
37
- return options ;
38
- }
39
24
40
- function locateConfigFile ( filename , startingPath ) {
41
- var filePath = path . join ( startingPath , filename ) ;
42
- if ( typescript . sys . fileExists ( filePath ) ) {
43
- return filePath ;
44
- }
45
- var parentPath = path . dirname ( startingPath ) ;
46
- if ( parentPath === startingPath )
47
- return undefined ;
48
- return locateConfigFile ( filename , parentPath ) ;
25
+ return options ;
49
26
}
50
27
51
28
function lint ( input , options ) {
You can’t perform that action at this time.
0 commit comments