{"id":4442,"date":"2022-11-06T13:29:03","date_gmt":"2022-11-06T04:29:03","guid":{"rendered":"https:\/\/blog.wsd.sh\/?p=4442"},"modified":"2022-11-06T13:42:12","modified_gmt":"2022-11-06T04:42:12","slug":"eslint-warning","status":"publish","type":"post","link":"https:\/\/blog.wsd.sh\/?p=4442","title":{"rendered":"<small>eslint warning<\/small>"},"content":{"rendered":"<p>1. Warning<\/p>\n<pre>\r\n$ eslint tray\/tray_sub.js\r\nWarning: React version not specified in eslint-plugin-react settings. See https:\/\/github.com\/yannickcr\/eslint-plugin-react#configuration .\r\n\r\n\/home\/wsd02\/PrivateInvoice\/817r\/modules\/tray\/tray_sub.js\r\n   24:18  error  'require' is not defined  no-undef\r\n   28:16  error  'require' is not defined  no-undef\r\n   29:12  error  'require' is not defined  no-undef\r\n  338:1   error  'module' is not defined   no-undef\r\n<\/pre>\n<p>2. &#8216;require&#8217; is not defined  no-undef<\/p>\n<pre>\r\n    \"env\": {\r\n        \"browser\": true,\r\n        \"es2021\": true,\r\n        \"node\": true <-- add\r\n    },\r\n<\/pre>\n<p>3. Warning: React version not specified in eslint-plugin-react settings<\/p>\n<pre>\r\n    \"extends\": [\r\n        \"eslint:recommended\",\r\n        \/\/\"plugin:react\/recommended\" <-- del\r\n    ],\r\n<\/pre>\n<p>4. .eslintrc.js<\/p>\n<pre>\r\nmodule.exports = {\r\n    \"env\": {\r\n        \"browser\": true,\r\n        \"es2021\": true,\r\n        \"node\": true\r\n    },\r\n    \"extends\": [\r\n        \"eslint:recommended\",\r\n        \/\/\"plugin:react\/recommended\"\r\n    ],\r\n    \"parserOptions\": {\r\n        \"ecmaFeatures\": {\r\n            \"jsx\": true\r\n        },\r\n        \"ecmaVersion\": \"latest\",\r\n        \"sourceType\": \"module\"\r\n    },\r\n    \"plugins\": [\r\n        \"react\"\r\n    ],\r\n    \"rules\": {\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. Warning $ eslint tray\/tray_sub.js Warning: React version not specified in eslint-plugin-react settings. See&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/4442"}],"collection":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4442"}],"version-history":[{"count":2,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/4442\/revisions"}],"predecessor-version":[{"id":4444,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/4442\/revisions\/4444"}],"wp:attachment":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}