diff --git a/configs/eslint.config.js b/configs/eslint.config.js index 5381fd88..a42bed1a 100644 --- a/configs/eslint.config.js +++ b/configs/eslint.config.js @@ -14,6 +14,7 @@ const pluginImport = require('eslint-plugin-import'); const nextjs = require('@next/eslint-plugin-next'); const fp = require('eslint-plugin-fp'); const jest = require('eslint-plugin-jest'); +const onlyError = require('eslint-plugin-only-error'); const allJsExtensions = 'js,mjs,cjs,ts,mts,cts,jsx,tsx,mtsx,mjsx'; const supportedFileTypes = `**/*{${allJsExtensions}}`; @@ -446,6 +447,13 @@ const reactConfig = [ }, ]; +const onlyErrorConfig = { + files: [supportedFileTypes], + plugins: { + 'only-error': onlyError, + }, +}; + const lodashConfig = { files: [supportedFileTypes], plugins: { @@ -628,6 +636,7 @@ if (!userConfigChoices?.isEmpty && userConfigChoices?.config) { exportableConfig.push(prettierConfig); exportableConfig.push(prettierOverrides); +exportableConfig.push(onlyErrorConfig); exportableConfig.push({ ignores }); module.exports = exportableConfig; diff --git a/package.json b/package.json index 150455b2..234bde50 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "eslint-plugin-jsdoc": "^39.3.6", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-lodash-f": "^7.5.2", + "eslint-plugin-only-error": "^1.0.2", "eslint-plugin-playwright": "^0.11.1", "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", @@ -71,7 +72,6 @@ "node": ">=16", "pnpm": ">=7" }, - "packageManager": ">=pnpm@7.0.0", "license": "MIT", "devDependencies": { "semantic-release": "19.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7407dc30..69c34cdb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,7 @@ specifiers: eslint-plugin-jsdoc: ^39.3.6 eslint-plugin-jsx-a11y: ^6.4.1 eslint-plugin-lodash-f: ^7.5.2 + eslint-plugin-only-error: ^1.0.2 eslint-plugin-playwright: ^0.11.1 eslint-plugin-react: ^7.31.8 eslint-plugin-react-hooks: ^4.6.0 @@ -36,6 +37,7 @@ dependencies: eslint-plugin-jsdoc: 39.3.6_eslint@8.24.0 eslint-plugin-jsx-a11y: 6.6.1_eslint@8.24.0 eslint-plugin-lodash-f: 7.5.2_eslint@8.24.0 + eslint-plugin-only-error: 1.0.2 eslint-plugin-playwright: 0.11.2_csyfkmjn6urny4nk3uzfnm7nh4 eslint-plugin-react: 7.31.8_eslint@8.24.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.24.0 @@ -1323,6 +1325,11 @@ packages: lodash: 4.17.21 dev: false + /eslint-plugin-only-error/1.0.2: + resolution: {integrity: sha512-tdz/EU/LeQLPNMBIQOSl39by+/NGKdhjfba6qDvMWjcbY0GmiMk0bXrIXRGAwW9fksH30Y+KKlK1Jc32bbql9w==} + engines: {node: '>=6'} + dev: false + /eslint-plugin-playwright/0.11.2_csyfkmjn6urny4nk3uzfnm7nh4: resolution: {integrity: sha512-uRLRLk7uTzc8NE6t4wBU8dijQwHvC66R/h7xwdM779jsJjMUtSmeaB8ayRkkpfwi+UU5BEfwvDANwmE+ccMVDw==} peerDependencies: