Enable type checking & disable lint warning

This commit is contained in:
David Baker 2022-05-06 22:55:47 +01:00
parent f805f4ead6
commit adc7892d8c
3 changed files with 8 additions and 4 deletions

View file

@ -1,9 +1,9 @@
name: Lint and format
name: Lint, format & type check
on:
pull_request: {}
jobs:
prettier:
name: Lint and format
name: Lint, format & type check
runs-on: ubuntu-latest
steps:
- name: Checkout code
@ -17,4 +17,6 @@ jobs:
- name: Prettier
run: "yarn run prettier:check"
- name: ESLint
run: "yarn run lint"
run: "yarn run lint:js"
- name: Type check
run: "yarn run lint:types"

View file

@ -8,7 +8,8 @@
"build-storybook": "build-storybook",
"prettier:check": "prettier -c src",
"prettier:format": "prettier -w src",
"lint": "eslint --max-warnings 2 src"
"lint:js": "eslint --max-warnings 2 src",
"lint:types": "tsc"
},
"dependencies": {
"@juggle/resize-observer": "^3.3.1",

View file

@ -50,6 +50,7 @@ export const Avatar: React.FC<Props> = ({
return backgroundColors[index];
}, [bgKey, src, fallback]);
/* eslint-disable jsx-a11y/alt-text */
return (
<div
className={classNames(styles.avatar, styles[size || "md"], className)}