Skip to content

Commit

Permalink
update prettier and eslint commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Jun 21, 2024
1 parent 7ccd128 commit fbd6988
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
8 changes: 4 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: ['eslint:recommended', 'prettier'],
plugins: ['svelte3'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
docs
8 changes: 7 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{
"files": "*.svelte",
"options": { "parser": "svelte" }
}],
"arrowParens": "avoid"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"update_template": "sh ./src/scripts/update_template.sh",
"prebuild": "npm run update_template",
"deploy": "npm run build && git add -A && git commit -am 'auto-deploy' && git push origin main",
Expand Down

0 comments on commit fbd6988

Please sign in to comment.