Add typechecking (#7221)

GitOrigin-RevId: 5b5bc5d2f9e5361e868cc6c9560f28a872d90ae1
This commit is contained in:
Alf Eaton 2022-03-25 09:30:02 +00:00 committed by Copybot
parent 1bee808551
commit f175aef078
4 changed files with 6 additions and 10 deletions

View file

@ -427,6 +427,10 @@ lint: lint_flag_res_send_usage
lint_flag_res_send_usage:
bin/lint_flag_res_send_usage
lint: typecheck_frontend
typecheck_frontend:
npx tsc --noEmit
lint_in_docker:
$(RUN_LINT_FORMAT) make lint -j --output-sync

View file

@ -1,15 +1,6 @@
import PropTypes from 'prop-types'
import classNames from 'classnames'
/**
* @param {string} type
* @param {boolean} [spin]
* @param {boolean} [fw]
* @param {string} [modifier]
* @param {string} [className]
* @param {string} [accessibilityLabel]
* @return {JSX.Element}
*/
function Icon({
type,
spin,

View file

@ -28,6 +28,7 @@
"format:styles:fix": "prettier --write $PWD/'**/*.less'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"type-check": "tsc --noEmit",
"extract-translations": "i18next-scanner",
"migrations": "east",
"storybook": "start-storybook -p 6006",

View file

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext" /* Specify ECMAScript target version */,
"module": "esnext" /* Specify module code generation */,
"module": "commonjs" /* Specify module code generation */,
"allowJs": true /* Allow JavaScript files to be compiled. */,
// "checkJs": true /* Report errors in .js files. */,
"jsx": "preserve" /* Specify JSX code generation */,