From 5a22b77941200eb4342a0a04a57794b103d4996a Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 11 Mar 2020 18:35:39 +0800 Subject: [PATCH] Add `unicorn/string-content` rule (#439) --- config/plugins.js | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/plugins.js b/config/plugins.js index 80f67cba..f80bd0e6 100644 --- a/config/plugins.js +++ b/config/plugins.js @@ -113,6 +113,14 @@ module.exports = { } } ], + 'unicorn/string-content': [ + 'error', + { + patterns: { + [/\.\.\./.source]: '…' + } + } + ], // The character class sorting is a bit buggy at the moment. 'unicorn/better-regex': [ diff --git a/package.json b/package.json index a924ecfe..901c1533 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-unicorn": "^17.0.1", + "eslint-plugin-unicorn": "^17.2.0", "find-cache-dir": "^3.0.0", "fs-extra": "^8.1.0", "get-stdin": "^7.0.0",