5.10.112 • Published 11 months ago

@devtea2026/minus-praesentium-occaecati-odit v5.10.112

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

eslint-define-config

Provide a defineConfig function for .eslintrc.js, and a defineFlatConfig function for eslint.config.js files.

Installation

# add eslint and eslint-define-config to project’s dev dependencies
npm add --save-dev eslint eslint-define-config
# or
yarn add --dev eslint eslint-define-config
# or
pnpm add --save-dev eslint eslint-define-config

Usage

By default only eslint's rules are supported. To activate auto-suggestions for Rules of specific plugins, you need to install the respective types for that plugin.
Plugins can either support their own types, or they could be supported by the community in the @eslint-types repository.

A list of community supported plugins can be found here.

.eslintrc.js

// @ts-check
const { defineConfig } = require('eslint-define-config');

/// <reference types="@eslint-types/typescript-eslint" />

module.exports = defineConfig({
  root: true,
  rules: {
    // rules...
  },
});

Flat Config

eslint.config.js

// @ts-check
const { defineFlatConfig } = require('eslint-define-config');

/// <reference types="@eslint-types/typescript-eslint" />

module.exports = defineFlatConfig([
  'eslint:recommended',
  {
    plugins: {
      // plugins...
    },
    rules: {
      // rules...
    },
  },
]);

Why?

