Closed ecumene closed 3 years ago
installed eslint, ran it on Calculator.jsx, and got:
C:\Users\murph\Documents\GitHub\calculator\src\components\Calculator.jsx
1:26 error 'useMemo' is defined but never used no-unused-vars
65:24 error '
can be escaped with '
, ‘
, '
, ’
react/no-unescaped-entities
✖ 2 problems (2 errors, 0 warnings)
will close issue once useMemo is implemented correctly, and will post a 0-error linter report to accompany it
See if you can install the VS code extension. It'll automate running the command for you. Also check out this tutorial: https://thomaslombart.com/setup-eslint-prettier-react/
It's very good!
So I read that tutorial, and followed all the steps. I believe I have everything installed for an automated pre-commit linting and fixing, so Ill show you on thursday
So Ive a got a linting and formatting workflow set up. I can lint on command line, context menu, quick-fix, and have a lint-staged command so I can lint and commit right from the terminal.
https://reactjs.org/docs/hooks-reference.html#usememo
Change
makeAList
to auseMemo