3.9.113 • Published 10 months ago

@patrtorg/eligendi-deserunt v3.9.113

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@patrtorg/eligendi-deserunt

npm version downloads count github-ci

šŸ”Ø ESLint plugin supports TODO comments with a label in parentheses

Give a ā­ļø if this project helped you!

Motivation

npm.io

When working with code, many times there will be a situation of creating a TODO in the code to indicate that you need to perform some action here, such as writing an error handler. In such situations, the creation of a TODO is understandable. On the other hand, it often happens that such a comment in the code is for a long time. Then people reading such code, who would like to solve the TODO comment, lack information about the author, so that they can turn to him for more details.

If we use this plugin, we will force everyone creating a TODO comment to define the author in parentheses. This way, we will always have a point of contact for the person we can ask for help.

Features

  • āœ… Validate format of TODOs in comments (default valid format is TODO(label): any text here)
  • āœ… Supports passing a custom pattern and types
  • āœ… Supports 8 comment types: TODO, NOTE, COMMENT, FIXME, BUG, HACK, INFO, XXX

Installation

You'll first need to install ESLint:

npm install -D eslint

Next, install @patrtorg/eligendi-deserunt:

npm install -D @patrtorg/eligendi-deserunt

Usage

Add todo-with-label to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

module.exports = {
  // ...
  plugins: ['todo-with-label'],
  rules: {
    'todo-with-label/has-valid-pattern': 'error',
  }
};

Options

The optional configuration for rule todo-with-label/has-valid-pattern:

  • types examples:

    • ["TODO"]
    • ["FOO", "BAR", "BAZ"]

    Default ["TODO", "NOTE", "COMMENT", "FIXME", "BUG", "HACK", "INFO", "XXX"]

  • pattern examples:

    • ^TODO: (.*)$
      • valid: TODO: any text here
    • ^TODO\\((\\w+)\\)$
      • valid: TODO(label)
    • ^TODO\\((author:@\\w+)\\)\\: (.*)$
      • valid: TODO(author:@login): any text here

    Default pattern looks as follows: ^TODO\\((\\w+)\\)\\: (.*)$

    • valid: TODO(label): any text here

    āš ļø WARNING: When you pass a pattern, it should be a string and has escaped backslashes.

Example usage with options:

module.exports = {
  // ...
  plugins: ['todo-with-label'],
  rules: {
    "todo-with-label/has-valid-pattern": [
      "error",
      {
        types: ["TODO"],
        pattern: "^TODO\\((author:@\\w+)\\)\\: (.*)$"
      },
    ],
  },
};

Related

License

The MIT License @ 2023

