1.0.0 ā€¢ Published 11 days ago

@drtyhu8npm/aliquam-adipisci-eos v1.0.0

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

@drtyhu8npm/aliquam-adipisci-eos

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 @drtyhu8npm/aliquam-adipisci-eos:

npm install @drtyhu8npm/aliquam-adipisci-eos --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

traversecompile lessoncejsxconcatpreprocessorbreakSymboljsonschemaCSSfast-deep-clonelessgradients css3jsonpathlesscssasttapconnectfull-widthxdgES5debugwaitcode pointslimiteventEmitterhelpersInt32Arrayquotelook-upstreamshasOwntoolkitfast-copyECMAScript 2020_.extendArray.prototype.containsavaindicatorargumentcliObject.getPrototypeOfreadablestreamregular expressionsCSSStyleDeclarationtoArraytdd__proto__polyfillRxJSsequencecensortc39parserajvgesturesbatchasynccss variablebabelspeedassertviewsafevalidatetesterjson-schema-validationprotocol-bufferssharedarraybufferrm -rfdirpretty.envoperating-systemrequireerrorpositivecopypicomatchRFC-6455filtertypeerrorcollectionfullpushprogressIteratorcsssortedBigInt64ArraycompilerwatcherbundlerrmdirloggingReactiveExtensionserror-handlingclassesnamesqsfantasy-landtoSortedapiparsepackage.jsonoutputclass-validatorieomitfastcopytypanionobjectbabel-coreurlEScallpromisesglobkeysapprecursiveassertsinferencetypeswebreact-testing-librarytranspilefullwidthInt16Arrayreact-hook-formrfc4122postcss-pluginvisualconcurrencyArray.prototype.findLastIndexnodejsfind-upeventsdomArrayBuffer#slicefast-deep-copypoint-freesigintwrapURLutil.inspectshamcryptoansisymbolsdiffthrottlegroupBysuperstructmobilestylesfindLastIndextrimRightoptionprunegenericstrimStartthroattermpreserve-symlinkspropfile systemgdprweaksetcloneECMAScript 5fpqueueMicrotaskponyfillArray.prototype.flatMaptimestringifiermetadatamimeposewritableclassnameenvhttpinternalweakmapregular expressionnativebufferminimalserializestreamsetarraybufferstylinglinewrappackage managerharmonyutilitycss lessredux-toolkitfindperformantECMAScript 2022[[Prototype]]enumerablesymlinkWeakSetSetnodedescriptorstostringtagtrimLeftcoercibleruntimeredactio-tsUint32Arraycore-jsconcatMapless compilercorsisConcatSpreadablegroupargsdependency managerES2015exitawaitargumentsxtermWebSocketguiditerateidleworkspace:*moveserializationECMAScript 2015inspectrobustauthzerowatchFileMicrosoftcallboundJSONsignalgetPrototypeOfnpmStreamstringwaapireadableshimcolorsestreees2017setImmediatepipeparentpluginmulti-packageES2021Array.prototype.filterspinnertoStringTagsigtermsymboldayjsvalidpromiseflaglockfileopenerwgetspringes2016collection.es6negativeimmerincludesRegExp#flagsiteratorpyyamlhashflagscolumnimportexeaccessorawesomesauceemojicolorairbnbquerystringgetoptdeepcloneES2017lintStreamsvestlinkconsolePromisebcryptratelimitexeces8sideWeakMapschemeTypeBoxmatchReflect.getPrototypeOfsignalsvariableseast-asian-widthparentsslicedeep-copyexpressfast-clonees2015isjavascriptcircularES3deterministicgetintrinsiceventDispatcherbrowsertslibregularES20200spinnerswindowspatchwordwrapbyteLengthES20183dsameValueZerointrinsicmatchAlltelephonetypescriptjson-schemaschemaprivate datareal-timebusysetteres-shims
1.0.0

11 days ago