1.0.0 • Published 1 year ago

@rabiepenpm/rerum-possimus-modi v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@rabiepenpm/rerum-possimus-modi CI NPM version Conventional Commits

An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @rabiepenpm/rerum-possimus-modi:

npm install @rabiepenpm/rerum-possimus-modi --save-dev

Usage

Here's an example ESLint configuration that:

  • Sets sourceType to script for CJS plugins (most users) (use module for ESM/TypeScript)
  • Enables the recommended configuration
  • Enables an optional/non-recommended rule

.eslintrc.json

{
  "extends": ["plugin:eslint-plugin/recommended"],
  "rules": {
    "eslint-plugin/require-meta-docs-description": "error"
  }
}

eslint.config.js (requires eslint>=v8.23.0)

const eslintPlugin = require('@rabiepenpm/rerum-possimus-modi');
module.exports = [
  eslintPlugin.configs['flat/recommended'],
  {
    rules: {
      'eslint-plugin/require-meta-docs-description': 'error',
    },
  },
];

Rules

💼 Configurations enabled in.\ ✅ Set in the recommended configuration.\ 🔧 Automatically fixable by the --fix CLI option.\ 💡 Manually fixable by editor suggestions.\ 💭 Requires type information.

Rules

Name                         Description💼🔧💡💭
fixer-returnrequire fixer functions to return a fix
meta-property-orderingenforce the order of meta properties🔧
no-deprecated-context-methodsdisallow usage of deprecated methods on rule context objects🔧
no-deprecated-report-apidisallow the version of context.report() with multiple arguments🔧
no-missing-message-idsdisallow messageIds that are missing from meta.messages
no-missing-placeholdersdisallow missing placeholders in rule report messages
no-property-in-nodedisallow using in to narrow node types instead of looking at properties💭
no-unused-message-idsdisallow unused messageIds in meta.messages
no-unused-placeholdersdisallow unused placeholders in rule report messages
no-useless-token-rangedisallow unnecessary calls to sourceCode.getFirstToken() and sourceCode.getLastToken()🔧
prefer-message-idsrequire using messageId instead of message or desc to report rule violations
prefer-object-ruledisallow function-style rules🔧
prefer-placeholdersrequire using placeholders for dynamic report messages
prefer-replace-textrequire using replaceText() instead of replaceTextRange()
report-message-formatenforce a consistent format for rule report messages
require-meta-docs-descriptionrequire rules to implement a meta.docs.description property with the correct format
require-meta-docs-recommendedrequire rules to implement a meta.docs.recommended property
require-meta-docs-urlrequire rules to implement a meta.docs.url property🔧
require-meta-fixablerequire rules to implement a meta.fixable property
require-meta-has-suggestionsrequire suggestable rules to implement a meta.hasSuggestions property🔧
require-meta-schemarequire rules to implement a meta.schema property💡
require-meta-typerequire rules to implement a meta.type property

Tests

Name                       Description💼🔧💡💭
consistent-outputenforce consistent use of output assertions in rule tests
no-identical-testsdisallow identical tests🔧
no-only-testsdisallow the test case property only💡
prefer-output-nulldisallow invalid RuleTester test cases where the output matches the code🔧
test-case-property-orderingrequire the properties of a test case to be placed in a consistent order🔧
test-case-shorthand-stringsenforce consistent usage of shorthand strings for test cases with no options🔧

Presets

NameDescription
recommendedenables all recommended rules in this plugin
rules-recommendedenables all recommended rules that are aimed at linting ESLint rule files
tests-recommendedenables all recommended rules that are aimed at linting ESLint test files
allenables all rules in this plugin, excluding those requiring type information
all-type-checkedenables all rules in this plugin, including those requiring type information
rulesenables all rules that are aimed at linting ESLint rule files
testsenables all rules that are aimed at linting ESLint test files

Semantic versioning policy