collectionproxyroute53Float32Arraycjkworkflowflatfixed-widthawesomesaucepicomatchpropcopyassertautoscalinginspectgraphqleslintconfigvarssubprocessspawntrimLeftMicrosoftObject.fromEntriespnpm9es8es7higher-orderframerdomcloudsearchstringifyreduxsameValueZerogesturesnodeextraviewcommandstarterinvariantlanguagergbhasOwnPropertyfromargvroutingcloudformationmkdirpclassesglobal objectguidUint8ArrayPromisehooksendpointloadingupebsjsxcoercibleRxJScolorsautoprefixerassignrestprefixzeroprocesscreatejQueryweakmapfindLastdatafeedescapechinesetyped arraypathcore-jsstablefull-widthfastifydeepcopyparseObservablestrimEndsettingssnsdataviewcachemanipulationfolderdeepfilecommand-lineSystem.globalwindowbundlerflagsObject.entriesvpcvalueomitflatMaptouchimportrdsenvironmentes-abstractserializeprettyargsES2023httpsfindspinnerCSSRegExp.prototype.flagscsspromiseenumerablestyleshellURLSearchParamsInt16ArrayquoteStreamsYAMLregexpcryptoartrfc4122extendString.prototype.matchAll[[Prototype]]real-timeexecfileiteratorpopmotionoptimistansistylingTypeBoxsortgetoptflattenES2022computed-typesgdprjavascriptboundkoreanapiES2017descriptorfigletglobalssuperstructhelpercharactersreversequerystringdependency managersomesimpledbmanagerharmonynativeSetignoreforEachprogressemojitester.gitignoreObject.envJSONcloudfrontindicatorconfigintrinsicES6columnslruwalkingeast-asian-widthimmutablecomparecloudtrailpositiveappdirio-tses5Array.prototype.flattacitcolormaputilitiesUint32Arrayastrandomshebangutil.inspectpatcheslinttelephoneURLfullxmlincludesspecArrayBufferjsdiffframeworkwarninges2016validatortc39toSortedsearcharktypetestingrequestformimportexportchaicensoreslint-pluginObject.keys-0loadbalancingtestbrowserslistfunctionsuninstallwalkjasminecommanderStyleSheetkeys256numberpolyfillcallbindi18nbeanstalkqueuesidemakebyteLengthECMAScript 7columnexpresssafeslotfile systemprotobufdefinesharedpackage managerbundlingsource mapnegative zeroforkisConcatSpreadableimmermetadatastructuredClonechecksortedscheme-validationavaoptimizerdeepclonelastvaluesUnderscorerequireclidebuggeruser-streamsAsyncIteratores-shim APIenderjsonschemasymbolstakeassertionglacierlocalsyntaxphonemruHyBicharacterenvironmentstslibmatchAllreworkapolloqsinternal slotconsoledependenciesjapanesemoveObservablestyled-componentsentriesclassnamerestfulreact-testing-libraryemrzx3dbinariesasyncECMAScript 2016parserECMAScriptassertssymboldom-testing-librarypuretimeES2021mkdirschilda11yexecuteloggingsetterfantasy-landgroupIteratortextfunction.lengthmochajsinferencecompilerObject.assignconstshrinkwrapname$.extendArray.prototype.findLastIndexintoReversedlogpoint-freesuperagentvariablesdeletedebugnegativeredirectsyntaxerroroffsetlintdefinePropertyutilvalidanimationonceglobalThismulti-packagespinnersdescriptionremoveES3getOwnPropertyDescriptordeep-copy@@toStringTagrouteReactiveExtensionsglobyuphelpers_.extendqueueMicrotasktypedfast-clonetypeofbyteOffsetreadreusettyinputWeakSetsinatracircularhasObject.getPrototypeOfaccessorclientjson-schema-validationcolourarraydeterministicarraysECMAScript 2015terminaltrimRightglobalsharedarraybufferselftddreact poseCSSStyleDeclarationatomoptionECMAScript 2023momentworkspace:*Symbol.toStringTagcoretypesafeenvwidthbytelibphonenumberrapidperformantnodejswaitresolvequerybrowseryamlfastcopybufferformschanneldragES8poseshampluginletdatebddconsumebannerregular-expressionreactcall-bindclass-validatordynamodbfind-upbinaryBigUint64ArrayWeakMaplockfilesetImmediatereadablestreamespreetypefindLastIndexunicoderobusteventsredux-toolkitgroupByistanbulfsES5dataViewlocationtostringtagcode points6to5transpilemapreducetranspilerrulestoArraygenericsrmdirpackagesform-validationelectronwebaccessibilityECMAScript 2019fetchtransformrm -rffindupramdaobjectArrayBuffer.prototype.slice0validategetPrototypeOfhasOwnbinredactfast-copyhookformpushArray.prototype.findLastECMAScript 5moduleeffect-tsestreeelbtsarraybufferdotenvhashajaxmatchjshinterrorreversedWebSocketsutilsconfigurablesymlinkspinoECMAScript 6writeidentifiersroutervestjson-schemaserializerpropertyrecursiveelasticachehtmlloggeragentArray.prototype.flattenUint8ClampedArraysetTypedArrayArrayBuffer#sliceperformancechromiumemitreact animationutilityl10ndropregular expressionhardlinksfastinstrumentationstylesconcatMapglobal this valuelookpruneES2016ec2es2018formattingprotofnmatchhas-ownregexJSON-SchemarssReactiveXs3minimalxhrawstypanionownObject.definePropertyRegExp#flagsoutputspringeventDispatcherfunctionfilterES2015stringschemeamazonRxwaapiPusheventEmitterlengthtypeerrormoduleskarmasetPrototypeOfserializationArray.prototype.includesreducetrimstreamscss-in-jseslintpluginregularpyyamlidFunction.prototype.nametypeslook-upfast-deep-copywhichurlnpmignoreparentrmtraverseidleArray.prototype.flatMapruntimestringifierequalityinstallconcatisformatstyleguideschemazodworkertypedarraymobiletransportcodesexpressionlinkECMAScript 2021ECMAScript 2017ESieiamInt8Arrayasciiwritablees2017fpstoragegatewaycurlwgetpostcss-plugincalllisteners__proto__rangeerroreverybufferscontainsreadablefunctionalajvseses6tapeparentsfpsdescriptorsswfreducerdeep-clonecall-boundpackagenpmmonorepocollection.es6classnamestypescriptkinesisfast-deep-clonecurriedprotocol-buffersTypeScriptpackage.jsonobjtoStringTagcallbackArray.prototype.filteracorncoveragejestES2018joiMapvarObject.isbrowserlisttermtrimStartexectoobjectsqsWebSocketmake dirslicepostcssweaksetbusyRFC-6455ESnextgitignoreUint16Arrayregular expressionsmergethreejson-schema-validatorjsdomwhatwgtoolsvisualmkdirtapcloudwatchflagchromefullwidthtoolkitxtermECMAScript 2020babel-coreponyfillObject.valuesspeedpipediffcallboundbabeltypedarraysinstallerhttpshimes-shimsES2019ArrayArray.prototype.containsES7wafinternalasterisksnamesBigInt64Arraygetterprivate datavalidationgetprivateequalefficientmatchesreact-hook-formesSymbolfastclonegetintrinsices2015bind
3.9.113

