Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@strv/eslint-config-base

strvcom3.6kBSD-3-Clause4.0.0

STRV's ESLint configuration preset

config, eslint, strv

readme

@strv/eslint-config-base

Shared rules

These rules are meant to be shared across all ESLint rulesets. Generally you should not need to install or extend from these files as they are automatically included in their respective environment-specific configurations.

See @strv/code-quality-tools for a full showdown of available rulesets.

License

See the LICENSE file for information.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.0.0 (2024-02-16)

Features

3.5.0 (2023-11-16)

Features

  • eslint-base: enforce json extension on imports (a042e20)

3.4.0 (2023-07-11)

Features

  • additional rules for code spacing 🎨 (0350f6a)
  • do not allow empty lines at beginning & end of files (9950f3e)
  • reconfigure new-cap to work with decorators ❤️ (d5fb0cf)

3.3.0 (2023-07-06)

Features

  • disable id-length max property (a5424d8)
  • set max-len to 120 👏 (0d3d355)
  • upgrade eslint-plugin-import to v2.27 (c89f5e2)

3.2.0 (2022-07-18)

Bug Fixes

  • rule: require no spaces between multiple export statements (65a0bae)

Features

3.1.0 (2022-03-23)

Features

  • rule: support ESLint v8, many new rules 🎉 (aaf5708)

3.0.0 (2021-09-07)

Note: Version bump only for package @strv/eslint-config-base

3.0.0-alpha.5 (2021-09-07)

Bug Fixes

  • rule: use correct semver ranges for engines.node 🤦‍♂️ (5f1737f)

chore

  • deps: upgrade all deps 💣 (3a827aa)
  • repo: bump minimum Node.js version (a8125c2)

BREAKING CHANGES

  • repo: All packages must now be used with a minimum of Node.js 14 or 16.
  • deps: Most dependencies have been upgraded to a newer major version. Most of the time these upgrades dropped support for old Node.js versions.

3.0.0-alpha.4 (2021-05-05)

Note: Version bump only for package @strv/eslint-config-base

3.0.0-alpha.3 (2021-03-27)

Features

  • eslint-base: update deps 💣 (bb6dd28)
  • eslint-typescript: be more strict with some rules (5c6b32f)

BREAKING CHANGES

  • eslint-typescript: Several rules' level has been raised to error after a long discussion with many team members. We feel that some code patterns are really dangerous and should be flagged appropriately, even if we recognise that there might be some small, valid use-cases for some of them. The rules include:

  • no-explicit-any: if you don't know the type then use unknown instead

  • no-dynamic-delete: if you need to dynamically remove properties from an object then perhaps you should use a different data store, like Map or Set
  • no-floating-promises: always, always! handle promises, at least add a .catch(err => console.error(err) to them
  • no-for-in-array: always prefer for-of loop or other iteration mechanism
  • no-inferrable-types: save your keyboard from all these unnecessary keystrokes required to add types to variables which are obvious
  • no-this-alias: don't assign this to a variable; use an arrow function instead
  • prefer-function-type: makes code more readable in some specific situations
  • prefer-nullish-coalescing: it is far superior to other logical operators
  • require-array-sort-compare: Array.prototype.sort() has a very basic default comparison logic so it's always preferred to provide explicit sorting rules.

3.0.0-alpha.2 (2020-10-09)

Bug Fixes

  • eslint-base: disable redundant no-duplicate-imports rule (018f2e3)

3.0.0-alpha.1 (2020-10-09)

Bug Fixes

  • eslint-base: use a more generic config for comma-dangle (dc44aa4)

3.0.0-alpha.0 (2020-10-09)

Features

  • add several rules to the base ruleset (471568f)
  • eslint-base: disable require-atomic-updates rule (2ca7bfd)
  • eslint-base: upgrade eslint-plugin-import to 2.22 (b95c1b1)
  • eslint-base: upgrade to ESLint v7 (a6b5b16)
  • eslint-node: upgrade eslint-plugin-node to v11.1 (83659cc)

BREAKING CHANGES

  • A few of the new rules are set to error level so they might potentially cause some code to fail a lint check.
  • eslint-base: The minimum supported version of ESLint is now 7.1
  • eslint-node: As of ESLint v7, some Node.js-related rules have been deprecated and moved to eslint-plugin-node. This release uses the new rules from the plugin and increases the minimum ESLint version to v7.

2.3.0 (2020-02-11)

Features

  • eslint-base: enable default-param-last rule (16aaf3d)

2.2.0 (2020-02-07)

Features

  • eslint-base: upgrade eslint-plugin-import to 2.20 (1f532c2)

2.1.1 (2019-08-27)

Bug Fixes

  • eslint-base: turn off no-return-await (4d547ae)

2.1.0 (2019-08-24)

Bug Fixes

  • eslint-base: upgrade eslint-plugin-import to 2.18.0 (e181987)

Features

  • enable no-unused-modules for TypeScript files (93c2437)

2.0.0 (2019-06-22)

chore

  • remove .es extension from recognised module extensions (b160a65)

Features

  • drop support for Node.js 6 & 8 (4add1ff)
  • enable import/no-useless-path-segments' noUselessIndex option (dc4741f)
  • explicitly mark configs as ESLint v6 compatible 🎉 (017d975)

BREAKING CHANGES

  • Some rules will no longer recognise extension-less module imports pointing to files ending with .es extension.

.es was originally used as an extension with ES Modules support but the official extension for that is now .mjs. Rename your .es files to .mjs to restore any lost functionality.

  • From now on, all ESLint plugins will only work on projects running Node.js 10 and above and the linter itself must be run using Node.js 10 and above.

1.2.0 (2019-04-30)

Features

  • improve handling of extensions across all ESLint configs (08aa00a), closes #19

1.1.2 (2019-04-09)

Bug Fixes

  • allow name exception in eslint no-shadow (4422753)

1.1.1 (2019-04-05)

Note: Version bump only for package @strv/eslint-config-base

1.1.0 (2019-03-07)

Bug Fixes

  • eslint-config-base: overrides should be an array (eb96bc7)

Features

  • eslint-base: add prefer-named-capture-group (bda87cc)

1.0.0 (2019-03-04)

Note: Version bump only for package @strv/eslint-config-base

0.1.1-alpha.0 (2019-02-07)

Features