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: on:
pull_request: {} pull_request: {}
jobs: jobs:
prettier: prettier:
name: Lint and format name: Lint, format & type check
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@ -17,4 +17,6 @@ jobs:
- name: Prettier - name: Prettier
run: "yarn run prettier:check" run: "yarn run prettier:check"
- name: ESLint - 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", "build-storybook": "build-storybook",
"prettier:check": "prettier -c src", "prettier:check": "prettier -c src",
"prettier:format": "prettier -w src", "prettier:format": "prettier -w src",
"lint": "eslint --max-warnings 2 src" "lint:js": "eslint --max-warnings 2 src",
"lint:types": "tsc"
}, },
"dependencies": { "dependencies": {
"@juggle/resize-observer": "^3.3.1", "@juggle/resize-observer": "^3.3.1",

View file

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