10 months ago

3.8.112

10 months ago

3.8.113

10 months ago

3.8.111

10 months ago

3.8.110

10 months ago

3.8.109

10 months ago

3.8.108

10 months ago

3.8.107

10 months ago

3.8.106

10 months ago

3.8.105

10 months ago

2.8.105

10 months ago

2.8.104

10 months ago

2.8.103

10 months ago

2.8.102

10 months ago

2.8.101

10 months ago

2.8.100

10 months ago

2.8.99

10 months ago

2.8.98

10 months ago

2.8.97

10 months ago

2.8.96

10 months ago

2.8.95

10 months ago

2.8.94

10 months ago

2.8.93

11 months ago

2.8.92

11 months ago

2.8.91

11 months ago

2.8.90

11 months ago

2.8.89

11 months ago

2.7.89

11 months ago

2.7.88

11 months ago

2.7.87

11 months ago

2.7.86

11 months ago

2.7.85

11 months ago

2.7.84

11 months ago

2.7.83

11 months ago

2.7.82

11 months ago

2.7.81

11 months ago

2.7.80

11 months ago

2.7.79

11 months ago

2.7.78

11 months ago

2.7.77

11 months ago

2.7.76

11 months ago

2.7.75

11 months ago

2.7.74

11 months ago

2.7.73

11 months ago

2.7.72

11 months ago

2.7.71

11 months ago

2.7.70

11 months ago

2.7.69

11 months ago

2.7.68

11 months ago

2.6.68

11 months ago

2.6.67

11 months ago

1.6.67

11 months ago

1.6.66

12 months ago

1.6.65

12 months ago

1.6.64

12 months ago

1.6.63

12 months ago

1.6.62

12 months ago

1.6.61

12 months ago

1.6.60

12 months ago

1.6.59

12 months ago

1.6.58

12 months ago

1.6.57

12 months ago

1.6.56

12 months ago

1.6.55

12 months ago

1.6.54

12 months ago

1.6.53

12 months ago

1.6.52

12 months ago

1.6.51

12 months ago

1.6.50

12 months ago

1.6.49

12 months ago

1.6.48

12 months ago

1.6.47

12 months ago

1.6.46

1 year ago

1.6.45

1 year ago

1.6.44

1 year ago

1.6.43

1 year ago

1.5.43

1 year ago

1.5.42

1 year ago

1.5.41

1 year ago

1.5.40

1 year ago

1.5.39

1 year ago

1.5.38

1 year ago

1.5.37

1 year ago

1.5.36

1 year ago

1.4.36

1 year ago

1.4.35

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.4.22

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago