diff --git a/package-lock.json b/package-lock.json index 0e4d6a2..96ac91d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2887,9 +2887,9 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "23.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz", - "integrity": "sha512-Vabo3cjl6cjyhcf+76CdQEY6suOFzK0Xh3xo0uL9VDYrDJP5+B6PjV0tHTYm82WZmFWniugFJM3ywHSNYTi/ZQ==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz", + "integrity": "sha512-NfLjIZas/ZUwc3S+pUtbTRqgCkODxPEkJBJ5ZR8wIu90BmX4jmXp10hoOZMScR2CR1NYTtrx0OX4BQvBnbzZzA==", "dev": true, "requires": { "ci-info": "^2.0.0", @@ -2904,7 +2904,7 @@ "regexp-tree": "^0.1.21", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", - "semver": "^7.3.2" + "semver": "^7.3.4" }, "dependencies": { "find-up": { @@ -2926,6 +2926,15 @@ "p-locate": "^4.1.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -2998,6 +3007,21 @@ "read-pkg": "^5.2.0", "type-fest": "^0.8.1" } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, diff --git a/package.json b/package.json index db157ab..df7e51e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "eslint-plugin-prettier": "3.2.0", "eslint-plugin-react": "7.21.5", "eslint-plugin-standard": "4.0.2", - "eslint-plugin-unicorn": "23.0.0", + "eslint-plugin-unicorn": "24.0.0", "eslint-plugin-vue": "7.2.0", "jest": "26.6.3", "prettier": "2.2.1", diff --git a/test-lint/unicorn.js b/test-lint/unicorn.js index 51b343d..7e19b33 100644 --- a/test-lint/unicorn.js +++ b/test-lint/unicorn.js @@ -4,3 +4,8 @@ // Prettier wants number literals to be lowercase, but // `plugin:unicorn/recommended` wants them uppercase. 0xffffff; + +// Prettier wants line break in `try`, but +// `plugin:unicorn/recommended` wants whitespace removed. +try { +} catch {} diff --git a/unicorn.js b/unicorn.js index eb7103e..da0d9d8 100644 --- a/unicorn.js +++ b/unicorn.js @@ -2,6 +2,7 @@ module.exports = { rules: { + "unicorn/empty-brace-spaces": "off", "unicorn/no-nested-ternary": "off", "unicorn/number-literal-case": "off", },