File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ export default [
140140 "no-async-foreach/no-async-foreach" : "error" ,
141141 "no-sequences" : "error" ,
142142 "no-shadow" : "off" ,
143+
144+ // A basic check that we don't use `exportVariable` from `@actions/core`. This rule depends on
145+ // the module being imported as `core`, but that is a good enough check for us.
146+ "no-restricted-syntax" : [
147+ "error" ,
148+ {
149+ selector :
150+ "MemberExpression[object.name='core'][property.name='exportVariable']" ,
151+ message : "Use `exportVariable` from `environment.ts` instead." ,
152+ } ,
153+ ] ,
154+
143155 // This is overly restrictive with unsetting `EnvVar`s
144156 "@typescript-eslint/no-dynamic-delete" : "off" ,
145157 "@typescript-eslint/no-shadow" : "error" ,
@@ -157,6 +169,15 @@ export default [
157169 ] ,
158170 } ,
159171 } ,
172+ {
173+ files : [ "src/environment.ts" ] ,
174+
175+ // We allow `exportVariable` from `@actions/core` to be used in this file
176+ // since it defines the wrapper around it that other modules use.
177+ rules : {
178+ "no-restricted-syntax" : "off" ,
179+ } ,
180+ } ,
160181 {
161182 files : [ "**/*.ts" , "**/*.js" ] ,
162183
You can’t perform that action at this time.
0 commit comments