1. Warning: warning unexpected any. Specify a different type @typescript eslint/no explicit any
Solution: turn off warnings of type any.
// In the .eslintrc.js file, find the rules and add a line of code "@typescript-eslint/no-explicit-any": ["off"]
After adding, you can run the project again.
2. When using eslint, always remind warning delete ` · ` prettier/prettier or 405:15 warning insert ` ··· ` prettier
Solution: just executable code
npm run lint --fix
It will be modified automatically after execution. I see here that the single quotation mark is changed to double quotation mark.
3. Warning: missing return type on function (@typescript-eslint/explicit-module-boundary-types) at src\main.ts:32:8
Solution: add rules to the. Eslintrc.js file to disable TA
"rules": { "@typescript-eslint/explicit-module-boundary-types": "off" },
4. Require statement not part of import statement.(@typescript-eslint/no-var-requires)
// in vue.config.js: const path = require('path') // Error: Require statement not part of import statement.(@typescript-eslint/no-var-requires)
Solution: add the following content to the rules attribute in.Eslintrc.js:
rules: { '@typescript-eslint/no-var-requires': 0 }
Similar Posts:
- [Solved] Vue3.X version error: Parsing error: Parsing error: Unexpected token
- Expected indentation of 8 spaces but found [How to Solve]
- How to Solve Vue3 ts setup getCurrentInstance Error
- Error-Do not use “//@ts-ignore“ because it alters compilation errors [How to Solve]
- [Solved] ESLint: ‘React’ was used before it was defined.(no-use-before-define)
- [Solved] ESLint Error: Failed to load config “standard” to extend from
- [Solved] ESLint Error: Line 10 exceeds the maximum line length of 100
- [Solved] Vue Esline Error: Parsing error: Unexpected token import
- No undef check error in eslint
- Windows / Android / IOS / Linux platform h265 streaming media player easyplayer.js deployment error