Detalhes do pacote

@kevinoid/eslint-config

kevinoid3.3kMIT33.3.0

ESLint shareable config for @kevinoid's style (based on airbnb).

eslint, eslintconfig

readme (leia-me)

@kevinoid's ESLint Config

Build Status Dependency Status Supported Node Version Version on NPM

An ESLint shareable configs for @kevinoid's preferred style (based on Airbnb style).

Installation

Before using any configuration from this package, it must be installed, either globally or locally, which can be done using the following steps:

  1. Install peerDependencies (and transitive peerDependencies) for @kevinoid/eslint-config. This can be done using npx install-peerdeps --dev @kevinoid/eslint-config, install-peerdeps or manually based on the output from npm info @kevinoid/eslint-config peerDependencies.
  2. Install this package (e.g. npm install @kevinoid/eslint-config).

Usage

This package includes configurations for several different environments:

Name Description
@kevinoid/eslint-config/browser Modern browsers
@kevinoid/eslint-config/ie11 Browsers including Internet Explorer 11.
@kevinoid/eslint-config/nodejs Node 6 and later.
@kevinoid/eslint-config/webextensions Browser Extensions
@kevinoid/eslint-config/wsh JScript 5.8) in Windows Script Host)

Add the chosen configuration to extends in .eslintrc, for example:

{
  "extends": "@kevinoid/eslint-config/nodejs"
}

or eslintConfig in package.json, for example:

{
  "name": "packagename",
  "version": "1.0.0",
  ...
  "eslintConfig": {
    "extends": "@kevinoid/eslint-config/nodejs"
  }
}

License

This project is available under the terms of the MIT License. See the summary at TLDRLegal.

The template upon which this project is based is available under the terms of CC0 1.0 Universal.

changelog (log de mudanças)

33.3.0 (2024-12-03)

Features

  • New @kevinoid/eslint-config/browser configuration for modern browsers.

33.2.0 (2024-11-02)

Features

  • Configure n/no-unsupported-features/node-builtins to allow experimental features (aa803d8)
  • Configure n/no-unsupported-features/node-builtins to stop ignoring fetch, which is now allowed as an experimental feature (aa803d8)

33.1.0 (2024-11-02)

Features

  • Configure n/no-unsupported-features/node-builtins to ignore fetch, due to unnecessary warnings about experimental status on Node.js 18-20 (6555383)

33.0.0 (2024-10-31)

BREAKING CHANGES

Features

32.0.0 (2023-10-20)

BREAKING CHANGES

  • Drop support for Node.js <18.

Features

31.1.0 (2023-10-01)

Features

31.0.0 (2023-09-06)

Features

  • Group builtin imports separately before others in the import order (c1aaec3)

30.0.0 (2023-08-17)

BREAKING CHANGES

Features

  • Extend plugin:jsdoc/recommended-error rather than converting warn to error (6a316b9)

29.0.0 (2023-05-07)

BREAKING CHANGES

Bug Fixes

  • Rename node.js to nodejs.js to avoid inadvertent invocation on Windows. Continue to export /node and /node.js from this package for compatibility. (f313889)

28.1.0 (2022-10-23)

Features

  • Disable n/no-process-exit (5bd1dc8) which is already checked by the built-in no-process-exit rule.

28.0.0 (2022-10-23)

BREAKING CHANGES

Features

  • Support Node.js >16 (9fe3e66)
  • Disable unicorn/prefer-module for webextensions (831eabb)
  • Enable unicorn/prefer-array-flat-map in webextensions (bcb9dce)
  • Ignore import/no-unresolved false-positives (c10642a)

27.1.1 (2022-08-24)

Features

27.1.0 (2022-07-03)

Features

  • Bump parserOptions.ecmaVersion to 2022 (7e1978d)

27.0.0 (2022-07-03)

BREAKING CHANGES

26.0.0 (2022-05-05)

BREAKING CHANGES

  • Drop support for Node.js 12. Require Node.js 14.14 or later.

Features

  • use parserOptions.ecmaVersion 2021 (14611b2)

25.0.0 (2022-04-01)

BREAKING CHANGES

