Skip to content

Commit

Permalink
chore: add Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
remvze committed Oct 5, 2023
1 parent 0e5948f commit 110359b
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@
"plugin:react/jsx-runtime",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"plugin:astro/recommended"
"plugin:astro/recommended",
"prettier"
],

"plugins": ["@typescript-eslint", "sort-keys-fix", "sort-destructure-keys"],
"plugins": [
"@typescript-eslint",
"sort-keys-fix",
"sort-destructure-keys",
"prettier"
],

"rules": {
"prettier/prettier": "error",
"sort-keys-fix/sort-keys-fix": ["warn", "asc"],
"sort-destructure-keys/sort-destructure-keys": "warn",
"react/jsx-sort-props": [
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.output/
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": ["prettier-plugin-astro"],
"singleQuote": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"tabWidth": 2,
"semi": true
}
90 changes: 89 additions & 1 deletion package-lock.json

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

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.astro",
"lint:fix": "npm run lint -- --fix",
"lint:style": "stylelint ./**/*.{css,astro,html}",
"lint:style:fix": "npm run lint:style -- --fix"
"lint:style:fix": "npm run lint:style -- --fix",
"format": "prettier . --write"
},
"dependencies": {
"@astrojs/react": "^3.0.3",
Expand All @@ -26,15 +27,19 @@
"@typescript-eslint/parser": "6.7.4",
"astro-eslint-parser": "0.16.0",
"eslint": "8.50.0",
"eslint-config-prettier": "9.0.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-astro": "0.29.1",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-sort-destructure-keys": "1.5.0",
"eslint-plugin-sort-keys-fix": "1.1.2",
"postcss-html": "1.5.0",
"prettier": "3.0.3",
"prettier-plugin-astro": "0.12.0",
"stylelint": "15.10.3",
"stylelint-config-html": "1.1.0",
"stylelint-config-idiomatic-order": "9.0.0",
Expand Down

0 comments on commit 110359b

Please sign in to comment.