@@ -59,31 +59,23 @@ module ESLint {
59
59
}
60
60
}
61
61
62
- private class LocatableYamlMapping extends YamlMapping , Locatable {
63
- override Location getLocation ( ) { result = YamlMapping .super .getLocation ( ) }
64
-
65
- override string getAPrimaryQlClass ( ) { result = YamlMapping .super .getAPrimaryQlClass ( ) }
66
-
67
- override string toString ( ) { result = YamlMapping .super .toString ( ) }
68
- }
69
-
70
62
/** An `.eslintrc.yaml` file. */
71
- private class EslintrcYaml extends LocatableYamlMapping , Configuration instanceof YamlDocument {
63
+ private class EslintrcYaml extends Configuration instanceof YamlMapping {
72
64
EslintrcYaml ( ) {
73
65
exists ( string n | n = this .getFile ( ) .getBaseName ( ) |
74
66
n = ".eslintrc.yaml" or n = ".eslintrc.yml" or n = ".eslintrc"
75
67
)
76
68
}
77
69
78
- override ConfigurationObject getGlobals ( ) { result = lookup ( "globals" ) }
70
+ override ConfigurationObject getGlobals ( ) { result = super . lookup ( "globals" ) }
79
71
}
80
72
81
73
/** An ESLint configuration object in YAML format. */
82
- private class YamlConfigurationObject extends ConfigurationObject , LocatableYamlMapping {
83
- override Configuration getConfiguration ( ) { this = result .( EslintrcYaml ) .getValue ( _) }
74
+ private class YamlConfigurationObject extends ConfigurationObject instanceof YamlMapping {
75
+ override Configuration getConfiguration ( ) { this = result .( YamlMapping ) .getValue ( _) }
84
76
85
77
override boolean getBooleanProperty ( string p ) {
86
- exists ( string v | v = lookup ( p ) .( YamlBool ) .getValue ( ) |
78
+ exists ( string v | v = super . lookup ( p ) .( YamlBool ) .getValue ( ) |
87
79
v = "true" and result = true
88
80
or
89
81
v = "false" and result = false
0 commit comments