7.12.107 • Published 10 months ago

@patrtorg/saepe-expedita v7.12.107

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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');
const js = require('@eslint/js');
const customConfig = require('./custom-config.js');

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

module.exports = defineFlatConfig([
  js.configs.recommended,
  customConfig,
  {
    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

ES3parentsdirectoryfilestringifierebshooksfast-copyvisualremovehtmleslintconfigdeep-cloneconsttoArrayharmonyES6cloudtrailhas-ownlockfileswfclassnamebindirtoolkitrmgetPrototypeOfbundlingarrayjapaneseterminalMicrosoftcloudsearchmatchsubprocessformArray.prototype.findLastIndexpreprocessorrulesString.prototype.trimES2018upfast-deep-clonepipeserializerinspectES2021execfilequeryownES2016dotenvs3source mapUint32Arrayconfigurabletddtrimpackagesvpcpackage managerstablebrowserdependenciesgitignore3dcjkzeronpmignorereuseelasticacheomitpyyamlcopytoStringTages2018offsetreducenumbersyntaxerrorcolourperformantobjectURLbinariesequalcompareextraloadbalancingclonesnsObject.valuesECMAScript 2021helperutilitywarninggdpres-shimsUint16ArrayArray.prototype.flattenoptimistES2023Array.prototype.filterenvironmentwaapimapreducecode pointsassertregulardescriptorsloggercall-bindtypescriptcolumninternalcommand-linerm -rfelectrondescriptionkeyconsoleObject.getPrototypeOfenumerablestylesbyteLengthuser-streamseventEmitterspinnersdefinePropertya11yECMAScript 2018libphonenumberfunction.lengthcss-in-jsObservableStreamsvarsjoiarraybuffermake diranimationajaxmatchesgroupBycolorspromiseespropertieseast-asian-width_.extendlocalnegative zerotc39bufferWebSocketsObservablesURLSearchParamscallregexfast-cloneeslintpluginYAMLhardlinksreduxdomthreestreamautoprefixerxhrPushinternal slotseseslintflattenredactpatchestreerouterspringES2022findLastIndexfast-deep-copyECMAScript 6accessorform-validationvalidmergexmlPromisecoreflagsECMAScript 2022WebSocketutilsInt8Arraylettoobjectes-abstractObject.entriesinferenceshebangRegExp#flagsprotomodulereal-timechildagentstylingtyped arraycodestermasciitoolsfindpropertyfpsnodejsES7deepcloneESnextBigUint64ArraystyleguideweaksetzxESbinaryawesomesauceeffect-tsmochanamewidthchannelcurlinstallereventstapequotevalidatestringifyprocessspeedjsxselftsprotobufHyBisidemulti-package[[Prototype]]bannerinreact-testing-libraryendpointmapStreamgroupBigInt64Arrayhttpsentriesflatcore-jsredirectstreamstypedarraycreatecolumnsmoduleshashlastrangeerrorvalidationfastcopyrm -frformatdataviewincludesyamlexpressvaluesjson-schema-validatorroutingroutefind-upweakmapartkoreanpruneweb__proto__util.inspectlrucharactersespreeerrorperformancecachepicomatchgetterECMAScript 2023storagegatewayES8shelllisteners6to5deep-copyvariablesjshintmobileender$.extendframerprototypereact animationRxmonorepolook-upaccessibilityfastcloneworkflowObject.fromEntriesmkdirsiddiffacornreversedeeputilvardatestylebundler
7.12.106

10 months ago

7.12.105

10 months ago

7.12.107

10 months ago

7.12.104

10 months ago

7.12.103

10 months ago

7.12.102

10 months ago

7.12.101

10 months ago

7.12.100

10 months ago

7.12.99

10 months ago

7.12.98

10 months ago

7.12.97

10 months ago

7.12.96

10 months ago

7.12.95

10 months ago

7.12.94

10 months ago

7.12.93

10 months ago

7.12.92

10 months ago

7.12.91

10 months ago

7.12.90

10 months ago

7.12.89

10 months ago

7.11.89

10 months ago

7.11.88

11 months ago

7.11.87

11 months ago

7.10.87

11 months ago

7.10.86

11 months ago

7.10.85

11 months ago

7.10.84

11 months ago

7.10.83

11 months ago

7.10.82

11 months ago

7.10.81

11 months ago

7.10.80

11 months ago

6.10.80

11 months ago

6.10.79

11 months ago

6.10.78

11 months ago

6.9.78

11 months ago

5.9.78

11 months ago

5.9.77

11 months ago

5.9.76

11 months ago

5.9.75

11 months ago

5.9.74

11 months ago

5.9.73

11 months ago

4.9.73

11 months ago

4.9.72

11 months ago

4.9.71

11 months ago

4.9.70

11 months ago

4.9.69

11 months ago

4.9.68

11 months ago

4.9.67

11 months ago

4.9.66

11 months ago

4.9.65

11 months ago

4.9.64

11 months ago

4.8.64

12 months ago

4.8.63

12 months ago

4.8.62

12 months ago

4.8.61

12 months ago

4.8.60

12 months ago

4.8.59

12 months ago

4.8.58

12 months ago

3.8.58

12 months ago

3.8.57

12 months ago

3.7.57

12 months ago

2.7.57

12 months ago

2.7.56

12 months ago

2.7.55

12 months ago

2.7.54

12 months ago

2.6.54

12 months ago

2.6.53

12 months ago

2.6.52

12 months ago

2.6.51

12 months ago

2.6.50

12 months ago

2.6.49

12 months ago

2.6.48

1 year ago

2.6.47

1 year ago

2.6.46

1 year ago

2.6.45

1 year ago

2.6.44

1 year ago

2.5.44

1 year ago

2.5.43

1 year ago

2.5.42

1 year ago

2.4.42

1 year ago

2.4.41

1 year ago

2.3.41

1 year ago

2.3.40

1 year ago

2.3.39

1 year ago

2.3.38

1 year ago

2.3.37

1 year ago

2.3.36

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.3.30

1 year ago

2.3.29

1 year ago

2.3.28

1 year ago

2.3.27

1 year ago

2.3.26

1 year ago

2.3.25

1 year ago

2.3.24

1 year ago

2.3.23

1 year ago

2.3.22

1 year ago

2.3.21

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

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

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.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