6.8.97 • Published 8 months ago

@taktikorg/dignissimos-optio v6.8.97

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

@taktikorg/dignissimos-optio

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 @taktikorg/dignissimos-optio:

npm install -D @taktikorg/dignissimos-optio

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

valuescollectionreact-testing-libraryArrayBuffer#sliceexecbinarycallbinddescriptorowncloudtrailexpressmake dirECMAScript 2016sortedmochafind-upvalidWebSocketsgetternopestoragegatewaySettraversees2018manipulationlrufiltercommanderapolloES2022typescriptnegative zeroUint16Arraybusy0idhigher-orderObject.getPrototypeOfwritableMapgetbyteOffsetprototypepackagetrimStartcurriedCSSStyleDeclarationnodeuser-streamsa11ycloudformationarktypePushio-tsfast-deep-copycliprotoclassnamesregexpinstrumentationfunction.lengthresolvereversedasyncparenturlES2021moveconcatMapjson-schematacittestingeveryfpbintslibargsqueueparsercjkdescriptiondayjsvpcECMAScriptforEachUint8ClampedArrayroutingmkdirpchaiassertscall-boundrobustcharacterjestsyntaxerrorawesomesaucesesqueueMicrotaskjsargumentzxslotimmerUnderscorermdirreverseremovewhichstringstablelocationsameValueZeropreprocessorloggingtoReversedstyled-componentspropspinnerscolumnscommandjoicss-in-jsglobal objecthardlinksES2017s3lengthponyfillbddtermfindrequestStreamprunepromisefigletAsyncIteratorMicrosoftbeanstalktrimRightindicatorsetframerURLform-validationECMAScript 2017symbolstoArrayformshasOwnextendsharedarraybufferidlelibphonenumberstarterbufferdependenciesflatloggerproxyhashHyBibuffersprogress.gitignoreinstallerprefixtesterpropertytransportperformantes6expressioncoveragehasOwnPropertyartcloudsearcheast-asian-widthmkdirES5pinonodejsupslicenpmcachepluginCSSString.prototype.matchAllcompilerxhroptionSystem.globaldragspinnerwebjsdiffaccessorfullrulesinspectworkspace:*shrinkwrapsuperagentrm -frpolyfillformattingdeletefantasy-landUint32ArrayObservablesrangeerrorloadingreadablestreamshebangttyweakmapoffsetl10nObject.keysyamlsqsformattouchSymbol.toStringTagsnseventsemitcurlwaitchromewarningpackage.jsonclientcheckroutefunctionalmobileiecorefeedmkdirscensorcodesWeakSetcharacterscontainsutil.inspectglobalThishelpersrapid-0javascriptReactiveExtensionschromiumlettypedarrayArray.prototype.filtervarnativeequalityglobhookstypedquoteInt16Arraytakeasteriskshas-ownobjECMAScript 2021iampatchruntimeiteratefolderconsumeObjectmergejsdomObservablecryptoInt8Arraycore-jscreateajaxbinarieseffect-tseslint-pluginmatchAllzodsimpledbswfdeep-clonefastcopyinputinvariantmatchesreduxefficientinstalllocalcssglobalstelephoneecmascriptspawnescapedotenvreactcolorssymbolfindLastIndexdeepcopyspecwaftapefile systemcall-bindesreact-hook-formschemacomputed-typessomevalidatorpoint-freextermtypanionbabelreact-hooksshamnamesdeterministictimeextragenericsprivate datarandomjQuerypushi18nnpmignorereal-timejsonschemaRxJScopyECMAScript 3json-schema-validatorbrowsertypeofbinduninstalldirectoryapihookformsetPrototypeOfArrayviewpositivesettingsiteratorkinesisredirect3dArray.prototype.flatMapastsortreusetypeutilitiesistanbulfast-clonepostcsssinatraUint8ArraysafeprocesspyyamlpureString.prototype.trimgroupByelasticachecollection.es66to5japanesetransformlanguagekeytyped arraydeepclonelookhtmlkeysguidES2016ec2querystringrmregexvalueYAMLFloat64ArraytextStreamsreact poselogdateSymbolpropertiespathenvironmentgetPrototypeOfhttpwalkingthreeformECMAScript 2023mapstringifierstyleguidepopmotionpostcss-pluginautoprefixeroutputdefinekarmaenvcolumnoptimizerworkermonoreporeworkES2019ES2020jsxasciirm -rfECMAScript 2018Object.entriesinternal slotminimalmatch$.extendphonecolorhasendpointrssES3momentarraybufferrfc4122class-validatorfixed-widthconststylinges7es-shimsECMAScript 2022dependency managersharedanimationsetImmediatexmlframework[[Prototype]]globalclassnameObject.fromEntrieslockfilespeedcirculardeepReflect.getPrototypeOfBigUint64ArrayappgetOwnPropertyDescriptorreadfastcallbackerrorjsondebugassignpicomatchES8numbergraphql
6.8.97

