diff --git a/test/fixtures/linter/rules/NoGlobals/_Destructuring.js b/test/fixtures/linter/rules/NoGlobals/_Destructuring.js new file mode 100644 index 00000000..e99e22e6 --- /dev/null +++ b/test/fixtures/linter/rules/NoGlobals/_Destructuring.js @@ -0,0 +1,25 @@ +sap.ui.define( + [ + "sap/ui/core/Control", + "./library", + "./core/library", + "sap/external/thirdparty/library", + "sap/external2/thirdparty/library", + "sap/external3/thirdparty/library", + ], + ( + Control, + { MyValidEnum, ThisIsEnumToo: RenamedEnum }, + coreLibrary, + [ {arrPattern}, {arrWith: {deep: arrPatternDeepDestruct}}], + { objPattern: {deeply: {destructured: objPatternDeepDestruct}, objPattern1Lvl} }, + libraryExt + ) => { + const { AnotherValidEnum } = coreLibrary; + const { Buzz } = AnotherValidEnum; + const { AnotherValidEnum: {Buzz: BuzzRenamed} } = coreLibrary; + const { AnotherValidEnum: AnotherRenamedEnum } = coreLibrary; + const { H1 } = sap.ui.core.TitleLevel; + const { Value2: RenamedValue2 } = RenamedEnum; + const [ {arrPatternVarDef}, {nested: {arrPatternVarDef: arrPatternVarDefNestedAndRenamed}} ] = libraryExt; + }); \ No newline at end of file