1.0.4 ā€¢ Published 14 days ago

@teamteanpm2024/delectus-eaque-impedit v1.0.4

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

@teamteanpm2024/delectus-eaque-impedit

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 @teamteanpm2024/delectus-eaque-impedit:

npm install @teamteanpm2024/delectus-eaque-impedit --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

propertiescensorparentairbnbrequireopenerObject.entriesprefixtranspileforEachhttpRxratecolumnutilityisTypeBoxsetteriteratestylesheetvestguidconcurrencyArray.prototype.findLastIndexformatfantasy-land@@toStringTagdataViewfunctionstrimEndsliceentrieschannelnested cssincludesfastcloneRegExp.prototype.flagsjsdomObject.valuescurlspawnRegExp#flagsfindjestobjtrimgetPrototypeOfJSONPromiseimportwalktimecall-bindlaunchdescriptorsreadshebangduplexfilterTypeScriptECMAScript 2022environmentgetterbrowserslistgradients css3telephoneexit-codereadablecorswaitobjectObject.getPrototypeOftraverseinterruptsSetBigInt64ArraytoobjectjoiqueueMicrotasktranspilerfunctionHyBicontainsmkdirprangeerrorReactiveExtensionssequencetapeUint32Arraysymlinkes7CSSsigtermdifffind-upirqtypescriptReflect.getPrototypeOfschemaObject.assignwidthArray.prototype.containsreact-hooksnamefastifyomitgroupByrm -rfmodulesdeepES2019variables in csslanguageeveryfileuser-streamsvisualargumentthree6to5reducestyled-componentsbatchECMAScript 2018expressioncachejwtgenericsworkspace:*Array.prototype.flatMapencryptionarraysstreams2xdgtoArraytc39form-validationxhrchinesetypedarrayscollection.es63dhookformcolourloadingcall-bound__proto__linttouchpackage.jsonestreeObject.isdependency managerES2016optimistpatchtostringtagnopemiddlewarereduxinternallengthreadablestreamArrayBufferpostcss-pluginpicomatchexpress.envwritabledefinePropertyfindLastIndexargumentsinvariantiteratora11ystylesxsses2015idconnectstreamsWeakMapstringvalidationvalidwatchingeventstextMicrosoftparsevargdprclilook-upcmdapollocss lessES2015Array.prototype.includesajaxUint8ArrayES6hooksinternal slotfigletbrowserlistawaitsetImmediateframeworkdebugspecdatastructurechromiumtesteropensprivate dataes-shim API-0pluginvalidategradients csszeromixinseslintconfigutil.inspectES2017indicatorRxJSmochacomparelessObjectoncesymboles2016watchFilesettingsmobileprocesslinewrapES2018wgetdomsetprivatelognodees6exepoint-freecjkcode pointsrfc4122dataviewbabelhandlersponyfillpackageslibphonenumberequalsymlinksstyleguidethrottleurlwebsiteemojitypesjsxinstallprettysortfixed-widthmkdirspersistentdescriptioncallboundtoolkitpostcssformattingUint8ClampedArrayexitIteratorhashreact animationserializationfast-clonemergeconsumenegativebluebirdregular expressionscalldeleteflattentypestableeast-asian-widthmodulereact-hook-formcollectionwindowsparserpathtddieextrareact posescheme-validationutilswarningcallbindflatMaptypesafeterminalpuresharedarraybufferhigher-orderio-tsmatchcolorscss nestingdeep-copyESnextapidatenameshaseditorsomeObject.keyspromisesxtermfseventsfastloggerwordbreakWebSocketwhatwgajvhasOwnextensionanimationjasmineaccessorinspectclonecreatebddSymbol.toStringTagcss-in-jsUnderscoreserializerstringifieres2017fsInt8ArraynodejsargsdataslotArrayBuffer#slicesyntaxerrorextendflatWeakSetisConcatSpreadabletyped arrayttymapmkdirtypanionassertionbusystatelessstringifyreusewaapirobustES2021startECMAScript 2023columnslimiteddefinecryptoerror-handlingtrimStartInt32ArraycopyArray.prototype.filterviewtslibtermcallbackweaksetoptiontakeshimtrimRightmulti-packageFloat64Arrayweakmaprandomes8arteslint-plugindotenvpropquoteworkernpmenvECMAScript 2020lookchildsignaldeepcopyReactiveXMaptoolscss variabledirectorydom-testing-libraryidleUint16Arraydebuggerwebes-abstractwalkingpnpm9signalsES3deep-clonebindenumerablePushstylingpasswordmatchAllgraphqlchaiECMAScript 2015xdg-open$.extendi18ncore-jsloggingless compilerstructuredClonecodesbufferparentsbootstrap cssconstjsonargvruntimecurriedshelllimitkarmarequestES2020lockfile_.extendgrouptypedarrayECMAScript 7numbereslintpluginregexl10nclassesbundlerupboundjavascriptiterationjapanesermdireventEmitterpopmotionArray.prototype.flatECMAScript 2017Float32ArrayautoprefixersuperagentwatchStreamsregularopenwordwrapsearchsanitizationassignstartercircularfast-deep-clonespinnerURLSearchParamssharedtapnativecoloravasigintes-shimsoptimizeroffsetwritepreserve-symlinksauthenticationerrorminimal256consoleprotocol-buffersconcatMapgetOwnPropertyDescriptorlastramdarapidchromeECMAScript 3asciipropertyES8trimLeftnegative zerooutputschemebufferscomputed-typeshttpsjsonschemamakecommanderconfigsuperstructkoreantoSortedvalidatorpackage[[Prototype]]getrm -frlazyESinputsanitizeless.jsbyteexecutablesetPrototypeOfjson-schema-validationcompile lesslinkappdeepcloneecmascriptrgbsideequalityes5redactpipesymbolsclass-validatorECMAScript 2016ECMAScript 5executildragmetadatapromisejsonpathECMAScript 2021escapeframerbrowserkeytypedlruwhichcheckasthardlinksES5yuphelperspruneclassnamejQueryqueuewatcherzodjson-schemabannerlistenersflagsurlstoStringTagarktypebreakdayjsArrayreact-testing-librarydropaccessibilityArrayBuffer.prototype.slicerecursivedefaultresolveBigUint64ArraymacosfromyamlmonorepofullwidthES7ECMAScript 2019json-schema-validatorES2022redux-toolkitCSSStyleDeclarationfull-widthasyncES2023arraybufferString.prototype.trimfpspringfullmake dirsyntaxJSON-SchemaconcatphonetypeofformsconfigurableformfindLastcommandargparsestatusspinnersawesomesauceString.prototype.matchAllFunction.prototype.namegetintrinsicECMAScript 6momentreactcommand-line
1.0.4

14 days ago

1.0.3

15 days ago

1.0.2

16 days ago

1.0.1

17 days ago

1.0.0

17 days ago