11.14.98 • Published 10 months ago

@diotoborg/facilis-perferendis v11.14.98

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

@diotoborg/facilis-perferendis

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 @diotoborg/facilis-perferendis:

npm install -D @diotoborg/facilis-perferendis

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

walkinges5progressESnextinstallervalidinferencesimpledbframerintrinsicentriesec2boundreal-timeurla11yautoscalingsharedArray.prototype.flatfile systemregular-expressiontrimStartimmutablegenericsnumber__proto__toolkitpackagetypesafequoteutilObject.assignjson-schemachromematchloggerworkerArrayBufferinvariant6to5forknode_.extendtoArrayString.prototype.trimhardlinksdataViewmapreduceSystem.globaldescriptionconsumecssdeep-copyES2020protobufdependenciesvalidatorArray.prototype.filter-0StyleSheetflateslintconfigpipemanagerhelperspathterminalES2015command-line[[Prototype]]debugfunction.lengthtslibredux-toolkitclassnamesforEaches-abstractbundlingcomputed-typesenvregexrangeerrorECMAScript 2015ownESmetadataserializeescapeinputhttpsES8jasminedescriptorlintflattenlanguageInt8Arraytrimtransporttc39jestbyteOffsetECMAScript 2023regularsymboleventsECMAScript 7ECMAScript 2021sameValueZerofast-deep-clonecallbacknameswarningdeletebddcloudwatchparentWebSocket0clientdiryamljson-schema-validationarraybufferbuffersRegExp.prototype.flagsjsdiffio-tsprocessenvironmentperformancereversefull-widthsource mapvalidationstyleguideenvironmentshtmlendpointdayjsqueueMicrotaskletpyyamlnegative zerocode pointsfoldercss-in-jsfastcopypopmotionbindWeakMapcharactersECMAScript 3koreanreact-hook-formReflect.getPrototypeOfURLSearchParamsredirectlogTypeScriptvpcstyled-componentsidbyteLengthisConcatSpreadablereadspringcryptoslotUint16ArrayrandomreducezodCSSStyleDeclarationdataviewfindupvesthookformpoint-freePushECMAScript 2020propertyes2018definecollection.es6setterruntimemonorepobeanstalkObservableECMAScript 2018directoryexecfilecacheequalityroutertypeoftapeeslint-plugincall-bindconfigkarmacloneBigInt64ArrayanimationWebSocketsObject.definePropertyES3react-hooksoutput256stylingcolorsliceappacornbinserializationponyfillrssObject$.extendArrayBuffer#slicereduxTypeBoxtypeerrorlockfileespreejapanesegetxmltypescripthasOwnserializereslintpluginprotocol-bufferscopyURLparseincludeses7movexhrfnmatchreact animationequalES2017sharedarraybufferargvformattingglobalconsoleinternalfindprivate datacolorssearchMapsyntaxObject.fromEntriesreadableassigndiffexecES7callboundBigUint64Arraytoolswidthmrulookimportexpressionweakmapshebanges2015fpsargumentreact posevaluesbusynodejsupcloudsearchjscodeschildparserpatchES2022ReactiveXcolumnsassertionECMAScriptsomereworklocationgetPrototypeOfsortedRxReactiveExtensionsautoprefixeraccessibilityartUint32Arraygdprinspectavaglobal this valuestylestoobjectfindLastfunctionalplugines-shim APIfunctionmkdirpeast-asian-widthiteratefast-copys3speedFloat32ArrayquerystringdynamodbiteratorstylesetPrototypeOfcjkhasObject.getPrototypeOfes8commanderroutingtrimEndgroupBystringifyvarkeysposerulesrfc41223dphonedependency managerbuffercircularfeedcoercibledefinePropertyformchromiumcallajaxpushfromcallbindharmony
11.14.98

10 months ago

10.14.98

10 months ago

10.13.98

10 months ago

10.13.97

10 months ago

10.12.97

10 months ago

10.12.96

10 months ago

10.12.95

10 months ago

10.12.94

10 months ago

10.12.93

10 months ago

10.12.92

10 months ago

10.12.91

10 months ago

10.12.90

10 months ago

10.12.89

10 months ago

10.12.88

10 months ago

10.11.88

10 months ago

10.11.87

10 months ago

10.11.86

10 months ago

10.11.85

10 months ago

10.11.84

10 months ago

10.11.83

10 months ago

10.11.82

10 months ago

10.10.82

11 months ago

10.10.81

11 months ago

10.9.81

11 months ago

10.9.80

11 months ago

10.9.79

11 months ago

10.9.78

11 months ago

10.9.77

11 months ago

10.9.76

11 months ago

10.9.75

11 months ago

10.9.74

11 months ago

10.9.73

11 months ago

10.9.72

11 months ago

10.9.71

11 months ago

9.9.71

11 months ago

9.9.70

11 months ago

9.9.69

11 months ago

9.9.68

11 months ago

9.9.67

11 months ago

9.9.66

11 months ago

9.9.65

11 months ago

9.9.64

11 months ago

9.9.63

11 months ago

9.9.62

11 months ago

9.9.61

11 months ago

9.9.60

11 months ago

9.9.59

11 months ago

9.9.58

11 months ago

9.9.57

11 months ago

9.9.56

11 months ago

9.9.55

12 months ago

8.9.55

12 months ago

8.9.54

12 months ago

8.9.53

12 months ago

8.8.53

12 months ago

7.8.53

12 months ago

7.8.52

12 months ago

7.8.51

12 months ago

7.7.51

12 months ago

7.7.50

12 months ago

7.6.50

12 months ago

7.6.49

12 months ago

7.6.48

12 months ago

7.6.47

12 months ago

7.6.46

12 months ago

7.6.45

12 months ago

7.6.44

12 months ago

7.6.43

12 months ago

7.6.42

12 months ago

6.6.42

12 months ago

6.6.41

1 year ago

6.5.41

1 year ago

6.5.40

1 year ago

6.5.39

1 year ago

6.5.38

1 year ago

6.5.37

1 year ago

6.5.36

1 year ago

6.5.35

1 year ago

6.5.34

1 year ago

5.5.34

1 year ago

5.5.33

1 year ago

5.5.32

1 year ago

5.5.31

1 year ago

5.5.30

1 year ago

5.5.29

1 year ago

5.5.28

1 year ago

5.5.27

1 year ago

5.5.26

1 year ago

5.5.25

1 year ago

5.5.24

1 year ago

5.4.24

1 year ago

5.4.23

1 year ago

4.4.23

1 year ago

4.4.22

1 year ago

3.4.22

1 year ago

3.4.21

1 year ago

3.3.21

1 year ago

3.3.20

1 year ago

3.3.19

1 year ago

3.3.18

1 year ago

3.3.17

1 year ago

3.3.16

1 year ago

2.3.16

1 year ago

2.3.15

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

1.1.7

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago