Skip to content

Commit

Permalink
Merge pull request #119 from aurelienrichard:privelte
Browse files Browse the repository at this point in the history
refactor & update eslint config
  • Loading branch information
aurelienrichard committed May 27, 2024
2 parents 956ad87 + 9ed5b98 commit c614515
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 92 deletions.
16 changes: 8 additions & 8 deletions apps/privelte/src/lib/components/NewMessageForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
const dispatch = createEventDispatcher()
const setHeight = () => {
if (textarea) {
textarea.style.height = '40px'
textarea.style.height = `${textarea.scrollHeight}px`
}
}
onMount(() => {
textarea.focus()
})
Expand All @@ -26,7 +19,14 @@
setHeight()
})
const handleMessage = () => {
function setHeight() {
if (textarea) {
textarea.style.height = '40px'
textarea.style.height = `${textarea.scrollHeight}px`
}
}
function handleMessage() {
const id = nanoid()
dispatch('message', { message, id })
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module.exports = {
extends: [
'airbnb-base',
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
Expand Down Expand Up @@ -38,6 +36,7 @@ module.exports = {
rules: {
// https://github.com/iamturns/eslint-config-airbnb-typescript#why-is-importno-unresolved-disabled
'import/no-unresolved': 'off',
'import/no-named-as-default': 'off',
// unreliable for monorepos
'import/no-extraneous-dependencies': 'off',
// yells on import of env variables
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^1.13.3",
"eslint-plugin-import": "npm:eslint-plugin-i@2.29.1",
Expand Down
93 changes: 13 additions & 80 deletions pnpm-lock.yaml

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

0 comments on commit c614515

Please sign in to comment.