The list of recommended rules will only change in a major release of this plugin. However, new non-recommended rules might be added in a minor release of this plugin. Therefore, using the all, rules, and tests presets is not recommended for production use, because the addition of new rules in a minor release could break your build.

Preset usage

Both flat and eslintrc configs are supported. For example, to enable the recommended preset, use:

eslint.config.js

const eslintPlugin = require('@rabiepenpm/rerum-possimus-modi');
module.exports = [eslintPlugin.configs['flat/recommended']];

.eslintrc.json

{
  "extends": ["plugin:eslint-plugin/recommended"]
}

Or to apply linting only to the appropriate rule or test files:

eslint.config.js

const eslintPlugin = require('@rabiepenpm/rerum-possimus-modi');
module.exports = [
  {
    files: ['lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['flat/rules-recommended'],
  },
  {
    files: ['tests/lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['flat/tests-recommended'],
  },
];

.eslintrc.js

{
  "overrides": [
    {
      "files": ["lib/rules/*.{js,ts}"],
      "extends": ["plugin:eslint-plugin/rules-recommended"]
    },
    {
      "files": ["tests/lib/rules/*.{js,ts}"],
      "extends": ["plugin:eslint-plugin/tests-recommended"]
    }
  ]
}
fastcopyES2019css-in-jsinputzeroWebSocketsmatchessomeestreedefinemobiletapoffsetarraycircularargumentcharacterswordwraptypedtestingStreamhardlinksform-validationnested cssschemacallbackstatusshrinkwrapprivatesortedloggingformatwordbreakexpressioncoloures2015fast-copycommanderurldependency manageruppropslotbindgetintrinsicHyBifastcloneECMAScript 2015json-schemaanimationletcreatepostcss-plugindroplengthcjkFloat64Arrayvestarraybuffercompile lessruntime__proto__nodeflatMapCSSStyleDeclarationstylesetserializationstringes2016protowalklook-upratefindLastfromdateprogressframerTypeScriptauthenticationenvironmentmodulessuperstructparentstringifyajax6to5valuesUint32Arrayuser-streamshelpersscheme-validationprefixES3deepclonefastfileless cssdataViewemitgettertypesansi0prunedebuggerRegExp.prototype.flagsworkermatchObject.valuesisConcatSpreadablekarmagraphqlECMAScript 2020symboliejsdifftypehigher-orderPushshellgroupBybabel-corefast-deep-copysameValueZeroArray.prototype.flatdeepcopyES2021everyqueryminimalhookformxhrdeep_.extendES2018formsconcurrencyclassnameopendatastructureECMAScript 2019windowschinesefast-cloneUint8ArraywarningbyteLengthTypedArrayhasOwnassertlinewrapeventEmittertoSorteddebugdomwatcharraysclientargsbrowserslistrfc4122Object.getPrototypeOfJSONweaksetBigInt64ArrayUnderscorejsonpathsafeparentscachelesscss256l10nsigintnumberkeyECMAScript 5linuxpromisespnpm9textRxJSmixinseslintplugindeterministiccallrmeslintconfigbundlinggradients csseslint-pluginfunctionstatelesswaapieventDispatchershimsymlinksreduxSetbrowserlistidletypesaferecursiveBigUint64ArraywhatwgconsolecopysigtermflatshamnopeinterruptserrorECMAScript 2022prettyjssearchcore-jsclass-validatorbufferpropertiesqueuemulti-packageomit[[Prototype]]es-abstractRFC-6455utilityimmutablemime-db@@toStringTagstreamscorevalidatorbatchxtermES2020ratelimittypedarrayslessbluebirdconnectmimelimitedStyleSheetinstallposepromiseparserintrinsicawesomesauceMicrosoftESnextunicodecss nestingregular expressionpreserve-symlinksfindless.jsutilquerystringchromehashreact animationInt16ArrayflagsArrayfolderreactmapisa11ycompilerwidthzodemojimimetypesclassesvalueairbnbcomparestreamtoolsbounditerationstarterinstallermake dirprotobufInt8ArrayURLspeccryptObject.definePropertyStreamsfunctionsexpresskoreancss variablelistenersphonepackage.jsonassignaccessibilitysyntaxconsumevalidationawaittouchstylingrm -rfES7deletebootstrap cssreducetrimStartthrottlerobustvalidateSymbolreadablestreameventsArray.prototype.containsspinnermomentcontainsvariableswgetoptimizerfile systemdataviewsettingsnamepipelimittypanionbreaktelephonesidesignalimporthttpinternaljson-schema-validationcensorObject.assigncodesargparsees2018filterObservablesdom-testing-libraryformtypeofpatchWeakMapArray.prototype.filteresweakmapastframeworkwalkingsorttrimrm -frlanguagetssymlinkutil.inspectString.prototype.matchAllrandomjQuerydescriptorsECMAScript 2017vargenericsObjectstreams2sharedconcatMapsharedarraybufferinspectlinkassertiongroupfull-widthavalazymatchAllrgbprivate databootstrap lessJSON-SchemasetPrototypeOfhooksObject.isspeedextendoptionYAMLentriesfigletes5symbolsrmdirstabledescriptorassertsdataes-shim APIexit-codemergereuseclonecomputed-typesindicatorwritetypeerrorpostcsscollectionmruchannelsetterwatchFileglobqueueMicrotaskmetadatanegative zerointernal slotcolorsfunctionalclassnamespolyfillremovesliceflagexecgradients css3toStringTaglintescapejson-schema-validatortoobjectpersistentcollection.es6styleguideserializerinferencejwtwebfullperformantReflect.getPrototypeOffast-deep-clonees-shimsextranpmsetImmediateforEachES2017efficientdircolumnscsslruArray.prototype.flatMapttyECMAScript 6ReactiveExtensionscall-boundthreeredactless mixinslockfileFunction.prototype.nameyupobjecttc39testuuidtesterfixed-widthworkspace:*logreadablegetOwnPropertyDescriptorcoloriteratecolumnfindupfetcheast-asian-widthreal-timeyamltermtoArraybuffersjavascriptRxjsonformattingquotejsxwhichpropertyresolveiteratorlastprotocol-buffersartconstregexpcallboundECMAScript 2018toolkitmacostypescriptbrowsergdprterminaltyped arraydotenvless compilertrimEndreact-hooksArrayBuffer.prototype.slicesuperagentArray.prototype.includesrequiredirectorypasswordjapanesestylesequalnodejscurlpyyamlIteratorcode pointstrimLeftUint16ArrayregularmiddlewareapollooptimistURLSearchParamsenvfindLastIndexgesturesECMAScript 7tddwrapbannerECMAScript 3ECMAScript 2023schemewatcherfind-upregexchaiduplexloadingio-tsmkdirptakeECMAScript 2016ponyfillhaspopmotionmovestructuredClonestdlibreducerArrayBufferObservableeslintreact-hook-formautoprefixerexitfastifybundlermkdiruninstallonceequalitymakees8extensiontypedarrayfscoercibleajvjsonschemarequesthttpsSymbol.toStringTaglibphonenumberpreprocessorpicomatchredux-toolkit.envjsdomconcattapepackagenamesgetTypeBoxtslibdependenciesmochataskArray.prototype.findLastIndexMapPromiseobjECMAScript 2021invariantperformanceES8WebSocketharmonytostringtagfseventscallbindAsyncIteratorArray.prototype.findLastimmerWeakSetCSSchromiumcorserror-handlingenderbcryptcss lessapiArray.prototype.flattencall-bindbabeljasmineESqsrangeerrorhandlersnegative3dserializesequence-0enumerableoperating-systemoutputmkdirsconfigES2022prototype$.extendargvcommandvisualreact-testing-libraryfullwidthgetoptgetPrototypeOfdayjsmoduleincludesReactiveX
1.0.0

1 year ago