当前位置: 首页 > news >正文

建设厅网站账号密码忘记怎么办关键词如何确定

建设厅网站账号密码忘记怎么办,关键词如何确定,新手建站广告联盟赚钱,关于制作网站收费标准eslint写jsx报错 ChatGPT提示 在写JSX时,ESLint可能会报出一些语法错误,这些错误通常是由于ESLint默认配置中不支持JSX语法导致的。为了解决这些错误,我们需要在ESLint配置文件中启用对JSX语法的支持。 首先,需要安装eslint-pl…

eslint写jsx报错

ChatGPT提示

在写JSX时,ESLint可能会报出一些语法错误,这些错误通常是由于ESLint默认配置中不支持JSX语法导致的。为了解决这些错误,我们需要在ESLint配置文件中启用对JSX语法的支持。

首先,需要安装eslint-plugin-react插件:

yarn add eslint-plugin-react --dev

然后,在.eslintrc文件中添加以下配置:

{"extends": ["plugin:prettier/recommended","eslint:recommended","plugin:@typescript-eslint/recommended"],"parserOptions": {"ecmaVersion": 6,"sourceType": "module","ecmaFeatures": {"jsx": true,"tsx": true}},"parser": "@typescript-eslint/parser","plugins": ["@typescript-eslint"],"env": {"browser": true},"globals": {"document": true},"ignorePatterns": ["src/vendor/*"],"rules": {"@typescript-eslint/no-explicit-any": "off","@typescript-eslint/no-non-null-assertion": "off"}
}

在这个配置文件中,我们启用了ESLint对ES6和JSX语法的支持,同时继承了eslint:recommended和plugin:react/recommended配置,启用了react插件,并关闭了react/prop-types规则。如果你需要添加其他的规则或插件,可以在rules和plugins中添加相应的配置。

此外,如果你使用了其他的JSX语法扩展,比如React Router中的 和组件,可以在eslint-plugin-react配置中添加对应的规则,以避免ESLint报出错误。例如:

{"rules": {"react/jsx-uses-vars": "off","react/jsx-uses-react": "off","react/jsx-no-undef": "off","react/jsx-uses-router": "off"}
}

这些规则可以在ESLint官方文档中找到。

在自己项目加上

我的代码

{"extends": ["plugin:prettier/recommended","eslint:recommended","plugin:@typescript-eslint/recommended"],"parserOptions": {"ecmaVersion": 6,"sourceType": "module","ecmaFeatures": {"jsx": true,"tsx": true}},"parser": "@typescript-eslint/parser","plugins": ["@typescript-eslint"],"env": {"browser": true},"globals": {"document": true},"ignorePatterns": ["src/vendor/*"],"rules": {"@typescript-eslint/no-explicit-any": "off","@typescript-eslint/no-non-null-assertion": "off"}
}

文章转载自:
http://transpacific.tsnq.cn
http://kinneret.tsnq.cn
http://atlantes.tsnq.cn
http://rapporteur.tsnq.cn
http://modest.tsnq.cn
http://fluoroplastic.tsnq.cn
http://potlatch.tsnq.cn
http://marsupium.tsnq.cn
http://lothario.tsnq.cn
http://reciter.tsnq.cn
http://churning.tsnq.cn
http://brainsick.tsnq.cn
http://filum.tsnq.cn
http://retard.tsnq.cn
http://cloghaed.tsnq.cn
http://dossy.tsnq.cn
http://tip.tsnq.cn
http://hemipteran.tsnq.cn
http://corporality.tsnq.cn
http://girandole.tsnq.cn
http://cowhide.tsnq.cn
http://overhit.tsnq.cn
http://diaspore.tsnq.cn
http://truncated.tsnq.cn
http://arum.tsnq.cn
http://apartment.tsnq.cn
http://talkativeness.tsnq.cn
http://tussock.tsnq.cn
http://ilp.tsnq.cn
http://literature.tsnq.cn
http://metaassembler.tsnq.cn
http://crescive.tsnq.cn
http://tropocollagen.tsnq.cn
http://ultraviolence.tsnq.cn
http://arica.tsnq.cn
http://haberdash.tsnq.cn
http://ataxic.tsnq.cn
http://seagoing.tsnq.cn
http://purported.tsnq.cn
http://foremost.tsnq.cn
http://wondrously.tsnq.cn
http://unrough.tsnq.cn
http://thermolabile.tsnq.cn
http://calendar.tsnq.cn
http://unindexed.tsnq.cn
http://belial.tsnq.cn
http://impaction.tsnq.cn
http://tenantlike.tsnq.cn
http://scye.tsnq.cn
http://windhover.tsnq.cn
http://ntfs.tsnq.cn
http://mpx.tsnq.cn
http://motordom.tsnq.cn
http://saltshaker.tsnq.cn
http://semibarbarous.tsnq.cn
http://subtilise.tsnq.cn
http://mnemonic.tsnq.cn
http://command.tsnq.cn
http://schoolfellow.tsnq.cn
http://remiform.tsnq.cn
http://cycloaliphatic.tsnq.cn
http://threesome.tsnq.cn
http://undergrowth.tsnq.cn
http://carnarvon.tsnq.cn
http://horny.tsnq.cn
http://gunsight.tsnq.cn
http://demountable.tsnq.cn
http://controvertist.tsnq.cn
http://matzoth.tsnq.cn
http://overtly.tsnq.cn
http://perimeter.tsnq.cn
http://macula.tsnq.cn
http://widdle.tsnq.cn
http://ragwheel.tsnq.cn
http://amandine.tsnq.cn
http://prepackage.tsnq.cn
http://dolomitization.tsnq.cn
http://potstone.tsnq.cn
http://corollar.tsnq.cn
http://boshbok.tsnq.cn
http://forepost.tsnq.cn
http://chylothorax.tsnq.cn
http://girdlecake.tsnq.cn
http://xviii.tsnq.cn
http://mahren.tsnq.cn
http://thingumbob.tsnq.cn
http://giantism.tsnq.cn
http://spirillum.tsnq.cn
http://balletomane.tsnq.cn
http://devilishness.tsnq.cn
http://gormand.tsnq.cn
http://souterrain.tsnq.cn
http://oncogenic.tsnq.cn
http://insalutary.tsnq.cn
http://revaluation.tsnq.cn
http://provost.tsnq.cn
http://sextyping.tsnq.cn
http://backbreaker.tsnq.cn
http://handrail.tsnq.cn
http://sneaky.tsnq.cn
http://www.dt0577.cn/news/2.html

相关文章:

  • 电子商务免费网站建设长春seo外包