File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
src/main/kotlin/com/emberjs/hbs/linter/ember-template-lint Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,10 @@ class TemplateLintConfiguration(project: Project) : JSLinterConfiguration<Templa
1515
1616 override fun loadPrivateSettings (state : TemplateLintState ): TemplateLintState {
1717 this .myPackage.readOrDetect()
18- val constantPackage = myPackage.getPackage().constantPackage
19- ? : throw AssertionError (" TemplateLint does not support non-constant node package refs" )
2018
2119 return state.copy(
2220 myInterpreterRef = this .myPackage.interpreter,
23- myTemplateLintPackage = constantPackage
21+ myTemplateLintPackage = this .myPackage.getPackage(). constantPackage
2422 )
2523 }
2624
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ import com.intellij.lang.javascript.linter.JSNpmLinterState
66
77data class TemplateLintState (
88 private val myInterpreterRef : NodeJsInterpreterRef ,
9- private val myTemplateLintPackage : NodePackage ,
9+ private val myTemplateLintPackage : NodePackage ? ,
1010 val isRunOnSave : Boolean ,
1111) : JSNpmLinterState<TemplateLintState> {
1212
13- private val myPackageRef: NodePackageRef = NodePackageRef .create(myTemplateLintPackage)
13+ private val myPackageRef: NodePackageRef ? = myTemplateLintPackage?. let { NodePackageRef .create(it) }
1414
1515 override fun withLinterPackage (packageRef : NodePackageRef ): TemplateLintState {
1616 val constantPackage = packageRef.constantPackage
@@ -24,12 +24,12 @@ data class TemplateLintState(
2424 }
2525
2626 override fun getNodePackageRef (): NodePackageRef {
27- return this .myPackageRef
27+ return this .myPackageRef!!
2828 }
2929
3030 val templateLintPackage: NodePackage
3131 get() {
32- return this .myTemplateLintPackage
32+ return this .myTemplateLintPackage!!
3333 }
3434
3535 companion object {
You can’t perform that action at this time.
0 commit comments