Changes made to section "The horrors of any" only.
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';
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'.
Changes made to section "The horrors of any" only.
Error:
ReferenceError: eslint is not defined
when runningnpm run lint
It's because we were extending the config witheslint.configs.recommended
but eslint was not imported. Fixed byimport eslint from '@eslint/js';
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'
.