Skip to content

Commit

Permalink
MI-39 Restore prettier plugin
Browse files Browse the repository at this point in the history
The prettier config doesn't actually do anything. It just removes some
rules from the default config that aren't compatible with prettier. To
get Prettier to actually work through ESLint, we need the plugin.
  • Loading branch information
styler3 committed Nov 19, 2024
1 parent d828aa8 commit 7aec3b9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"@eslint/js": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"prettier-plugin-tailwindcss": "^0.6.8",
"typescript-eslint": "^8.13.0"
},
"devDependencies": {
"@types/eslint-config-prettier": "^6.11.3",
"@types/eslint-plugin-jsx-a11y": "^6.9.0",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.14.0",
Expand Down
68 changes: 60 additions & 8 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import { fixupPluginRules } from '@eslint/compat';
import hooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
Expand All @@ -9,7 +9,7 @@ import tsEslint from 'typescript-eslint';
const core = [
eslint.configs.recommended,
...tsEslint.configs.recommended,
eslintConfigPrettier,
eslintPluginPrettier,
{
rules: {
'no-restricted-syntax': [
Expand Down

0 comments on commit 7aec3b9

Please sign in to comment.