1.0.4 • Published 12 days ago

@teamteanpm2024/sint-eligendi-libero v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

@teamteanpm2024/sint-eligendi-libero 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 @teamteanpm2024/sint-eligendi-libero:

npm install @teamteanpm2024/sint-eligendi-libero --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('@teamteanpm2024/sint-eligendi-libero');
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('@teamteanpm2024/sint-eligendi-libero');
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('@teamteanpm2024/sint-eligendi-libero');
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"]
    }
  ]
}
Reflect.getPrototypeOfmomentES2015operating-systemform-validation@@toStringTaghelpersdatawebsiteprotocol-buffersjsxemitchineseflattencommandES7multi-packagefseventsgroupxssspringerror-handlingjson-schemaArray.prototype.filtermatchsigintqsdefineFloat64Arraybcryptcolorsjson-schema-validationtostringtagautoprefixergesturestypesafedependenciesgettergradients cssargvgetcreatedropInt32ArraybabelenumerablemonoreposchemehasOwnstringifytacitdeep-clonenumberauthenticationstylingsuperagentwalkingstatelessfast-copycheckdeepclonephoneECMAScript 2023preprocessorwatchingdeleteECMAScript 2021shamrapides2018chromebootstrap lessRFC-6455assertslinewrapsetPrototypeOfECMAScript 2020pathes-abstractnegativeobjectqueuerangeerrores2017startervaluees2016mobilelimitedmake dirfastcopybyteOffsetreact poseredactproto_.extendObjectecmascriptshrinkwrapObservablestrimLeftapikeyswritablecmdcompile lessxhrloggerclonesyntaxerrortranspilemapStreamsexpressioncoercibletextopenless.jstrimfsconsoleargspostcsses-shimstypecolorstreamsimmutablemkdirprunegradients css3eventsnativelimitfunctionsES3computed-typesECMAScript 2015private dataURLSearchParamsnamesvalidationBigUint64ArraytaskidECMAScript 2018String.prototype.trimCSSlengtheslintconfigsymlinksObject.valuesformattingObservablefunctionaljavascriptjQueryArray.prototype.findLastRxJScallbindclassesYAMLlanguagepromisesbatchsetterSetaccessorthrottlestreamarraysajv0jsonutilStyleSheetopensstylesheetspeedlastbrowserlisttslibcolumncharacterprettyresolvesomepoint-freeastArrayBuffer#sliceprivatecodesArray.prototype.includesSymbol.toStringTagcallboundsignalutil.inspecttypeerrorserializationconcurrencyfind-upcontainssortRegExp.prototype.flagsiteratorencryptioneventEmitterfastxtermidlecurlunicodenested cssESnextsanitizationbrowserslisttoStringTagbundlerES8nopepreserve-symlinkssharedarraybufferscheme-validationlook-upperformanceIteratorfullponyfillbannerkoreanformstddreducesymboleventDispatcherpositivees-shim APIMapreal-timeMicrosoftTypedArrayparentslruhttpminimalECMAScript 2017dragInt8Arraysortedrobustkarmasyntaxcopyfastclonedescriptorperformanta11yposerecursivemoduleramdapolyfillescapeflatvaluescall-bindintrinsicObject.keysi18ncorecall3dSymbolmacosarraytypeofframeworkstablepatchawesomesaucestyled-componentseast-asian-widthgetOwnPropertyDescriptorbddreactcommand-linespinnertyped arrayString.prototype.matchAllartparseres6TypeBoxextendcode pointsrateasciiconcatArrayBuffer.prototype.sliceharmonyes5guidECMAScript 2019mimetypessigtermhttpsjwtparentoutputstyleguidemetadataflagcliinferencethreeinstalldataViewlazymovesameValueZeroredux-toolkitirqomitWeakSetfunctionstartformcolumnsconsumefastifyECMAScript 3setImmediatexdg-openrequireaccessibilityfull-width.envprotobufbootstrap cssfullwidthcorsstructuredClonePromiseUint8ClampedArraymiddlewaretoArrayislibphonenumberlogwrapuninstallvariablesfindupestreeexit-codeauthassertionES2023datastructurewarningairbnbsideapollocjkfpbrowserregular expressionhardlinksformatoptimizerObject.fromEntriestapecollection.es6eslintpluginnpmterminalajaxargumentstraversechromiumarktypewriteloggingthroatspawnbufferenvironmentpersistentconfigexitrm -frwhatwgdomes2015schemakeylinuxoptimisttypedarraymime-dbinputcss lesstc39errorstatusjasminestringifiercryptoconcatMaptestingESequalitydeepcopyexecrmdirequalhooks__proto__trimRightbluebirdfolderesstreams2tapefficientcompilertypedarraysmruxdgupAsyncIteratorspinnersECMAScript 5vesthookformlesscssJSON-SchemapyyamlbusyES5linkshellObject.iswidthoptionregular expressionsrm -rfRegExp#flagspropgdprRxmkdirpinternalpicomatchrgbECMAScript 2022pipefile systemhasnodelettypespnpm9boundutilsPushnodejsmimeoffsetcss variablerequestlintgetPrototypeOfhandlerstypanionWebSocketsgetoptdeterministicurltspackageses8css-in-jscolourbabel-coreiterationelectronfantasy-landl10ncallbackslottestUint32Arraylessmergeweaksetrfc4122findLastpackage.jsonFunction.prototype.nameparseruntimepropertiessettingsHyBimkdirsECMAScript 6debuggerspecrmECMAScript 7package managereslintratelimitFloat32ArrayawaitObject.entriespasswordStreamentriesdebugnegative zerowatchshimArraymodulesuuiddircurriedUnderscoreinterruptsclass-validatorexpressviewreducerdataviewcacheInt16Arrayclientenvvariables in csstrimStartreadablestreamreact-hook-formwebonceassertenderhashgraphqlobj256deepvalidatorwatchFilesearchless mixinssetjoieditor[[Prototype]]remove6to5Object.definePropertydom-testing-libraryreuseUint16ArraylistenersWebSocketwordbreakES2017workspace:*packagepurequotecensorchannelReactiveXcore-jsvarArray.prototype.flatMapjson-schema-validatorinvariantclassnameconstpushbuffersmatchesextrapromisejsdomwhichconnectzeroArray.prototype.findLastIndextoolkitregexES2016visualreact-hooksmixinszodES2019weakmapprogressObject.assignserializeprocessdotenvjsdiffWeakMapwaapitelephoneutilitycharactersvalidatestringsanitizecssquerystringlookbindES2018stylesprototypeieextensionregularassignasyncES2022symlinkfast-cloneimporttouchurlsreadableforEachbytevalidincludesObject.getPrototypeOffigletdefinePropertyjstermless compilertranspilerdescriptiontoolscircularArray.prototype.containstypedfast-deep-copyreduxtoSortedfindLastIndexavacryptio-tsuser-streamsArray.prototype.flattenmatchAllsliceshebangjapanesefast-deep-cloneinternal slotless cssdirectoryimmerreact-testing-libraryjestfilecommanderreact animationcall-boundES2021symbolssharedArray.prototype.flatduplexsequenceinstallerbreakexecutablewaitflatMapregexpgetintrinsicqueueMicrotaskTypeScriptinspectsignalsmochaopenerUint8ArrayES2020BigInt64Arrayglobyamldefaultdeep-copy
1.0.2

14 days ago

1.0.4

12 days ago

1.0.3

13 days ago

1.0.1

15 days ago

1.0.0

16 days ago