Improve your eslint configuration experience with:

  • auto-suggestions
  • type checking (Use // @ts-check at the first line in your .eslintrc.js or eslint.config.js)
  • documentation
  • deprecation warnings

Video

Click on the thumbnail to play the video

Want to support your own plugin?

:warning: This feature is very new and requires the support of the respective plugin owners

Add a declare module to your plugin package like this:

declare module 'eslint-define-config' {
  export interface CustomRuleOptions {
    /**
     * Require consistently using either `T[]` or `Array<T>` for arrays.
     *
     * @see [array-type](https://typescript-eslint.io/rules/array-type)
     */
    '@typescript-eslint/array-type': [
      {
        default?: 'array' | 'generic' | 'array-simple';
        readonly?: 'array' | 'generic' | 'array-simple';
      },
    ];

    // ... more Rules
  }
}

There are other interfaces that can be extended.

  • CustomExtends
  • CustomParserOptions
  • CustomParsers
  • CustomPlugins
  • CustomSettings

Credits

_.extendUint16Arraysuperstructregular expressionpropertiesES2019mkdirtypedarraysfastcopyutilitiesdiffsafefiltermimetypessharedarraybuffergetOwnPropertyDescriptorrestfulfindmacostoArraystyleformdeterministicscheme-validationoffsetio-tsfull-widthutiloptionterminalURLsetImmediatepushes-shim APIconnectdebuggerjasminelessrequirecolourvariables in cssjsdombyteLengthnested cssArray.prototype.flatMapthrottlenativehookformurlrmdircompile lessawaitframeworkflagnpmtakeobjectbundlerredactglobalformschaiisConcatSpreadableObject.definePropertyrmtraverseshebangtaskcharactersextraviewairbnbinternaltypeoftapeerror-handlingdayjsfast-deep-clonedomdeepcloneconsolepredictableminimalglacierwritableiterationhasOwnPropertytypeses2018lockfileECMAScript 2021duplexTypeScriptes2016foldergroupreduceUint8ArrayexitrangeerrorgdprrobustwindowssyntaxjQuerygetfsES5ObservablesendpointwatchUnderscorerdsjapanesefpstestercryptcolumnsdependenciesfastrouterintrinsicelectronlistenerscircularcommand-linetestingECMAScript 2017code pointss3syntaxerrorECMAScript 2020parentxhrYAMLshrinkwrapobjdirectoryES2022ponyfilles2015environmentsstdlibmiddlewareES6callbindpyyamlhotglobalslibphonenumbergenericscodesargumentSymboltoolsnamestoobjectuuidWeakSetbuffersavaes8react-testing-librarymetadataArray.prototype.findLastlanguagevalidationsymbolsmixinsclientoptimist__proto__trimRightbundlingincludeshashapollospinnerstringifytextsymbolgetPrototypeOfflatworkspace:*zodconsumeargsconcurrencyshell.envcommandhardlinkssigtermstyleskoreanslicehttpsebscall-boundarktypestoragegatewayform-validationindicatorreplayObservableassertsiteratemkdirsReactiveExtensionsnodepromisesmapreducefast-cloneclass-validatortimejsdiffmruasciidefinePropertytoolkittddcollection.es6typedarraypropprototypecreateclassnamesObject.fromEntriesreal-timeFloat32Arraybootstrap cssArray.prototype.flattenObject.getPrototypeOfprivate datacolorreadablestreamremoveassertquerystringschemevisualtslibTypeBoxcachedependency managerauthStreampackageescapeformatECMAScript 7browserslistECMAScript 3getintrinsicconcatmkdirpsidewgetrecursivesymlinksprunesnsjsInt8Arrayless.jsdatecss lessflagsloggerjsonpathhttpStreamsArrayBuffer.prototype.sliceastcensorfindupwalkingshimfixed-widthupcloneformattingencryptiontouchArrayBufferString.prototype.trimdeletefindLastec2spinnerscallwhatwgimportpreprocessorpluginreadwhichautoprefixerECMAScript 2023envcss variablenegative zeroprefixquoteinspectfast-deep-copypatchresolveisArray.prototype.flatcloudwatchcorsbannertestArray.prototype.containspreserve-symlinkssesfastcloneeslintpluginhigher-ordersettingsloggingvpchas-owndebugautoscalingemrObject.valuesBigInt64Arraycomparetypeerrores-abstractwatchingweakmapserializeperformantamazondeepcopyeslintextensionnamecliexpressvaluewrapinputtostringtagapierrorrestES2021xtermESnextECMAScript 2022identifiers0promiseRxsymlinkreactchinesees6weaksetsetPrototypeOfarraybufferefficientiteratorstyled-componentsconcatMapparsertyped arraycloudfrontECMAScript 2016toSortedfunctiongradients css3callbackObject.isenderPushStyleSheetECMAScript 5Int32ArrayjsonoutputregexpHyBihandlersmatchES2023processutil.inspectchromiumshamelbdatasimpledbgradients cssratelimitajvless compilerless cssrm -rfcss nestingJSON-Schemapositivecomputed-types$.extendinferenceSetmochamodulestreamparentspostcsstrimdefineexit-codechromeprogressfindLastIndexserializerfluxagentRxJSpolyfill[[Prototype]]rapiddataviewartbreakbrowserArray.prototype.includesregular expressions-0extendreact-hook-formstringoptimizerequalirqIteratorfunctionalnumberassigntoStringTagenvironmentbeanstalkRegExp.prototype.flagsgroupByeventEmitterpipeloadingassertionlook-upauthenticationjshintloadbalancingsearchdatastructureboundpersistentcontainsbluebirdstyleguideinternal slotsuperagentoperating-systemWeakMapqueuejavascriptdropfseventscopyjsxless mixinslivecore-jstrimStartconfigbootstrap lesslinuxvaluestermlinklookchannelcloudtrailunicodeajaxstreamsdeep-copyWebSocketsvariableswatcherrm -frequalityiddynamodbcorelazyratestylingbcryptpnpm9busyclassesdeeptypanioncjkqslimitwidthsetproxyprotocss-in-jsECMAScript 2018checktelephoneeveryschemaES2018structuredClonemomentvestmodulescurlperformanceuninstalldom-testing-librarykeyscolorsPromisetrimEnddirArray.prototype.filtersignalsjestECMAScript 2015256cloudsearchtypesafepicomatchi18ngetoptreact-hookswriteinterruptsl10nbindworkflowCSSmobilelinewrapredux-toolkitstatergbprotobufeslint-pluginvarsgetterpackagescolumnMicrosoftReflect.getPrototypeOfdescriptorarrayemojicall-bindmatchesES2015AsyncIteratoreventDispatcherlastfastifystatuseslintconfigwebinstallprivatemapaccessibilitydataViewwatchFilestylesheetMapelasticachedotenvemitlengthargparsesigintsetterserializationvalidatecollectionReactiveXfunctionsObject.assignes-shimssortedworkerObject.entrieseventsrandomspeedclassnameURLSearchParamsdescriptorshasa11yes5package manageronceawsforEachlrufind-upmake direlmnodejsECMAScript 6omitprettymatchAllesswfBigUint64ArrayES2016rfc4122sharedtrimLeftWebSocketglobpathyamlFloat64Arrayfast-copybyteOffsetinmakepackage.jsonmulti-packagesameValueZerokinesisparsereduxreducerRegExp#flagsfilegraphqlpasswordprotocol-buffersRFC-6455cloudformationexpressioneast-asian-widthflattenparsinges2017iammime-dbES8ES2020browserlistopenenumerableES7coerciblekarmaconfigurablesomeUint32ArrayexecstringifiersignalarrayssqscharacterbufferUint8ClampedArrayregeximportexporttypescriptcallboundfullwidthttyinvariantasyncjwtTypedArraydescriptiontyperegularfigletObject.keysslotansifetchspeckeyflatMapfile systemtc39throatpropertytapphonestreams2cssString.prototype.matchAllownfromzerovalidqueueMicrotaskinstallerESecmascriptES2017route53deep-cloneidleruntimecompilerwordwrapFunction.prototype.nameawesomesauce@@toStringTagstarterpostcss-plugin
5.10.112

11 months ago

4.10.112

11 months ago

4.10.111

11 months ago

4.10.110

11 months ago

4.10.109

11 months ago

4.10.108

11 months ago

4.10.107

11 months ago

4.10.106

11 months ago

3.8.89

12 months ago

1.3.50

1 year ago

1.3.53

1 year ago

1.3.51

1 year ago

1.3.52

1 year ago

3.9.101

11 months ago

3.9.102

11 months ago

3.9.100

11 months ago

3.8.90

11 months ago

3.8.91

11 months ago

1.3.31

1 year ago

1.3.32

1 year ago

1.3.30

1 year ago

2.7.88

12 months ago

1.3.35

1 year ago

2.7.87

12 months ago

1.3.36

1 year ago

1.3.33

1 year ago

1.3.34

1 year ago

1.3.39

1 year ago

1.3.37

1 year ago

2.7.89

12 months ago

1.3.38

1 year ago

1.7.83

12 months ago

1.7.84

12 months ago

1.7.85

12 months ago

1.7.86

12 months ago

1.7.87

12 months ago

1.3.42

1 year ago

1.3.43

1 year ago

1.5.67

1 year ago

1.3.40

1 year ago

1.5.66

1 year ago

1.3.41

1 year ago

1.3.46

1 year ago

1.5.68

1 year ago

1.3.47

1 year ago

1.3.44

1 year ago

1.3.45

1 year ago

1.3.48

1 year ago

1.3.49

1 year ago

3.9.99

11 months ago

1.6.80

12 months ago

1.6.82

12 months ago

1.6.81

12 months ago

1.4.60

1 year ago

1.6.83

12 months ago

1.4.62

1 year ago

1.4.61

1 year ago

1.4.64

1 year ago

1.4.63

1 year ago

1.4.66

1 year ago

1.4.65

1 year ago

3.9.97

11 months ago

3.9.98

11 months ago

3.9.95

11 months ago

3.9.96

11 months ago

3.9.93

11 months ago

3.9.94

11 months ago

3.9.91

11 months ago

3.9.92

11 months ago

3.7.89

12 months ago

3.10.104

11 months ago

3.10.103

11 months ago

3.10.106

11 months ago

3.10.105

11 months ago

1.3.29

1 year ago

3.10.102

11 months ago

1.2.20

1 year ago

1.6.68

1 year ago

1.2.23

1 year ago

1.6.69

1 year ago

1.2.24

1 year ago

1.2.21

1 year ago

1.2.22

1 year ago

1.2.27

1 year ago

1.2.28

1 year ago

1.2.25

1 year ago

1.2.26

1 year ago

1.2.29

1 year ago

1.6.71

1 year ago

1.6.70

1 year ago

1.6.73

1 year ago

1.6.72

1 year ago

1.6.75

12 months ago

1.6.74

12 months ago

1.6.77

12 months ago

1.4.53

1 year ago

1.6.76

12 months ago

1.6.79

12 months ago

1.4.55

1 year ago

1.6.78

12 months ago

1.4.54

1 year ago

1.4.57

1 year ago

1.4.56

1 year ago

1.4.59

1 year ago

1.4.58

1 year ago

1.2.19

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago