Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/plenty-radios-cough.md
Original file line number Diff line number Diff line change
@@ -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"
```
2 changes: 1 addition & 1 deletion fixtures/eslint/lib/linter/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fixtures/eslint/lib/linter/node-event-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down