We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8016694 commit b32165dCopy full SHA for b32165d
tools/new-rule.ts
@@ -1,5 +1,6 @@
1
import path from "path"
2
import fs from "fs"
3
+import cp from "child_process"
4
const logger = console
5
6
// main
@@ -49,9 +50,9 @@ module.exports = {
49
50
type: "suggestion", // "problem",
51
},
52
create(context: RuleContext) {
- const styles = getStyleContexts(context).filter(
53
- style => !style.invalid && style.scoped,
54
- )
+ const styles = getStyleContexts(context)
+ .filter(StyleContext.isValid)
55
+ .filter((style) => style.scoped)
56
if (!styles.length) {
57
return {}
58
}
@@ -182,4 +183,7 @@ This rule reports ??? as errors.
182
183
184
`,
185
)
186
+ cp.execSync(`code "${ruleFile}"`)
187
+ cp.execSync(`code "${testFile}"`)
188
+ cp.execSync(`code "${docFile}"`)
189
})(process.argv[2])
0 commit comments