Enable type checking & disable lint warning
This commit is contained in:
parent
f805f4ead6
commit
adc7892d8c
3 changed files with 8 additions and 4 deletions
8
.github/workflows/lint.yaml
vendored
8
.github/workflows/lint.yaml
vendored
|
@ -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"
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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)}
|
||||||
|
|
Loading…
Reference in a new issue