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 '!='. ```
This commit is contained in:
parent
3fb4d929d3
commit
644cb04dad
|
@ -12,7 +12,7 @@ import "@pnp/sp/batching";
|
||||||
var _sp: SPFI = null;
|
var _sp: SPFI = null;
|
||||||
|
|
||||||
export const getSP = (context?: WebPartContext): SPFI => {
|
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
|
//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
|
// The LogLevel set's at what level a message will be written to the console
|
||||||
_sp = spfi().using(SPFx(context)).using(PnPLogging(LogLevel.Warning));
|
_sp = spfi().using(SPFx(context)).using(PnPLogging(LogLevel.Warning));
|
||||||
|
|
Loading…
Reference in New Issue