Bug Fixes

  • disable capIsNew new-cap option for WSH (2e40bf5)
  • disable jsdoc/no-undefined-types for WSH (3d9c51d)

24.0.0 (2022-01-03)

BREAKING CHANGES

23.0.0 (2021-09-15)

BREAKING CHANGES

22.0.0 (2021-08-04)

BREAKING CHANGES

21.0.0 (2021-06-29)

BREAKING CHANGES

Bug Fixes

Features

20.0.0 (2021-06-07)

BREAKING CHANGES

Dependency Updates

Bug Fixes

  • Match trailing comma in max-len ignorePattern (aeb7825)

19.0.1 (2021-05-29)

Bug Fixes

  • Improve code for importing peer dependencies to fix issues when require.main is not eslint. (d898698)

19.0.0 (2021-05-29)

Dependency Updates

18.0.1 (2021-05-16)

Features

  • Configure definedTypes for the jsdoc/no-undefined-types rule for ECMAScript/TypeScript types which do not have a matching name in the global scope (e.g. Generator, Iterator, etc.).

18.0.0 (2021-05-14)

BREAKING CHANGES

Dependency Updates

17.1.0 (2021-05-06)

Features

  • Disable unicorn/prefer-node-protocol until node: is supported by eslint-plugin-node.
  • Configure parserOptions.ecmaVersion: 2020, since ecmaVersion: 2019 set by plugin:node/recommended lacks support for import() and import.meta.url, while ecmaVersion: 2021 would not warn about ?. and ?? on Node.js versions which don't support them.

17.0.0 (2021-04-30)

BREAKING CHANGES

  • Enable unicorn/prefer-module and unicorn/prefer-node-protocol rules.
  • Enable import/no-unused-modules rule for ESM packages.
  • Disable node env for node to avoid defining globals which are only available in CommonJS modules.
  • parserOptions for node are now set by plugin:node/recommended based on package.json#type.
  • Enable import/extensions rule.

Features

  • Allow eslint-plugin-node to set parserOptions based on package.json#type.

16.0.0 (2021-03-29)

BREAKING CHANGES

  • Bump eslint-plugin-unicorn from 28.0.0 to 29.0.0. See Release Notes.
  • Bump eslint-plugin-jsdoc from 31.6.1 to 32.0.0. See Release Notes.

Features

  • Don't prefer-destructuring for Array assignment (488c10a)
  • Use env and parserOptions from eslint-plugin-unicorn, unless overridden.
  • Use parserOptions ecmaVersion: 2020 and sourceType: script for node.

15.0.0 (2021-02-10)

BREAKING CHANGES

Features

  • No prefer-exponentiation-operator for WSH (9fb35a3)
  • Disable no-inner-declarations rule (08493af)
  • Disable no-loop-func for all but WSH (2cb6e6a)
  • Disable vars-on-top everywhere (da5cd4c)

14.1.0 (2021-02-01)

Features

14.0.0 (2021-01-26)

BREAKING CHANGES

  • Bump eslint-plugin-unicorn from 26.0.0 to 27.0.0. See Release Notes.

Features

Bug Fixes

  • Handle object in no-restricted-globals config to fix IE-specific overrides of Airbnb configuration. (04d9ef9)
  • Disable unicorn/no-array-for-each for IE, which lacks support for for-of.

13.0.0 (2021-01-18)

BREAKING CHANGES

  • Bump eslint-plugin-unicorn from 25.0.1 to 26.0.0. See Release Notes.
  • Bump eslint-plugin-jsdoc from 30.7.13 to 31.0.7. See Release Notes.

12.0.0 (2020-12-31)

BREAKING CHANGES

  • Package exports are now defined to prevent importing files other than the env-specific exported files. Other files are not part of the package API and may be changed at any time.

Features

  • Bump eslint-plugin-unicorn from 21.0.0 to 25.0.1. See Release Notes.
  • Allow generators for node and webextensions env (6290fee)
  • Allow/Prefer for...of loops (a6de803)
  • Disable unicorn/custom-error-definition (bcbb98e)
  • Disable unicorn/prefer-ternary (e6d6432)
  • Enable unicorn/prefer-string-trim-start-end (cc70995)

11.0.0 (2020-08-02)

