reactjs 外部Jquery代码导致react出错

ruarlubt  于 2023-03-17  发布在  React
关注(0)|答案(1)|浏览(169)
Search for the keywords to learn more about each error.
WARNING in [eslint]
src\js\main.js
  Line 8:3:     'use strict' is unnecessary inside of modules  strict
  Line 22:46:   Expected '===' and instead saw '=='            eqeqeq
  Line 22:103:  Expected '===' and instead saw '=='            eqeqeq
  Line 28:34:   Expected '===' and instead saw '=='            eqeqeq

ERROR in [eslint]
src\js\main.js
  Line 7:1:    Expected an assignment or function call and instead saw an expression  no-unused-expressions    
  Line 22:9:   Unexpected use of 'location'                                           no-restricted-globals    
  Line 22:85:  Unexpected use of 'location'                                           no-restricted-globals    
  Line 194:5:  'AOS' is not defined                                                   no-undef
  Line 203:4:  'jQuery' is not defined                                                no-undef

Search for the keywords to learn more about each error.

web pack compiled with 1 error and 1 warning

我在react index.js中导入了外部JavaScript文件,外部jQuery代码导致react出错。

aurhwmvo

aurhwmvo1#

这些都是掉毛错误,您只需要更正列出的问题。例如:你应该从代码的第8行删除“usestrict”。

相关问题