From 644cb04dad425f6cae913fe773662d6e954b3588 Mon Sep 17 00:00:00 2001 From: mikezimm <49648086+mikezimm@users.noreply.github.com> Date: Wed, 28 Sep 2022 01:11:53 -0400 Subject: [PATCH] disable eslint if the logic needs to be != null Got warning in SPFx 1.15.2 new web part ```console [00:55:35] Warning - lint - src\webparts\listAPalooza\pnpjsConfig.ts(15,15): error eqeqeq: Expected '!==' and instead saw '!='. ``` --- .../src/webparts/pnPjsExample/pnpjsConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts b/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts index 753d1c8ca..8ba4641ba 100644 --- a/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts +++ b/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts @@ -12,10 +12,10 @@ import "@pnp/sp/batching"; var _sp: SPFI = null; export const getSP = (context?: WebPartContext): SPFI => { - if (context != null) { + if (context != null) { // eslint-disable-line eqeqeq //You must add the @pnp/logging package to include the PnPLogging behavior it is no longer a peer dependency // The LogLevel set's at what level a message will be written to the console _sp = spfi().using(SPFx(context)).using(PnPLogging(LogLevel.Warning)); } return _sp; -}; \ No newline at end of file +};