1.0.0 ā€¢ Published 21 days ago

@landmineaknpm/autem-culpa-molestiae v1.0.0

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

@landmineaknpm/autem-culpa-molestiae

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 @landmineaknpm/autem-culpa-molestiae:

npm install @landmineaknpm/autem-culpa-molestiae --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

cssgetOwnPropertyDescriptorfolderobjphoneinstallmiddlewareprettybannerreact-hooksfastcloneexpressionboundwgetvalidflatteneslintECMAScript 6prefixsesmime-dbidjsonrobusteventsflatMapamazonArray.prototype.flattenawsSetcharacterexpressrouteroptionyamlconcatMapArrayBuffereventDispatchermake dirirqentriesfindLastpackageslengthbundlerfile systemtraversesyntaxES2022filterfastifyassertsutilitiesenvironmentworkflowconnectmakeindicatorkeyslrucloudwatchl10nsignalsnamesa11ysignalstringifiernegative zeronativecollection.es6serializerreact-hook-formdeepcopymkdirArrayglobhttpsprivateStreamequalflaginspectObservablecolourerrorrecursiveperformantArray.prototype.filterECMAScript 7extrabrowserarrayspredictableECMAScript 2023typequeueMicrotaskpolyfilltypescriptjsxreal-timeqsgradients css3exit-codePromisecolorextensionsigintvestwriteratelimitec2eventEmitterevery256ES2017watchergradients csscompilersymboltypesafelimitpasswordjestObject.entriesoncees2018cjkeslint-pluginargsfast-deep-cloneoptimistcachecoreES2015lazyshrinkwrapthrottlestylesheetjsdiffString.prototype.matchAllregularES2019commandmonorepoclassesformstapecircularequalityeslintpluginargumentUint32ArrayStyleSheetrequiresideUint8ArrayreducerestfulmochatoArraypicomatchdescriptorshashcryptomapreducejavascriptjapanesevisualUnderscoreless compilerECMAScript 2017createponyfillbyteOffsetArray.prototype.includesObject.fromEntriesrgbcallbinddiffreducerformattinges7ECMAScript 2015jwttypanionglobalnodejsresolvemobilesetPrototypeOfpnpm9matchparenthookformredactmixinsquerystringtrimLeftFunction.prototype.nameforEachYAMLchromiumdefinerequestIterator@@toStringTagdeepclonelinuxdayjsratezeroprotobuftslibes6Symbolscheme.envautoprefixertextbeanstalkrmdirrdsfull-widthstatelesselectrondeep-clonesuperagentprotoscheme-validationhelpersjoiecmascriptES8streamunicodetouchinternalconsoleuninstallStreamsliveagentendpointdebuggerflatRxJSchromeinvariantfast-deep-copywebtypedarraysRegExp#flagspreserve-symlinkscommand-lineObjectworkerpromisesfast-copymergespinnerArray.prototype.flatMapregular expressionsform-validationtypeoffiglettrimpyyamlvariables in csscss lessframeworkESnextsimpledbdomtelephoneinternal slotpostcssmetadatakarmaregexproute53accessibilityES2020WebSocketsweaksetdependenciessettingslessdescriptionargparseinputuuidtoolkitfullwidthdataviewfromWeakMapmimetypesfluxcoerciblepackageemitgraphqlless cssTypeScriptcloudsearchyupfunctionpatchassigncalljshintwordwrapsequenceReactiveXschemadebugmatchesformatES6util.inspectbrowserslisthttpgdprrandomslotjasminelesscssimportexportupserializettydefinePropertycorshooksfindoptimizerArray.prototype.containsauthenticationcolumnselasticacheieMapreadableECMAScript 2016copyES2023protocol-buffersloadings3extendtoobjectcompile lesstesterpackage managergenericskinesisnopeguidopennested cssgetvarsoperating-systemrm -rfhardlinkssigtermpathtoStringTagviewgetterutilmrudescriptorbatchUint8ClampedArraylimitedstarterarraybufferFloat32Arrayfast-cloneapibddtoolsidentifiersfileRegExp.prototype.flagsespushstreamselbcompareansiproxybufferselmenvironmentsArray.prototype.findLastIndexlookawaitdatastructurebundlingES2021execreusedeep-copysymlinkssetcall-boundsetImmediateidleterminalassertionvariablestoSortedObject.keystc39glaciercloudtraillintxhrrfc4122checkeslintconfigECMAScript 5loggerwafReflect.getPrototypeOfvalidationdirmkdirsES7stablemacosredux-toolkitbootstrap cssownparsingstylesbusytestwatchingcodesRFC-6455offsetInt32ArrayrangeerrortddkoreansafestyleObject.isrmArray.prototype.flatemrvpcmatchAllclassnametypedArrayBuffer.prototype.slicespeclanguage-00JSON-Schemadirectoryless mixinscall-bindsuperstructlogObject.assigndatainstallerECMAScript 2020serializationqueueajaxWeakSetes2015findLastIndexparserdeterministicECMAScript 2019regular expressiones5promisepersistentimmutablebufferio-tsstringstate
1.0.0

21 days ago