From 76c4c231e25de7bcfc80a90e40ffa4f288dc077d Mon Sep 17 00:00:00 2001 From: Roman Seidelsohn Date: Tue, 15 Aug 2023 08:29:21 +0200 Subject: [PATCH] Version 6.0.0 (#53) * Update dependencies * Fix: Rename a unicorn rule's setting due to a breaking change Since eslint-plugin-unicorn v30.0.0 'whitelist' is called 'allowlist' * Update readme and changelog to reflect latest changes * Update HISTORY.md Co-authored-by: jpw * Add a possibly helpful hint to the history file * Add a mention of older versions supporting lower Node versions --------- Co-authored-by: jpw --- HISTORY.md | 20 ++++++++++++++++++++ README.md | 4 ++-- configurations/node.js | 2 +- package.json | 26 +++++++++++++------------- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index df4141a..87aff77 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,25 @@ # History +## 6.0.0 (2023-06-21) + +* Bump dependencies so that ESLint v8.* can be used in projects that also use @springernature/eslint-config +* In fact at least ESLint v8.38.0 is needed due to breaking changes in `eslint-plugin-unicorn` v47.0.0 +* Requires technically at least Node v16, but since security support for v16 is running out on 11 Sep 2023, we say that we reqiure at least v18 +* The upgrade from `eslint-plugin-unicorn` v28 to v47 brought mostly bugfixes and new features. The only breaking change affecting this repo was the change of the `prevent-abbreviations` rule setting `whitelist` to `allowlist` in v30.0.0. + +### Hint + +A major change in the output of ESLint after updating this module to version 6.0.0 will be the recommended switch from CommonJS modules to using ES6 modules due to the new settings in `unicorn`. This change can be a major effort and if you do not want to make this switch due to the update of the `@springernature/eslint-config` module, you can disable this rule in the rules section of your project's ESLint configuration: + +```json + [...] + "rules": { + [...] + "unicorn/prefer-module": 0 + }, + +``` + ## 5.0.5 (2021-11-12) * Attempts again to revert versions of npm dependencies back to same as 5.0.1. diff --git a/README.md b/README.md index 13636fc..c680638 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ ESLint shareable config used at [Springer Nature](https://www.springernature.com This package requires: -* Node version 8 or greater. Please have a look at our [open source support page](https://github.com/springernature/frontend-playbook/blob/master/practices/open-source-support.md#node-versions) for details on which versions of node we support, and why. -* `eslint` version 6 or greater. +* [Node version 18 or greater](https://nodejs.org/en/download/releases) due to support for v16 running out soon this year. Please have a look at our [open source support page](https://github.com/springernature/frontend-playbook/blob/master/practices/open-source-support.md#node-versions) for details on which versions of node we support, and why. Version 5 of this package supports Node versions >=8 and <16. +* `eslint` version 8.38.0 or greater (due to eslint-plugin-unicorn v47.0.0). ## Installation diff --git a/configurations/node.js b/configurations/node.js index d9026c8..62a250d 100644 --- a/configurations/node.js +++ b/configurations/node.js @@ -31,7 +31,7 @@ module.exports = { 'unicorn/prevent-abbreviations': [ 'error', { - 'whitelist': { + 'allowList': { 'err': true, 'req': true, 'res': true diff --git a/package.json b/package.json index c50763c..fa1b0d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@springernature/eslint-config", - "version": "5.0.5", + "version": "6.0.0", "description": "ESLint shareable config used at Springer Nature", "license": "MIT", "repository": "springernature/eslint-config-springernature", @@ -8,7 +8,7 @@ "bugs": "https://github.com/springernature/eslint-config-springernature/issues", "author": "Springer Nature", "engines": { - "node": ">=8" + "node": ">=18" }, "keywords": [ "springer nature", @@ -21,21 +21,21 @@ "static analysis" ], "devDependencies": { - "eslint": "^7.17.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.3", + "eslint": "^8.43.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jest": "^27.2.2", "eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.3.1", - "eslint-plugin-unicorn": "^28.0.1" + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-unicorn": "^47.0.0" }, "peerDependencies": { - "eslint": "^7.17.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.3", + "eslint": "^8.38.x", + "eslint-plugin-import": "^2.27.x", + "eslint-plugin-jest": "^27.x", "eslint-plugin-no-use-extend-native": "^0.5.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.3.1", - "eslint-plugin-unicorn": "^28.0.1" + "eslint-plugin-node": "^11.x", + "eslint-plugin-promise": "^6.x", + "eslint-plugin-unicorn": "^47.x" } }