@locker/eslint-plugin-locker
Advanced tools
Comparing version 0.14.19 to 0.14.20
@@ -15,3 +15,8 @@ "use strict"; | ||
rule: { | ||
message: ({ pattern }) => `'CookieStore#${pattern.slice(12)}' is distorted in Lightning Locker.`, | ||
message({ pattern }) { | ||
const cookieStoreDot = 'cookieStore.'; | ||
const lastIndex = pattern.lastIndexOf(cookieStoreDot); | ||
const property = pattern.slice(lastIndex + cookieStoreDot.length); | ||
return `'CookieStore#${property}' is distorted in Lightning Locker.`; | ||
}, | ||
search: [ | ||
@@ -18,0 +23,0 @@ 'window.cookieStore.delete', |
@@ -15,5 +15,10 @@ "use strict"; | ||
rule: { | ||
message: ({ pattern }) => `'CustomElementRegistry#${pattern.slice(15)}' is distorted in Lightning Locker.`, | ||
search: ['customElements.define', 'customElements.get'], | ||
message({ pattern }) { | ||
const customElementsDot = 'customElements.'; | ||
const lastIndex = pattern.lastIndexOf(customElementsDot); | ||
const property = pattern.slice(lastIndex + customElementsDot.length); | ||
return `'CustomElementRegistry#${property}' is distorted in Lightning Locker.`; | ||
}, | ||
search: ['window.customElements.define', 'window.customElements.get'], | ||
}, | ||
}); |
@@ -16,3 +16,8 @@ "use strict"; | ||
rule: { | ||
message: ({ pattern }) => `Document#${pattern.slice(9)} is prohibited in Lightning Locker.`, | ||
message({ pattern }) { | ||
const documentDot = 'document.'; | ||
const lastIndex = pattern.lastIndexOf(documentDot); | ||
const property = pattern.slice(lastIndex + documentDot.length); | ||
return `Document#${property} is prohibited in Lightning Locker.`; | ||
}, | ||
search: [ | ||
@@ -19,0 +24,0 @@ 'document.exitFullscreen', |
@@ -26,2 +26,3 @@ "use strict"; | ||
ForOfStatement(node) { | ||
// istanbul ignore else | ||
if (node.await === true) { | ||
@@ -28,0 +29,0 @@ report(context, node); |
{ | ||
"name": "@locker/eslint-plugin-locker", | ||
"version": "0.14.19", | ||
"version": "0.14.20", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -28,3 +28,3 @@ "author": "Salesforce UI Security Team", | ||
"dependencies": { | ||
"@locker/eslint-rule-maker": "0.14.19" | ||
"@locker/eslint-rule-maker": "0.14.20" | ||
}, | ||
@@ -36,3 +36,3 @@ "files": [ | ||
], | ||
"gitHead": "72332f9b003b1b1ed92795c2319e6da57d906d2f" | ||
"gitHead": "293789c383e41efa0b3f2a96e8330e61321e2956" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153162
1295
+ Added@locker/ast-lib-maker@0.14.20(transitive)
+ Added@locker/eslint-rule-maker@0.14.20(transitive)
+ Added@locker/shared@0.14.20(transitive)
- Removed@locker/ast-lib-maker@0.14.19(transitive)
- Removed@locker/eslint-rule-maker@0.14.19(transitive)
- Removed@locker/shared@0.14.19(transitive)