eslint-plugin-jsx-expressions
Version:
Rules for safe logical expressions in JSX
1 lines • 3.24 kB
Source Map (JSON)
{"version":3,"file":"strict-logical-expressions.js","sourceRoot":"","sources":["../../lib/rules/strict-logical-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAgE;AAChE,iDAAmC;AACnC,+CAAiC;AACjC,mDAAgD;AAChD,yCAA6D;AAW7D,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,kBAAe,IAAA,uBAAU,EAAsB;IAC7C,IAAI,EAAE,4BAA4B;IAClC,cAAc,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAC5D,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,wDAAwD;YACrE,WAAW,EAAE,QAAQ;SACtB;QACD,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAChC,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iBACjC;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,QAAQ,EAAE;YACR,0BAA0B,EACxB,0EAA0E;YAC5E,0BAA0B,EACxB,0EAA0E;SAC7E;KACF;IAED,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QACvB,MAAM,cAAc,GAAG,mBAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAE5D,SAAS,eAAe,CACtB,IAAyB;YAEzB,MAAM,MAAM,GAAG,cAAc,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAClC,IA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