Skip to content

Commit ead8108

Browse files
aibaarserik-krogh
andcommitted
Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <[email protected]>
1 parent 83cd55c commit ead8108

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

javascript/ql/lib/semmle/javascript/linters/ESLint.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module ESLint {
6060
}
6161

6262
/** An `.eslintrc.yaml` file. */
63-
private class EslintrcYaml extends Configuration instanceof YamlMapping {
63+
private class EslintrcYaml extends Configuration instanceof YamlMapping, YamlDocument {
6464
EslintrcYaml() {
6565
exists(string n | n = getFile().getBaseName() |
6666
n = ".eslintrc.yaml" or n = ".eslintrc.yml" or n = ".eslintrc"
@@ -72,7 +72,9 @@ module ESLint {
7272

7373
/** An ESLint configuration object in YAML format. */
7474
private class YamlConfigurationObject extends ConfigurationObject instanceof YamlMapping {
75-
override Configuration getConfiguration() { this = result.(YamlMapping).getValue(_) }
75+
override Configuration getConfiguration() {
76+
this = result.(EslintrcYaml).(YamlMapping).getValue(_)
77+
}
7678

7779
override boolean getBooleanProperty(string p) {
7880
exists(string v | v = super.lookup(p).(YamlBool).getValue() |

shared/yaml/qlpack.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: codeql/yaml
22
version: 0.0.1-dev
33
groups: shared
44
library: true
5-
dependencies:
6-
codeql/util: ${workspace}

0 commit comments

Comments
 (0)