3.0.2 • Published 6 months ago

@grnx-utils/eslint v3.0.2

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

@grnx-utils/eslint

npm version PRs Welcome

Custom eslint configuration built on top of eslint-kit presets. Adds eslint plugins like @nx , prefer-arrow and more. The config will be expanded in the future.

Eslint-kit is a library that provides ready-made eslint presets and it belongs to Evgeny Zakharov.

Installation

yarn add @grnx-utils/eslint eslint@^8.46.0 prettier@^3.0.0 typescript@^5.2.2 eslint-kit@10.0.0 -D

Usage

After installing, add the .eslintrc.js file in your project root:

const grnx = require('@grnx-utils/eslint')


module.exports = grnx({
  root: __dirname,   // project root (required)
  monorepo: true,
  tsconfig: 'tsconfig.base.json'   // when using a monorepo like Nx
})

Warning The package may not work with node 21 and higher.

Configure API

grnx({
  /** project root
   * @type {string}
   * @example __dirname
   */
  root: __dirname,
  /** enables monorepo mode
   * @default false
   */
  monorepo: true,
  /** eslint ignore patterns
   * @default ['**//*'] (in monorepo mode)
   */
  ignore: ['**/*'],
  /** tsconfig path
   * @example tsconfig.base.json
   * @default tsconfig.json
   */
  tsconfig: 'tsconfig.json',
  /** extensions provided by eslint-kit
   * in the default configuration there
   * are only 5 presets
   * @default []
   */
  extensions: ['vue', 'solidJs'],
  /**
   * enables eslint-kit allowDebug
   * @default false
   */
  allowDebug: true,
  /** enables presets.imports() - unstable preset,
   * errors are possible.
   * @default true
   */
  enableImports: false,
  /** additional eslint rules
   * @default {}
   */
  ext: {
    'react-hooks/exhaustive-deps': 'warn'
  }
})

List of packages used by @grnx-utils/eslint

Will be expanded in the future.


Warning The package does not support the new eslint.config.js file provided by the latest versions of eslint. Possible configuration errors

3.0.2

6 months ago

3.0.1

6 months ago

3.0.0

6 months ago

2.0.0

7 months ago

1.3.24

8 months ago

1.3.23

8 months ago

1.3.22

8 months ago

1.3.21

8 months ago

1.3.20

8 months ago

1.3.19

8 months ago

1.3.18

9 months ago

1.3.17

9 months ago

1.3.16

9 months ago

1.3.15

9 months ago

1.3.14

9 months ago

1.3.7

9 months ago

1.3.6

9 months ago

1.3.5

9 months ago

1.3.4

9 months ago

1.3.3

9 months ago

1.3.2

9 months ago

1.3.1

9 months ago

1.2.18

9 months ago

1.2.17

9 months ago

1.2.5

9 months ago

1.1.1

9 months ago

1.0.9

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.4

9 months ago

0.0.1

9 months ago

1.0.3

9 months ago

1.0.1

9 months ago