8 months ago

6.8.96

8 months ago

6.8.95

8 months ago

6.8.94

8 months ago

6.8.93

8 months ago

6.7.93

8 months ago

6.7.92

8 months ago

6.7.91

8 months ago

6.7.90

8 months ago

6.7.89

8 months ago

6.7.88

8 months ago

6.7.87

8 months ago

6.7.86

8 months ago

6.7.85

8 months ago

6.7.84

8 months ago

6.7.83

8 months ago

6.7.82

8 months ago

6.7.81

8 months ago

6.7.80

8 months ago

6.7.79

8 months ago

6.7.78

8 months ago

6.7.77

8 months ago

6.7.76

8 months ago

6.7.75

8 months ago

6.7.74

8 months ago

6.7.73

8 months ago

6.7.72

9 months ago

6.7.71

9 months ago

6.7.70

9 months ago

6.7.69

9 months ago

6.7.68

9 months ago

6.7.67

9 months ago

6.7.66

9 months ago

6.7.65

9 months ago

6.7.64

9 months ago

6.7.63

9 months ago

6.7.62

9 months ago

6.7.61

9 months ago

6.6.61

9 months ago

6.6.60

9 months ago

6.6.59

9 months ago

6.6.58

9 months ago

6.6.57

9 months ago

6.6.56

9 months ago

6.6.55

9 months ago

6.6.54

9 months ago

6.6.53

9 months ago

6.6.52

9 months ago

6.6.51

9 months ago

6.6.50

9 months ago

6.6.49

9 months ago

6.6.48

9 months ago

6.6.47

9 months ago

6.6.46

9 months ago

5.6.46

9 months ago

5.6.45

9 months ago

5.6.44

10 months ago

5.6.43

10 months ago

5.6.42

10 months ago

5.6.41

10 months ago

5.6.40

10 months ago

5.6.39

10 months ago

5.6.38

10 months ago

5.6.37

10 months ago

5.6.36

10 months ago

5.6.35

10 months ago

5.6.34

10 months ago

5.5.34

10 months ago

5.5.33

10 months ago

5.5.32

10 months ago

5.5.31

10 months ago

5.5.30

10 months ago

5.5.29

10 months ago

5.5.28

10 months ago

5.5.27

10 months ago

5.5.26

10 months ago

5.5.25

10 months ago

5.5.24

10 months ago

4.5.24

10 months ago

4.5.23

10 months ago

4.5.22

10 months ago

4.5.21

10 months ago

4.5.20

10 months ago

4.5.19

10 months ago

4.5.18

10 months ago

3.5.18

10 months ago

3.5.17

11 months ago

3.5.16

11 months ago

3.4.16

11 months ago

3.3.16

11 months ago

3.3.15

11 months ago

3.3.14

11 months ago

3.3.13

11 months ago

3.3.12

11 months ago

3.3.11

11 months ago

3.3.10

11 months ago

3.2.10

11 months ago

3.2.9

11 months ago

3.1.9

11 months ago

3.0.9

11 months ago

3.0.8

11 months ago

3.0.7

11 months ago

2.0.7

11 months ago

2.0.6

11 months ago

2.0.5

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago