fullstack-hy2020 / fullstack-hy2020.github.io

https://fullstack-hy2020.github.io
Other
1.53k stars 3.84k forks source link

Update part9b.md #3743

Closed sheikhameen closed 1 month ago

sheikhameen commented 1 month ago

Changes made to section "The horrors of any" only.

  1. Error: ReferenceError: eslint is not defined when running npm run lint It's because we were extending the config with eslint.configs.recommended but eslint was not imported. Fixed by import eslint from '@eslint/js';

  2. Error: TypeError: Key "rules": Key "@typescript-eslint/semi": Could not find "semi" in plugin "@typescript-eslint". Did you mean "@/semi"? @typescript-eslint/semi is deprecated and has been moved to ESLint stylistic plugin. Fixed by: changing install command to include @stylistic/eslint-plugin, importing and using the stylistic plugin, and setting the rule '@stylistic/semi': "error" instead of '@typescript-eslint/semi': 'error'.

mluukkai commented 1 month ago

fixed by another commit