I was getting TS/lint errors from time to time on this file. This fixes that by using a type predicate function in the filter.
Error this fixed:
$ npm test
> nextjs-project@1.1.4 test
> npm run lint && npm run tsc
> nextjs-project@1.1.4 lint
> next lint && stylelint "source/**/*.css"
./source/06-utility/storybook/getCssVariables.ts
22:39 Error: This assertion is unnecessary since it does not change the type of the expression. @typescript-eslint/no-unnecessary-type-assertion
25:18 Error: This assertion is unnecessary since it does not change the type of the expression. @typescript-eslint/no-unnecessary-type-assertion
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
I was getting TS/lint errors from time to time on this file. This fixes that by using a type predicate function in the filter.
Error this fixed: