1.0.6 • Published 5 days ago

@teamteanpm2024/animi-eaque-ipsam v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

@teamteanpm2024/animi-eaque-ipsam

npm npm

This plugin overrides no-unused-expressions to make it friendly towards chai expect and should statements.

// this
expect(foo).to.be.true;
foo.should.be.true;

// instead of this
expect(foo).to.be.true; // eslint-disable-line no-unused-expressions
foo.should.be.true; // eslint-disable-line no-unused-expressions

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @teamteanpm2024/animi-eaque-ipsam:

npm install @teamteanpm2024/animi-eaque-ipsam --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @teamteanpm2024/animi-eaque-ipsam globally.

Usage

Add chai-friendly to the plugins section of your .eslintrc.* configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "chai-friendly"
    ]
}

Then disable original no-unused-expressions rule and configure chai-friendly replacement under the rules section.

{
    "rules": {
        "no-unused-expressions": 0,
        "chai-friendly/no-unused-expressions": 2
    }
}

If you don't need to tweak the above rule settings, you can instead just add the following to your config file's extends and the above will be applied automatically:

{
  "extends": ["plugin:chai-friendly/recommended"]
}

Options

This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

  • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
  • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
  • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).
  • enforceForJSX set to true will flag unused JSX element expressions (Default: false).

These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

More info in the original rule's docs.

Supported Rules

  • chai-friendly/no-unused-expressions
