6.15.104 • Published 10 months ago

@patrtorg/commodi-illo v6.15.104

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

@patrtorg/commodi-illo

Find and remove unused es6 module imports. It works by splitting up the no-unused-vars rule depending on it being an import statement in the AST and providing an autofix rule to remove the nodes if they are imports. This plugin composes the rule no-unused-vars of either the typescript or js plugin so be aware that the other plugins needs to be installed and reporting correctly for this to do so.

Versions

  • Version 4.x.x is for eslint 9 with @typescript-eslint/eslint-plugin 8
  • Version 3.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 6 - 7
  • Version 2.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 5
  • Version 1.x.x is for eslint 6 and 7.

Typescript

If running typescript with @typescript-eslint make sure to use both @typescript-eslint/eslint-plugin and @typescript-eslint/parser.

React

If writing react code you need to install eslint-plugin-react and enable the two rules react/jsx-uses-react and react/jsx-uses-vars. Otherwise all imports for components will be reported unused.

Installation

You'll first need to install ESLint (and @typescript-eslint if using typescript):

npm i eslint --save-dev

Next, install @patrtorg/commodi-illo:

npm install @patrtorg/commodi-illo --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @patrtorg/commodi-illo globally.

Usage

Add unused-imports to the plugins section of your .eslintrc configuration file.

import unusedImports from "@patrtorg/commodi-illo";

export default [{
    plugins: {
        "unused-imports": unusedImports,
    },
    rules: {
        "no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
        "unused-imports/no-unused-imports": "error",
        "unused-imports/no-unused-vars": [
            "warn",
            {
                "vars": "all",
                "varsIgnorePattern": "^_",
                "args": "after-used",
                "argsIgnorePattern": "^_",
            },
        ]
    }
}];

Supported Rules

  • no-unused-imports
  • no-unused-vars
symbolsinputruntimenpmignoremkdirarraysresolvejson-schemaECMAScript 2018atomcode pointsObservablessubprocessclass-validatorloggerinstrumentationnameECMAScript 3cloudfrontPushttyapies2015json-schema-validatorrfc4122ajveveryglobalsdescriptionwhatwgreversedrequestcodesclonesesbundlingeventDispatcherglobal objectwgetargsUint8ClampedArraymonorepostringvaluesasciiredirectdebuginvariantextendECMAScript 2022executecopystylesreduxajaxArray.prototype.flatSetArrayBuffercall-bindformatinremoveimmutablehelpercliglobaliees2018prefixpostcssspawnbeanstalk@@toStringTageslintenvironmentsyntaxerrorassertglobreversedependenciesmatchesjapaneseReactiveExtensionsECMAScript 2020hasOwnPropertystoragegatewayqueueMicrotasksnseslintpluginFloat64ArrayWeakSetpackage.jsonmatchAllObservablefast-cloneglobalThisesString.prototype.matchAllbinaryfindLasta11ytddfastifycolumnspicomatchutilsletconcatMapECMAScript 2021callbackpruneObject.assigntranspilefantasy-landspecdescriptorjson-schema-validationrmdirJSON-SchemautilityawesomesaucevarsflagdayjsInt32Arrayparseansiebswritefast-copyreact3dtestergetOwnPropertyDescriptorregexcacheiteratordebuggermoduleFunction.prototype.namehtmlparserfigletconcatapp256isConcatSpreadablecoverageassignsyntaxmrureadableyamlfptypesafestylingJSONgetPrototypeOfmochaYAMLArray.prototype.filtercryptofile systemflattenentriesmanagercorevalidationrouterpathbufferlocationArrayBuffer#slicefullwidthsettingstypanionlengthvardeepcopyregexpdirectoryendpointcharactersgrouplistenersspeedawsdotenvgenericsperformantmulti-packageprototypebrowserslistpostcss-pluginkinesiscurriedserializeclassnameIteratorObject.fromEntriesArray.prototype.findLastdateparentes5helperskeysArray.prototype.containscloudformationfindcommand-linetypedarrayECMAScript 2015slicearraybuffertslibchromemkdirsstreamArrayBuffer.prototype.sliceArray.prototype.flatMapvalueasteriskssuperstructchromiumES2018URLcreatepropdataviewES2016ES2021lockfiletelephonecolourbabeleast-asian-widthshellrssbddrm -rfStreamsfileInt16ArrayTypeBoxinspectjestregular-expressiontypedmapnegativeintrinsiccensorgesturesregular expressiontyped arraybyteLengthl10nclassesstyleguidechannelcommandrapidlookredux-toolkitdeepclonebundlerconfigurablereact-testing-librarylastidleES2019performancesearchefficientargumentpluginhigher-ordermodulesbrowserlisttrimRightcomputed-typespopmotionisRxJSUint32Arraybabel-coretaplruapollojoisource mapcloudsearchES5System.globalhttps0languagemomenttoolsdefineeslintconfigsomeoutputES2017jsdomtostringtaguser-streamsposenodejscheckbytecall-boundthreeRegExp.prototype.flagsdataec2Object.keysECMAScript 2017typescriptignorespinnerpropertieschineseReactiveXfullassertsuuides6trimLeftmanipulationguidcore-jsarrayimportES8colordeep-copycloudwatch-0dependency managerwhichES2015AsyncIteratorECMAScript 2016ES3Uint8Arraybrowsersqsregular expressionsequalmake dirvalidateio-tsfunctionWebSocketcallbindjsonschemahasfastcloneMaphardlinksprotocol-bufferstoolkitroutetransportvisualiteratefast-deep-copyemrdomelasticachees-shim APIwritablestructuredCloneboundhookformvariablesinferenceBigInt64ArrayreadablestreamBigUint64Arrayelectrones2016processnpmowncallboundestreeminimalObject.definePropertyprivate databinarieskarmaes7routingReflect.getPrototypeOfshamramdareusereduceweaksetwaapi.envgraphqlidtrimEndtoStringTagpurecjkRFC-6455objbyteOffsetdom-testing-libraryconsoleobjectnumberdiffstringifiersetObject.entriesdragutilitiesgdprharmonyxtermArray.prototype.includesstringifyStyleSheet_.extendfinduptrimStarteventsrulestypepreprocessorproxyString.prototype.trimtapequotetypeofs3react-hooksmoveinternal slotsymboltacitworkspace:*importexportnativepyyamlfunction.lengthvpces-abstractconsumeerrorartsimpledbwafdataViewsafeoptimistkoreanprivatequerystringECMAScript 2019UnderscoreshrinkwrapworkfloweventEmitteri18ndeletefeedcurltestflatMapiamxhrexpressionfunctionsstablegetterdeep-clonerestfulsortRxsameValueZeroomitcompilerECMAScript 6groupByES7asyncMicrosoftreducerzodredactfromreworkterminalstreamstc39httpfilterjsESnextFloat32ArraypackagepushcircularfnmatchTypeScriptdirlinkconfigtoReverseddefinePropertyurlframerbufferswidthemitavafpscontains__proto__loadbalancingfolderphoneshebangstyled-componentsnodeinstallersuperagentcharacterinternalkeyutilfastforkfindLastIndexcloudtrailgetoptlocalconstloggingtypeerrorjshintexec
6.15.104

