1.0.0 • Published 11 days ago

@wemnyelezxnpm/sequi-rerum-excepturi v1.0.0

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

@wemnyelezxnpm/sequi-rerum-excepturi

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 @wemnyelezxnpm/sequi-rerum-excepturi:

npm install @wemnyelezxnpm/sequi-rerum-excepturi --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @wemnyelezxnpm/sequi-rerum-excepturi 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
expressiontypanionspecexetypescriptsearchlistenerssomeestreetesterECMAScript 2020watcherbusyargumentAsyncIteratorsetPrototypeOfTypeBoxdirargparseextraserializecharacterbabelvariablesregexpstreamssequenceargumentsrapidartReflect.getPrototypeOfcircularbyteLengthpackage.jsonbluebirdsymlinksdefineairbnbloggerfastcopybundlervisualtaskenvstyleposecorsObservablespasswordcreatespawnimmutableasynchookformpromisestacitECMAScript 5installfseventsjQueryeslintconfigflatMapconfigformdataViewArray.prototype.filterpushwhichInt16ArraydatarateMaptestingflagscssES2019efficientreactRxJStoolkitECMAScript 2021concatmatches6defaultentriesfindLastcontainsxssfromwalkingpreprocessorArrayBuffer.prototype.slicepackageschromiumdebugbyteOffsetes7coreECMAScript 2023jsonschemaawaitnopedeep-copyes-abstracttestfunctionsreact-hookspoint-freenested cssCSSStyleDeclarationES5Object.valuesSymbolUint16Arrayiseditormime-dbprotocol-buffersgetoptmodulecolumnscheckhttpsclonevariables in csssymbolpathmatcheseventEmitterES2017json-schema-validationthrottlefindformsvalidatecode pointsstructuredClonemodulesrobustsortlaunchObservableArrayBuffer#slicemimetypescomputed-typesoptionlengthmacosopenertoArraycompile lessUnderscoredirectoryerror-handlingruntimepipeesECMAScript 7jsonmonorepoenderwritableprocessajaxESdiffemitzoddragsetImmediatexdg-opencolumnstringifierjesttriminspectCSSdatastructurepatchwalkerrorglobbootstrap lesscolorarraysBigUint64Arrayrmdirfast-deep-clonetslazyregular expressionconfigurable0codesaccessibilitynodejsbabel-coreupquotehashhttpsetwaitObject.assigngesturesvestES7ratelimitsharedaccessorInt32ArraydropwaapiTypedArrayuser-streamswarninges5debuggerfullstylespositivesuperstructcryptgdprnegativeeventsless csswordbreakvalidlimitedurlsopenskoreancall-boundreadfastreact-hook-formrm -frstableECMAScript 2022limitprototypeECMAScript 2019Streamses8typed arrayvalueiteratetrimLeftTypeScriptresolvecmdlinewrap3dArray.prototype.findLastdescriptorStyleSheetmkdirindicatorgradients csssyntaxslotInt8ArraystringweakmapgraphqlschemastylingttyprivateECMAScript 2016iteratorkarmaArrayBuffertakepropertywatchqslibphonenumbertimeexecutablemergejsES2021mapeslintnodedataviewconsoleapollostyled-componentsarraybufferinstallertypedarrayqueueMicrotasknegative zerobrowsermkdirshandlersES2020String.prototype.matchAllcharactersWebSocketrecursivecoercibleenumerableavaprefixcompareclassnamesigtermurlfiltertddterminaldotenvObject.fromEntriesless compilerArray.prototype.flathardlinkswatchingprotobufshebangstreamdependenciesArrayreducertrimStarttextcommanderopengroupBybrowserlistrm -rfsliceasciidom-testing-libraryMicrosoftflatten6to5setterconcurrencyform-validationwordwrapES2022picomatchescapeArray.prototype.containsextensionreact-testing-libraryvaluescopyprogressRxjsdiffsharedarraybuffernameobjenvironmentchannelschemefolderdateObjectremovespinnersreadableSetyupcore-jsimmerlinkkeypreserve-symlinksnamespyyamlxdgstylesheetECMAScript 3safeconstless.jsfixed-widthtypesgroupECMAScript 2017JSON-Schemaes-shim APIfull-widthWeakSetio-tstypesaferamdasameValueZerospinneranimationfunctionduplexcommand-lineconcatMapsyntaxerrorparentargvwindowswebes-shimsstatusajvastcompilerunicodeinternaltoSortedminimalless mixinsmetadatavarjsxauthenticationObject.entriesIteratorgeteslintpluginponyfillsignalseverystreams2ReactiveXdeepdefinePropertyzero$.extendreducepolyfillreusepromisetypedfastifyYAMLcallbacktslibRFC-6455inferencestartsanitizestartergettermovewgetsettingschinesechaicss variablenpmloadingtranspilerdescriptionjoiimportperformantlrubufferextendspringcallECMAScript 2015iejsonpathserializerString.prototype.trimjson-schemaStreamutilspnpm9rangeerrorfilerequestargs__proto__Object.getPrototypeOfArray.prototype.flatMapeast-asian-widthmatchAllelectronreact poselookES6clientserializationtrimRight_.extendtoStringTagdeterministichookscurriedfast-cloneclassesprunehigher-orderpropertiesPromisebrowserslistmomentarktypemiddlewarejwtdeepcloneviewlockfileworkspace:*tostringtagphonebindequalPushpropcolourhelpersoutputgetPrototypeOflinuxincludesfastclonereadablestreamutilitymruUint32ArrayArray.prototype.flattenfetchthroatbootstrap cssclassnamesUint8Arrayutilitiesstringifyinternal slotReactiveExtensionsBigInt64Arrayoperating-systemJSONtaplintletthreehassymbolstoolsbcryptexpresspersistenta11yregular expressionsArray.prototype.includestermtouches2016connectawesomesauceparserparentsrmWeakMapdeep-cloneansiassertsArray.prototype.findLastIndexgetintrinsicmimeapitrimEndcss-in-jsdomlastregularreact animationworkerSymbol.toStringTagES2016curlsymlinktelephoneES2018collectiondescriptorsbundlingautoprefixerdeletetraverseweaksetidlequeueObject.keysfindupreal-timeperformancefantasy-landURLbatchoncebreakinvariantsigintdependency managerfast-deep-copybuffersauthstyleguideuuidjapanesespeedES2015redux-toolkithasOwnnativeprettyequalityxtermObject.definePropertycommandscheme-validationpostcssES8getOwnPropertyDescriptorframeworkrequirefpfile systemrandomloggingemojiirqes2017javascriptencryptionparsearraymulti-packagekeysjson-schema-validatorforEachcall-bindcachefind-uplog[[Prototype]]tc39lesstypedarraysexecfigletconsumeharmonyiterationrgbcryptoframermakeguidpackageecmascriptFloat32ArrayES3256validationFloat64ArrayoptimizerdeepcopyRegExp#flagsexit-code.envbytexhrfsl10nchromeflagcallbindformatcolorsprotooptimistpackage managerjasminewatchFiletypeyamlpurevalidatorutil.inspectsortedcallboundjsdomFunction.prototype.namecensorsignal-0flatfindLastIndexbddutilwriteclass-validatortranspileUint8ClampedArrayuninstallquerystringomitobjectlook-upfast-copyURLSearchParamsshamrfc4122i18ntypeofshrinkwrapplugininputtoobjectchildmixinsshimredactlanguagecss lessHyBiapp@@toStringTaglesscss
1.0.0

11 days ago