awaitcloudformationECMAScript 2017ECMAScript 2022artES2019jestamazonutilsproxyECMAScript 2016immerpromisesvalidatorratelimitES2015byteimmutablediffTypeBoxcompareWeakSettypeoffindLastIndexsigtermchromedataviewsettakejapanesewatchfrompostcssruntimebuffersStreamtrimRightworkspace:*wgetvpctddtrimEndecmascriptdatastructuretaskpostcss-pluginparentjwtes-shimstelephonewafcharacterwalkingindicatorcss-in-jsarraybufferenumerableinputpluginfullwidthparsedynamodb[[Prototype]]TypedArray0moveinternal slotreducerformattinggetconfigurablees-shim APIfixed-widthpackage.jsonrandomexpressionless.jspruneinferenceoncewarningvalidatepasswordaccessibilityremovefind-upcoercibleES2016callformsrangeerrorbindponyfillvisualshrinkwrapvariablesReactiveExtensionsxssiteratorRxJSconfigflagdotenvyamlqsbusydefinePropertyECMAScript 2020es8modulehttpsbyteOffsetajvFloat32ArraykoreantouchIteratorECMAScript 2021reactassertsES2021resolvestatusObject.fromEntriesES2020ec2pathhooksparentsterminalprefixcss variabletermansiwritelogginges2017file systemexecsimpledblanguagetranspilerbalancedasciirgbdirectoryes2015querystringassignnumberreadablestreampuresignalssafejson-schema-validationstylesagentreduxloggerES3fastclonepropertyhookformqueuethroatYAMLlazycall-bindprotostableiterationclistyled-componentseslintpluginhelperswindowshigher-ordermobilePushreuseArraytraverseObject.definePropertystringifyassertionbrowserlistgenericsES2023inspectinstallbundlerfastdayjsArrayBuffer.prototype.sliceJSONredactWebSocketendpointrm -rffunctionsguidjsxcachetranspileObservableWeakMapreadables3lessECMAScript 33dcheckargparseimporttoolkitsidedescriptionreduceschemenpmphoneconcatinvariantxtermsetImmediateES6RegExp#flagsloadingutilitiesvalidArray.prototype.findLastwebgesturesnegativecompile lessfpseslintsnsserializersanitizeescapejsdiffflagsvariables in csspropertiesArray.prototype.flattenzerodependency managertssameValueZerosymboldomframertrimObjectflatStyleSheetvaluesarktypesymlinkemrUint8ClampedArrayobja11ycolorsrdsstreams2patchfindparsingbeanstalkstylesettingsomitArrayBuffer#slicestylingcolumntoolsnodeECMAScript 2019testingkeyspolyfillassertmatchesmatchletsharedarraybufferWebSocketspackage managerserializecode pointshasOwnbluebirdutil.inspectpreprocessorUint8ArraypackagesutilityhashtestlogenderURLSearchParamsisprototypecall-boundECMAScript 5authFunction.prototype.nameshellwrapcensoreslintconfigmkdirpcloudsearchReactiveXtoSortednamesmergeavajoiInt32ArrayqueueMicrotaskcreatereact-testing-libraryreact-hook-form$.extendBigUint64Arrayinstallertypelook-upUint32ArraylruasyncfilterbrowserslistdebuggerconsolewhichnameObject.keysextensionhasiamRFC-6455superagentlimitedtypedpipejavascriptfastifysanitizationgetOwnPropertyDescriptorhardlinkspackagegroupnativerequirestreamsenvironmentspringBigInt64Arrayupvestpnpm9ES2022make dirchromiummkdirseventsArray.prototype.filterautoprefixeres2016batch6to5groupBybabelFloat64ArrayURLinternalrobustbundlingbreakconcatMapprettybootstrap lessfunctionString.prototype.matchAlltapfast-deep-copyString.prototype.trim_.extendSetrmrateawsbddregexpkinesisES2018point-freeairbnbpromisemkdirtc39deepcopysuperstructtrimLeftcss nestinggetPrototypeOffseventsUint16Arraybabel-corelinkregular expressionreadyupObject.isobjectcircularboundrfc4122equalityurlkarmaArrayBuffercompilerwordbreakcurlES2017collection.es6fileReflect.getPrototypeOfes2018optionstructuredClonecss lessweaksetObject.entriesdeep-cloneebsPromiseArray.prototype.findLastIndexgradients css3typanionhandlerssearchopenextracomputed-typesMicrosoftequalObservablessortedESes6toArraySymbol.toStringTagmatchAllauthenticationnested cssfast-copypushmimetypesduplexjsonpathcore__proto__ttyscheme-validationfprequestiterateemojienvuninstallcolourdeeptslibeslint-pluginstringifiertacitmapstoragegatewayramdaECMAScript 6ES7lintuser-streamsexit-codejsonzodgetintrinsicisConcatSpreadableparserreact-hooksflatMapregularrapidclassnameshebangcolorUnderscorewordwrapmapreduceerrorbrowserextendoffsetArray.prototype.containssliceincludesdependenciesdeep-copycallboundformcommandermruconnecttostringtagirqcontainses7schemaspecglacierexpressdatecolumnsHyBifunctionalawesomesaucejson-schemabcryptCSSesESnexttypescriptfast-clonequerylength256waapidom-testing-libraryuuidmimecsswritablechairegular expressionschannelwidthlasti18nefficientarraysio-tsjsperformantfastcopyelbencryptionl10nfetchthreeeventEmittervalueObject.assignTypeScriptcommand-lineprotobufSymbolsyntaxsetPrototypeOfmiddlewaremomenttrimStartcharactersless cssbannerbufferintrinsicfigletjsonschemaviewtextspeedsymlinksless compilerdatanopestyleguidecloudtraildraglockfilegetoptjasminewalkMaptoobjectharmonyarraywhatwgform-validationECMAScript 2023electrondefine@@toStringTagloadbalancingchinesecurriedestreequote.envargumentperformanceprogresslimitcopyECMAScript 2018eventDispatcherdescriptorreact animationfolderastroute53collectionsequencesharedpositivekeyCSSStyleDeclarationfantasy-landflattenInt16ArraydebugseswatchFilesigintsignalstylesheetconstjson-schema-validatorthrottlepreserve-symlinkscryptserializationmonorepo
1.0.6

5 days ago

1.0.5

6 days ago

1.0.4

7 days ago

1.0.3

8 days ago

1.0.2

9 days ago

1.0.1

10 days ago

1.0.0

11 days ago