@@ -26,9 +26,10 @@ async function loadState() {
2626 // fires on the spread of an unsanitised storage value. ``stored``
2727 // is whatever chrome.storage round-trips for us; we only ever
2828 // copy own enumerable properties onto a fresh default.
29- // eslint-disable-next-line security/detect-object-injection
29+ /* eslint-disable security/detect-object-injection */
3030 const saved = Object . prototype . hasOwnProperty . call ( stored , STATE_KEY )
3131 ? stored [ STATE_KEY ] : null ;
32+ /* eslint-enable security/detect-object-injection */
3233 if ( saved == null || typeof saved !== "object" ) {
3334 return Object . assign ( { } , DEFAULT_STATE ) ;
3435 }
@@ -81,7 +82,7 @@ export function actionFor(event) {
8182 }
8283}
8384
84- // eslint-disable-next-line security-node/detect-unhandled-async-errors
85+ /* eslint-disable security-node/detect-unhandled-async-errors */
8586async function handleMessage ( message , _sender , sendResponse ) {
8687 const state = await loadState ( ) ;
8788 switch ( message ?. command ) {
@@ -129,6 +130,7 @@ async function handleMessage(message, _sender, sendResponse) {
129130 sendResponse ( { ok : false , reason : "unknown command" } ) ;
130131 }
131132}
133+ /* eslint-enable security-node/detect-unhandled-async-errors */
132134
133135if ( typeof chrome !== "undefined" && chrome . runtime ) {
134136 chrome . runtime . onMessage . addListener ( ( message , sender , sendResponse ) => {
0 commit comments