From 833b222e2a3fb06b5cc8ae4f1c5337ced084eb0e Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Mon, 2 Mar 2020 23:29:28 +0530 Subject: [PATCH] Add eslint-comments plugin --- .eslintrc.json | 9 ++++++--- package.json | 1 + yarn.lock | 10 +++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3872c5e8..7ef3f69d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,12 +2,14 @@ "plugins": [ "react", "prettier", - "@typescript-eslint" + "@typescript-eslint", + "eslint-comments" ], "extends": [ "eslint:recommended", "plugin:react/recommended", - "plugin:prettier/recommended" + "plugin:prettier/recommended", + "plugin:eslint-comments/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -54,7 +56,8 @@ "useTabs": false, "jsxBracketSameLine": false } - ] + ], + "eslint-comments/no-unused-disable": "error" }, "overrides": [ { diff --git a/package.json b/package.json index b757db35..bf3e2fc0 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "electron-rebuild": "1.10.0", "eslint": "6.8.0", "eslint-config-prettier": "6.10.0", + "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-prettier": "3.1.2", "eslint-plugin-react": "7.18.3", "husky": "4.2.3", diff --git a/yarn.lock b/yarn.lock index 7a899a6c..0abfb4d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3297,6 +3297,14 @@ eslint-config-prettier@6.10.0: dependencies: get-stdin "^6.0.0" +eslint-plugin-eslint-comments@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.2.tgz#4ef6c488dbe06aa1627fea107b3e5d059fc8a395" + integrity sha512-QexaqrNeteFfRTad96W+Vi4Zj1KFbkHHNMMaHZEYcovKav6gdomyGzaxSDSL3GoIyUOo078wRAdYlu1caiauIQ== + dependencies: + escape-string-regexp "^1.0.5" + ignore "^5.0.5" + eslint-plugin-prettier@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" @@ -4414,7 +4422,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4: +ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==