10 months ago

6.14.103

10 months ago

6.14.104

10 months ago

6.12.92

10 months ago

6.12.93

10 months ago

6.12.96

10 months ago

6.12.94

10 months ago

6.12.95

10 months ago

6.13.100

10 months ago

6.13.101

10 months ago

6.13.102

10 months ago

6.11.78

11 months ago

6.13.99

10 months ago

6.13.97

10 months ago

6.13.98

10 months ago

6.13.96

10 months ago

6.11.79

11 months ago

6.11.92

10 months ago

6.11.91

10 months ago

6.11.90

10 months ago

6.11.81

11 months ago

6.11.80

11 months ago

6.11.89

10 months ago

6.14.102

10 months ago

6.11.88

10 months ago

6.11.87

10 months ago

6.11.86

10 months ago

6.11.85

11 months ago

6.11.84

11 months ago

6.11.83

11 months ago

6.11.82

11 months ago

6.10.78

11 months ago

6.10.77

11 months ago

6.10.76

11 months ago

6.9.76

11 months ago

6.9.75

11 months ago

6.9.74

11 months ago

6.9.73

11 months ago

6.9.72

11 months ago

6.9.71

11 months ago

6.9.70

11 months ago

6.9.69

11 months ago

6.9.68

11 months ago

6.9.67

11 months ago

6.9.66

11 months ago

6.9.65

11 months ago

5.9.65

11 months ago

5.9.64

11 months ago

5.9.63

11 months ago

5.9.62

11 months ago

5.9.61

11 months ago

5.9.60

11 months ago

5.9.59

11 months ago

5.9.58

12 months ago

5.9.57

12 months ago

5.9.56

12 months ago

5.9.55

12 months ago

5.8.55

12 months ago

5.8.54

12 months ago

5.8.53

12 months ago

5.8.52

12 months ago

4.8.52

12 months ago

4.8.51

12 months ago

4.7.51

12 months ago

3.7.51

12 months ago

3.7.50

12 months ago

3.7.49

12 months ago

3.7.48

12 months ago

3.6.48

12 months ago

3.6.47

12 months ago

3.6.46

12 months ago

3.5.46

12 months ago

3.5.45

12 months ago

3.5.44

1 year ago

3.5.43

1 year ago

2.5.43

1 year ago

2.5.42

1 year ago

2.5.41

1 year ago

2.5.40

1 year ago

2.4.40

1 year ago

2.4.39

1 year ago

2.4.38

1 year ago

2.4.37

1 year ago

2.4.36

1 year ago

2.4.35

1 year ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.3.31

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

2.2.21

1 year ago

2.2.20

1 year ago

2.2.19

1 year ago

2.2.18

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.2.13

1 year ago

2.2.12

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

1.1.6

1 year ago

1.1.5

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