From 985cfe7fba61838d0044e43d8c10a09578118c5a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 24 May 2022 18:34:47 +0000 Subject: [PATCH 1/3] Update dependency eslint-plugin-unicorn to v42 --- package-lock.json | 28 ++++++++++++++-------------- package.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 693e4d60..55521856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "eslint-plugin-jsdoc": "^39.0.0", "eslint-plugin-n": "^15.0.1", "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-unicorn": "^41.0.0" + "eslint-plugin-unicorn": "^42.0.0" }, "devDependencies": { "@changesets/changelog-github": "0.4.4", @@ -36,7 +36,7 @@ "typescript": "4.6.4" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "peerDependencies": { "eslint": "^8.0.0" @@ -2318,9 +2318,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "41.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.1.tgz", - "integrity": "sha512-gF5vo2dIj0YdNMQ/IMegiBkQdQ22GBFFVpdkJP+0og3w7XD4ypea0xQVRv6iofkLVR2w0phAdikcnU01ybd4Ow==", + "version": "42.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz", + "integrity": "sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==", "dependencies": { "@babel/helper-validator-identifier": "^7.15.7", "ci-info": "^3.3.0", @@ -2348,9 +2348,9 @@ } }, "node_modules/eslint-plugin-unicorn/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -7062,9 +7062,9 @@ "requires": {} }, "eslint-plugin-unicorn": { - "version": "41.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.1.tgz", - "integrity": "sha512-gF5vo2dIj0YdNMQ/IMegiBkQdQ22GBFFVpdkJP+0og3w7XD4ypea0xQVRv6iofkLVR2w0phAdikcnU01ybd4Ow==", + "version": "42.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz", + "integrity": "sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==", "requires": { "@babel/helper-validator-identifier": "^7.15.7", "ci-info": "^3.3.0", @@ -7083,9 +7083,9 @@ }, "dependencies": { "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "requires": { "lru-cache": "^6.0.0" } diff --git a/package.json b/package.json index d9dd2ceb..55eeedbd 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "eslint-plugin-jsdoc": "^39.0.0", "eslint-plugin-n": "^15.0.1", "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-unicorn": "^41.0.0" + "eslint-plugin-unicorn": "^42.0.0" }, "peerDependencies": { "eslint": "^8.0.0" From cc5ab5a61269a358b6bd2e7c844bf7d64c9ff24b Mon Sep 17 00:00:00 2001 From: Caleb Eby Date: Tue, 24 May 2022 12:07:49 -0700 Subject: [PATCH 2/3] Add changeset --- .changeset/plenty-radios-cough.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .changeset/plenty-radios-cough.md diff --git a/.changeset/plenty-radios-cough.md b/.changeset/plenty-radios-cough.md new file mode 100644 index 00000000..86e83b03 --- /dev/null +++ b/.changeset/plenty-radios-cough.md @@ -0,0 +1,27 @@ +--- +'@cloudfour/eslint-plugin': major +--- + +Update dependency `eslint-plugin-unicorn` to `v42` + +**New Rules** + +- [`@cloudfour/unicorn/no-unreadable-iife`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/no-unreadable-iife.md) +- [`@cloudfour/unicorn/no-useless-switch-case`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/no-useless-switch-case.md) +- [`@cloudfour/unicorn/prefer-modern-math-apis`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/prefer-modern-math-apis.md) +- [`@cloudfour/unicorn/prefer-native-coercion-functions`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/prefer-native-coercion-functions.md) + +**Newly Enabled Rules** + +- [`@cloudfour/unicorn/no-unreadable-iife`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/no-unreadable-iife.md) +- [`@cloudfour/unicorn/no-useless-switch-case`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/no-useless-switch-case.md) +- [`@cloudfour/unicorn/prefer-modern-math-apis`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/prefer-modern-math-apis.md) +- [`@cloudfour/unicorn/prefer-native-coercion-functions`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/prefer-native-coercion-functions.md) + +**Reconfigured Rules** + +- [`@cloudfour/unicorn/template-indent`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v42.0.0/docs/rules/template-indent.md) + ```diff + - "warn" + + "error" + ``` From 6a8896ec4ff3752e93703d643beb71c86c285d34 Mon Sep 17 00:00:00 2001 From: Caleb Eby Date: Tue, 24 May 2022 12:08:50 -0700 Subject: [PATCH 3/3] Fix lint --- fixtures/eslint/lib/linter/linter.js | 2 +- fixtures/eslint/lib/linter/node-event-generator.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fixtures/eslint/lib/linter/linter.js b/fixtures/eslint/lib/linter/linter.js index 20c31426..70761031 100644 --- a/fixtures/eslint/lib/linter/linter.js +++ b/fixtures/eslint/lib/linter/linter.js @@ -1223,7 +1223,7 @@ class Linter { const enabledEnvs = Object.keys(resolvedEnvConfig) .filter((envName) => resolvedEnvConfig[envName]) .map((envName) => getEnv(slots, envName)) - .filter((env) => env); + .filter(Boolean); const parserOptions = resolveParserOptions( parserName, diff --git a/fixtures/eslint/lib/linter/node-event-generator.js b/fixtures/eslint/lib/linter/node-event-generator.js index e7c00f24..6d54c009 100644 --- a/fixtures/eslint/lib/linter/node-event-generator.js +++ b/fixtures/eslint/lib/linter/node-event-generator.js @@ -55,7 +55,7 @@ function getPossibleTypes(parsedSelector) { case 'compound': { const typesForComponents = parsedSelector.selectors .map(getPossibleTypes) - .filter((typesForComponent) => typesForComponent); + .filter(Boolean); // If all of the components could match any type, then the compound could also match any type. if (typesForComponents.length === 0) {