1.0.0 • Published 1 year ago

@emiplegiaqmnpm/soluta-aspernatur-illum v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@emiplegiaqmnpm/soluta-aspernatur-illum

An eslint plugin to enforce method or function name conforms to conventions.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @emiplegiaqmnpm/soluta-aspernatur-illum:

npm install @emiplegiaqmnpm/soluta-aspernatur-illum --save-dev

Usage

Add function-name to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "function-name"
  ],
  "rules": {
    "function-name/starts-with-verb": "error"
  }
}

Supported Rules

function-name/starts-with-verb

Function is always do something, so it should start with a verb and to avoid confusion with variables.

šŸ‘Ž Examples of incorrect code for this rule:

// "@ali/paytm/function-name-starts-with-verb": ["error"]

function cat(fish) {}
function dog(distance) {}

šŸ‘ Examples of correct code for this rule:

// "@ali/paytm/function-name-starts-with-verb": ["error"]

function feedCat(fish) {}
function walkDog(distance) {}

options

interface IOptions {
  whitelist: string[];
  blacklist: string[];
}

.eslintrc.js

{
  "rules": {
    "function-name/starts-with-verb": ["error", {
      "whitelist": ["success"],
      "blacklist": ["init"]
    }]
  }
}

šŸ‘Ž Examples of incorrect code for this rule:

// ..."blacklist": ["init"]...
const foo = {
  init() {},
}

šŸ‘ Examples of correct code for this rule:

// ..."whitelist": ["success"]...
const foo = {
  success() {},
}

Develop

npm

yarn → bun

nameshttpRxemityupautoprefixercolorsprettyfrompropertysymlinksvariablestrimLeftfixed-widthlessextendsetPrototypeOfemojiredactregular expressionses2015ES2017internal slotbreakdataviewvalueStreampasswords3randomrouteendpointcolourjsonpathmkdirbuffersmake dirflattenes7typedjestString.prototype.trimhasfastclonefullprotobufcurlECMAScript 7dirfilejsongroupflagsec2commanderfile systemFloat32ArraybrowserlistbyteLengthES2020ObservablesmatchtestingxhrremovematchessymbolstablegraphqllengthECMAScript 2017es5structuredClonedebuggerStreamstddtslibWebSocketcodesJSONchaiURLSearchParamsSeteventstypeless compilereslint-pluginconcatoutputpackagesvalidationdirectoryprivatepackage.jsonstreams2IteratoruplimittoobjectfindLastIndexunicodeobjdeep-copyUnderscorewordwrapgdprbindsomeArrayBuffer#slicetapecreatelinewrapminimalmapreducermdiriteratorconcurrencyefficientdataViewroute53pathObject.getPrototypeOfform-validationeslintidsortqueueMicrotasksetreadableurlmochaswfdropclassesomitrfc4122reuseMicrosoftoptimizergetOwnPropertyDescriptornodermkinesisastwatchFileregexUint32ArrayqsindicatorcloudwatchregulartrimECMAScript 2022256boundstdlibtermrgbeslintpluginloggercloudfrontfindLasttypedarraysvpcelectronlibphonenumberextensionArray.prototype.findLastprotocol-buffersgradients css3dynamodbvalidaterangeerrorjoiassertsarktypelanguageless.jsfolderWebSocketselbparentspostcsscall-boundpackageECMAScript 2015sideesnumberinsnsjavascriptcharactersutil.inspectopenexpresscryptECMAScript 6ECMAScript 2019mimepersistentObjectSymboltypeofawesomesauceredirectes8configshebangfunctionalcompile lesscachebatchlocationnested csshasOwnPropertydefinediffebstimerm -frCSSStyleDeclarationgetoptformreact-hook-formstatelessmimetypeshashObject.definePropertypruneio-tsflattsmoduleshttpses2017fastcopy@@toStringTagcharacterisConcatSpreadableimportdeterministicqueryshrinkwrapworkflowclassnamesroutingchannelrapidexecObject.valueswhatwgpackage managerchromemiddlewarevariables in cssimmutableparentcall-bindWeakSetArray.prototype.containsprogressreduxmatchAllfast-deep-cloneslicesymbolscollection.es6bundlingconfigurablewarningauthgetPrototypeOfsqsRFC-6455fpsjsxlazyformatObject.fromEntriestypanionArray.prototype.flattenes-shim APImulti-packagecolumnsworkspace:*uninstallhelpers__proto__Array.prototype.filterfasttelephoneBigInt64Arraylintreadajaxcss lesssessettingsscheme-validationreact-testing-libraryequalcode pointsestreelruUint16Arraypnpm9finduplesscssmixinsES6frameworkES7clonea11yargparselockfileURLsimpledbdescriptorssyntaxerrorhooksapiPushwaitECMAScript 2023inferencesymlinktakereducerArray.prototype.flatMapinspectpolyfillTypedArrayecmascriptObservablethrottlefilterjasminetoSortedcomputed-typesprotodependency managerenderintrinsicidletypesawaitvalidbufferfsstylesheetbytearraystreamsjwtquerystringmetadataspeeddescriptorfullwidthxtermReflect.getPrototypeOfweakmapfull-widthoncees6core-jsInt16Arraycloudformationbluebirdreal-timesetteruuidmakebddsharedarraybufferfast-deep-copystringifyiterationdependenciesnegative zeroStyleSheetimmerhigher-ordersearchmapserializeartforEachobjectpropmonorepoESnextpromisesnopemkdirswritableenvironmentoptimistowngetintrinsichasOwnshellarraybuffervestl10nchromiumiteratewriteInt32Arrayes-abstractwafproxyes2016formattingdom-testing-librarytoolkitcompilerconcatMapasciiassertfast-clonefetchhookformES2015testersuperstructprefixdeepcloneenvstreamserializationUint8ClampedArray-0superagenttoArrayslotES3inputwidthbannercircularwgetArrayBuffer.prototype.slicereact-hookssortedTypeScriptemrmergetextschemeArray.prototype.includesliveRegExp#flagselasticachehardlinksstylingsameValueZeroArray.prototype.findLastIndexlinksyntaxreplayaccessibilityperformanceieObject.isbrowserslistbundlereslintconfigutilitiesdotenvless cssHyBicomparecsspropertieserrorcallboundstylesworkeroffsetreduceArrayBufferstarterbootstrap csstoStringTagduplexsequencesetImmediateispreprocessorgroupByECMAScript 2016lookavaflagimportexport.envdeepcheckkeybusyformsschemaarraysbcryptAsyncIteratoreveryES2016fseventsbeanstalkes-shimsdeleteYAMLlogclassnameconnectcoreponyfillrequireArray.prototype.flatinstallermove0clientlastinvariantfunctionjsdiffECMAScript 2018escapereadablestreampatchES8safegenericstouchpushenumerableES2019getterprototyperegular expressionwatchObject.entriesespreeincludesSymbol.toStringTagWeakMaptapglacieragentflatMappromisetypescriptnodejsnegativeinstallzerofluxES2021amazonwebhas-ownmrubootstrap lessiamgetdataviewargspositiverequestCSSvaluesutilitydayjsArraykoreanfigletsharedmoduleconsoleclass-validatorES2022tc39pipepicomatchajvperformantFunction.prototype.nametrimEndtostringtaginternalReactiveExtensions_.extendwhich
1.0.0

1 year ago