BREAKING CHANGES

  • Lint JSDoc in closure mode to support @template (and other) tags along with module: type syntax. (3a14edd)

10.0.0 (2020-07-31)

Features

  • Bump eslint-plugin-jsdoc from 28.7.0 to 29.2.0 (2f2f8e5)

BREAKING CHANGES

  • eslint-plugin-jsdoc now adds spaces between union items and removes JSDuck support (unions with "/" instead of "|").

9.2.0 (2020-06-14)

Features

  • Disable promise/no-return-in-finally (07efe5c)

9.1.0 (2020-06-14)

Features

  • Use jsdoc typescript mode (e46a389)

9.0.0 (2020-06-12)

BREAKING CHANGES

Features

  • Don't require @param/@returns with @private (99bcfe8)
  • Enable jsdoc rules at error level (9709f93)
  • Enable no-constant-condition as error (5e2f997)
  • Enable require-hyphen-before-param-description to forbid hyphen (89a358c)

8.0.0 (2020-05-23)

Features

7.1.1 (2020-04-26)

Bug Fixes

7.1.0 (2020-04-26)

Features

7.0.0 (2020-04-26)

BREAKING CHANGES

  • Enable new unicorn/no-null rule.
  • Remove XDomainRequest global for wsh environment.

Dependency Updates

  • Update to eslint-plugin-unicorn@^19.0.0 (5b3c8bf)
  • Update to globals@^13.0.0, which includes WScript non-writable globals. (353f9dc) (ddcebcf)

6.0.1 (2020-04-09)

Bug Fixes

6.0.0 (2020-03-26)

BREAKING CHANGES

Features

5.0.0 (2020-03-10)

BREAKING CHANGES

  • Update eslint-plugin-unicorn to ^17.0.0 (ded9395):
    • Rename unicorn/regex-shorthand to unicorn/better-regex.

4.0.0 (2020-02-14)

BREAKING CHANGES

  • Drop support for Node.js 8, require 10 or later (due to sindresorhus/eslint-plugin-unicorn@d2ffe2c in eslint-plugin-unicorn@16.0.0).
  • Require lower-case e in number literals (due to sindresorhus/eslint-plugin-unicorn#490 in eslint-plugin-unicorn@16.0.0).
  • Enable unicorn/prefer-trim-start-end for node env. (b9b90c4)

Bug Fixes

  • Use prefer-exponentiation-operator instead of unicorn/prefer-exponentiation-operator (8b471c9)

Features

  • Disable unicorn/no-for-loop due to conflicts with restricted-syntax from eslint-config-airbnb-base which prevents iterators/generators due to regenerator polyfill overhead (fe93887)

3.0.0 (2020-01-26)

BREAKING CHANGES

Features

2.0.0 (2019-11-29)

Full Changelog

BREAKING CHANGES

  • Enables new prefer-negative-index rule.
  • WSH: pre-defined globals are now non-writable.
  • WSH: add RuntimeObject to no-restricted-globals, since unbound this is always preferable (see link in error message for details).

New Features

  • Add messages to no-restricted-globals.
  • Update globals to ^12.3.0 for additional WSH globals (CollectGarbage, Debug, RuntimeObject).
  • Update eslint-plugin-unicorn to ^14.0.0.

1.0.1 (2019-11-17)

Full Changelog

  • Update eslint-plugin-unicorn to ^13.0.0.

1.0.0 (2019-11-11)

Full Changelog

  • Add wsh.js for Windows Script Host.
  • Declare this as the first stable release (by semver conventions).

0.5.0 (2019-11-03)

Full Changelog

0.4.1 (2019-09-17)

Full Changelog

  • Disable unicorn/no-nested-ternary rule.

0.4.0 (2019-09-16)

Full Changelog

  • Update eslint-plugin-unicorn to ^11.0.0.

0.3.0 (2019-09-15)

Full Changelog

  • Update eslint-plugin-node dependency to 10.

0.2.0 (2019-09-02)

Full Changelog

  • Disable promise/always-return
  • allowReject for promise/no-return-wrap
  • Enable prefer-promise-reject-errors incl. empty
  • Disable node/exports-style

v0.1.0 (2019-09-01)

* This Change Log was automatically generated by github_changelog_generator