From 1660d167126f8be1c0c0eeb8040ce431a88ee036 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 3 Feb 2021 14:28:32 -0600 Subject: [PATCH] feat: add eslint-plugin-optimize-regex --- index.js | 5 +++-- package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index d6b2f45..126bd42 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ module.exports = { "sourceType": "module" }, "plugins": ["only-warn"], - "extends": ["eslint:recommended", "prettier"], + "extends": ["eslint:recommended", "plugin:optimize-regex/all", "prettier"], "ignorePatterns": ["node_modules/"], "overrides": [ { @@ -35,6 +35,7 @@ module.exports = { "plugin:react/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", + "plugin:optimize-regex/all", "prettier", "prettier/@typescript-eslint" ], @@ -65,7 +66,7 @@ module.exports = { "files": ["**/*.coffee"], "parser": "eslint-plugin-coffee", "plugins": ["coffee", "only-warn"], - "extends": ["plugin:coffee/eslint-recommended"] + "extends": ["plugin:coffee/eslint-recommended", "plugin:optimize-regex/all"] }, { // YAML files diff --git a/package.json b/package.json index 6833907..6d16058 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "eslint-plugin-coffee": "^0.1.13", "eslint-plugin-json": "^2.1.2", "eslint-plugin-only-warn": "^1.0.2", + "eslint-plugin-optimize-regex": "^1.2.0", "eslint-config-prettier": "^7.2.0", "eslint-plugin-react": "^7.22.0", "eslint-plugin-yaml": "^0.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9dffc1..92c1533 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,7 @@ dependencies: eslint-plugin-coffee: 0.1.13_eslint@7.5.0 eslint-plugin-json: 2.1.2 eslint-plugin-only-warn: 1.0.2 + eslint-plugin-optimize-regex: 1.2.0 eslint-plugin-react: 7.22.0_eslint@7.5.0 eslint-plugin-yaml: 0.3.0 prettier: 2.2.1 @@ -1506,6 +1507,14 @@ packages: node: '>=6' resolution: integrity: sha512-DCG8vuUynDnyfkm0POT50JoE9VJfbtKf+COHn3q79+ExW4dg9ZWM/hsMWX1mjZqxMjQledL/9TmGipon/vwWmw== + /eslint-plugin-optimize-regex/1.2.0: + dependencies: + regexp-tree: 0.1.23 + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-pzpF7bGsdXVPue/ubLqS0UbBGuBajxh2fO8OmBDoN0SHrxEBKf8WOAxkOI80lBb81yiZs7hj6ZxlflbrV3YrsA== /eslint-plugin-react-native-globals/0.1.2: dev: false resolution: @@ -3415,6 +3424,11 @@ packages: dev: false resolution: integrity: sha512-GmwlGiazQEbOwQWDdbbaP10i15pGtScYWLbMZuu+RKRz0cZ+g8IUONazBnaZqe7j1670IV1HgE4/8iy7CQPf4Q== + /regexp-tree/0.1.23: + dev: false + hasBin: true + resolution: + integrity: sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw== /regexp.prototype.flags/1.3.0: dependencies: define-properties: 1.1.3 @@ -4209,6 +4223,7 @@ specifiers: eslint-plugin-coffee: ^0.1.13 eslint-plugin-json: ^2.1.2 eslint-plugin-only-warn: ^1.0.2 + eslint-plugin-optimize-regex: ^1.2.0 eslint-plugin-react: ^7.22.0 eslint-plugin-yaml: ^0.3.0 npm-check-updates: 11.1.1