Skip to content

Commit

Permalink
Go back to running prettier from eslint
Browse files Browse the repository at this point in the history
Means less steps to run and less editor extensions that need to be installed.

This reverts 9d40e4b.
  • Loading branch information
ahuth committed Sep 14, 2024
1 parent 694d4c6 commit 8354ea5
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 22 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
- name: 👖 Lint
run: npm run lint

- name: 💄 Prettier
run: npm run prettier

types:
name: 🔎 Types
runs-on: ubuntu-latest
Expand Down
11 changes: 0 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,3 @@ postgres-data
/public/build
/storybook-static
/test-results

# Ignore everything except JS/TS files.
# Based on https://stackoverflow.com/a/70715829/458193
*
!*.cjs
!*.js
!*.jsx
!*.mjs
!*.ts
!*.tsx
!*/
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"dbaeumer.vscode-eslint"
]
}
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.useFlatConfig": true,
"eslint.run": "onSave"
}
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {FlatCompat} from '@eslint/eslintrc';
import js from '@eslint/js';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import react from 'eslint-plugin-react';
import vitest from 'eslint-plugin-vitest';
import typescript from 'typescript-eslint';
Expand Down Expand Up @@ -124,4 +125,7 @@ export default [
'vitest/no-focused-tests': 'error',
},
},

// Prettier. This must be after all other configs.
prettierRecommended,
];
99 changes: 97 additions & 2 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"docker": "docker compose up --detach",
"docker:down": "docker compose down",
"lint": "eslint --max-warnings 0 .",
"prettier": "prettier . --cache --check",
"prisma": "dotenvx run --convention=nextjs -- prisma",
"prod": "NODE_ENV=production node --enable-source-maps ./build/express/server.js",
"routes": "remix routes",
Expand All @@ -24,7 +23,7 @@
"test:axeOnly": "axe-storybook --build-dir ./storybook-static",
"test:e2e": "npm run setup:e2e && npx playwright test",
"types": "tsc --noEmit",
"validate": "run-p \"test -- --run\" lint prettier types"
"validate": "run-p \"test -- --run\" lint types"
},
"dependencies": {
"@conform-to/react": "^1.1.5",
Expand Down Expand Up @@ -81,8 +80,10 @@
"es-module-lexer": "^1.5.4",
"esbuild": "^0.23.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-vitest": "^0.5.4",
Expand Down

0 comments on commit 8354ea5

Please sign in to comment.