第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

reactjs 項(xiàng)目中的 Eslint 修復(fù)警告

reactjs 項(xiàng)目中的 Eslint 修復(fù)警告

森林海 2022-06-09 18:23:51
我有規(guī)則'react/state-in-constructor'的警告定義不是foundeslint(react/state-in-constructor)Eslint 版本 6.8.0我的文件.eslintrc.js中的代碼module.exports = {  env: {    node: true  },  extends: ['eslint:recommended', 'plugin:react/recommended'],  globals: {    Atomics: 'readonly',    SharedArrayBuffer: 'readonly'  },  parser: 'babel-eslint',  parserOptions: {    ecmaFeatures: {      jsx: true    },    ecmaVersion: 2018,    sourceType: 'module'  },  plugins: ['react'],  rules: {    strict: 0,    semi: 'error',    'react/state-in-constructor': 1,    'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }]  },  settings: {    react: {      createClass: 'createReactClass',      pragma: 'React',      version: 'detect',      flowVersion: '0.53'    },    propWrapperFunctions: [      'forbidExtraProps',      { property: 'freeze', object: 'Object' },      { property: 'myFavoriteWrapper' }    ],    linkComponents: ['Hyperlink', { name: 'Link', linkAttribute: 'to' }]  }};
查看完整描述

1 回答

?
倚天杖

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超3個(gè)贊

您的eslint-plugin-reactnpm 包需要更新才能使該功能正常工作。

通過運(yùn)行解決它npm install eslint-plugin-react@latest。

或者用紗線:yarn add eslint-plugin-react@latest


查看完整回答
反對 回復(fù) 2022-06-09
  • 1 回答
  • 0 關(guān)注
  • 259 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)