diff --git a/.eslintrc b/.eslintrc index 03bfab0d4710..6ddb988b21a6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,10 @@ "mocha": true }, "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], + "plugins": [ + "@typescript-eslint", + "no-only-tests" + ], "extends": [ "airbnb", "plugin:@typescript-eslint/recommended", @@ -97,6 +100,7 @@ } ], "operator-assignment": "off", - "strict": "off" + "strict": "off", + "no-only-tests/no-only-tests": ["error", { "block": ["test", "suite"], "focus": ["only"] }] } } diff --git a/package-lock.json b/package-lock.json index 6c21df06a3e4..492696acd558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,6 +79,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.3.1", + "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.0", "expose-loader": "^3.1.0", @@ -5708,6 +5709,16 @@ "node": "*" } }, + "node_modules/eslint-plugin-no-only-tests": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz", + "integrity": "sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=5.0.0" + } + }, "node_modules/eslint-plugin-react": { "version": "7.29.4", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", @@ -19233,6 +19244,12 @@ } } }, + "eslint-plugin-no-only-tests": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz", + "integrity": "sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==", + "dev": true + }, "eslint-plugin-react": { "version": "7.29.4", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", diff --git a/package.json b/package.json index 7ffb5b3b8dce..a8a45202367f 100644 --- a/package.json +++ b/package.json @@ -83,8 +83,7 @@ "browser": "./dist/extension.browser.js", "l10n": "./l10n", "contributes": { - "problemMatchers": - [ + "problemMatchers": [ { "name": "python", "owner": "python", @@ -98,7 +97,6 @@ }, { "regexp": "^\\s*(.*)\\s*$" - }, { "regexp": "^\\s*(.*Error.*)$", @@ -1640,6 +1638,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.3.1", + "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.0", "expose-loader": "^3.1.0",