Skip to content

Commit

Permalink
feat(plugin): added eslint-plugin-only-error
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaPontrandolfo committed Oct 29, 2022
1 parent 47bcd6b commit 471d423
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions configs/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}}`;
Expand Down Expand Up @@ -446,6 +447,13 @@ const reactConfig = [
},
];

const onlyErrorConfig = {
files: [supportedFileTypes],
plugins: {
'only-error': onlyError,
},
};

const lodashConfig = {
files: [supportedFileTypes],
plugins: {
Expand Down Expand Up @@ -628,6 +636,7 @@ if (!userConfigChoices?.isEmpty && userConfigChoices?.config) {

exportableConfig.push(prettierConfig);
exportableConfig.push(prettierOverrides);
exportableConfig.push(onlyErrorConfig);
exportableConfig.push({ ignores });

module.exports = exportableConfig;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -71,7 +72,6 @@
"node": ">=16",
"pnpm": ">=7"
},
"packageManager": ">[email protected]",
"license": "MIT",
"devDependencies": {
"semantic-release": "19.0.5",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 471d423

Please sign in to comment.