Skip to content

Commit

Permalink
🔧 [#724] Set up eslint-plugin-prettier
Browse files Browse the repository at this point in the history
This includes the upgrade to prettier v3
  • Loading branch information
sergei-maertens committed Jan 3, 2025
1 parent 6f3255e commit 826b1b5
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"plugins": [
"@trivago/prettier-plugin-sort-imports"
],
"arrowParens": "avoid",
"bracketSpacing": false,
"bracketSameLine": false,
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pluginJs from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import reactPlugin from 'eslint-plugin-react';
import hooksPlugin from 'eslint-plugin-react-hooks';
import globals from 'globals';
Expand Down Expand Up @@ -70,6 +71,7 @@ const config = [
plugins: {'react-hooks': hooksPlugin},
rules: hooksPlugin.configs.recommended.rules,
},
prettierRecommended,
// Storybook stories
{
files: ['**/*.stories.{js,jsx}'],
Expand Down
80 changes: 66 additions & 14 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-webpack-plugin": "^3.1.1",
Expand All @@ -186,7 +186,7 @@
"postcss-loader": "^6.2.1",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^7.0.1",
"prettier": "^2.7.1",
"prettier": "^3.4.2",
"prompts": "^2.4.2",
"prop-types": "^15.7.2",
"react": "^18.2.0",
Expand Down

0 comments on commit 826b1b5

Please sign in to comment.