{"id":1721,"date":"2017-08-01T15:03:20","date_gmt":"2017-08-01T07:03:20","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1721"},"modified":"2017-08-01T15:03:20","modified_gmt":"2017-08-01T07:03:20","slug":"eslint%e6%95%99%e7%a8%8beslint%e5%bc%80%e5%8f%91%e6%8c%87%e5%8d%97eslint%e4%b8%ad%e6%96%87%e4%bd%bf%e7%94%a8%e6%89%8b%e5%86%8ceslint%e4%b8%ad%e6%96%87%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1721","title":{"rendered":"ESLint\u6559\u7a0b,ESLint\u5f00\u53d1\u6307\u5357,ESLint\u4e2d\u6587\u4f7f\u7528\u624b\u518c,ESLint\u4e2d\u6587\u6587\u6863"},"content":{"rendered":"<p>\n\t\u767e\u5ea6\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u5173\u4e8e<a href=\"http:\/\/eslint.org\/\" name=\"eslint\" target=\"_blank\" title=\"eslint\">ESLint<\/a>\u7684\u6587\u7ae0\u4e0d\u662f\u5f88\u591a\u3002\u800c\u6709\u7684\u4eba\u5df2\u7ecf\u4f7f\u7528\u5f88\u4e45\u4e86\uff0c\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u5728\u7ed9\u5927\u5bb6\u666e\u53ca\u4e00\u4e0beslint\u7684\u76f8\u5173\u77e5\u8bc6\u3002\n<\/p>\n<h2>\n\tESLint\u662f\u4ec0\u4e48\uff1f<br \/>\n<\/h2>\n<p>\n\tESLint\u662f\u4e00\u4e2aQA\u5de5\u5177\uff0c\u7528\u6765\u907f\u514d\u4f4e\u7ea7\u9519\u8bef\u548c\u7edf\u4e00\u4ee3\u7801\u7684\u98ce\u683c\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"ESLint\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201708\/01\/1501569521_620994.png\" style=\"width: 367px;height: 308px\" \/>\n<\/p>\n<p>\n\tESLint\u88ab\u8bbe\u8ba1\u4e3a\u5b8c\u5168\u53ef\u914d\u7f6e\u7684\uff0c\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u5f0f\u6765\u914d\u7f6eESLint\uff1a\n<\/p>\n<ul>\n<li>\n\t\t\u5728\u6ce8\u91ca\u4e2d\u914d\u7f6e\uff1a\u4f7f\u7528JavaScript\u6ce8\u91ca\u76f4\u63a5\u628a\u914d\u7f6e\u5d4c\u5165\u5230JS\u6587\u4ef6\u4e2d\u3002\n\t<\/li>\n<li>\n\t\t\u914d\u7f6e\u6587\u4ef6\uff1a\u4f7f\u7528\u4e0b\u9762\u4efb\u4e00\u7684\u6587\u4ef6\u6765\u4e3a\u5168\u90e8\u7684\u76ee\u5f55\u548c\u5b83\u7684\u5b50\u76ee\u5f55\u6307\u5b9a\u914d\u7f6e\u4fe1\u606f\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u4e0b\u9762\u8fd9\u4e9b\u6587\u4ef6\u7684\u4f18\u5148\u7ea7\u5219\u662f\u6309\u7167\u4ee5\u4e0a\u51fa\u73b0\u7684\u987a\u5e8f\uff08.eslintrc.js &gt; .eslintrc.yaml &gt; .eslintrc.yml &gt; .eslintrc.json &gt; .eslintrc &gt; package.json\uff09\u3002\n<\/p>\n<ul>\n<li>\n\t\tjavascript\uff1a\u4f7f\u7528.eslintrc.js\u6587\u4ef6\u5e76\u5bfc\u51fa\u4e00\u4e2a\u5305\u542b\u914d\u7f6e\u7684\u5bf9\u8c61\u3002\n\t<\/li>\n<li>\n\t\tYAML\uff1a.eslintrc.yaml\u6216\u8005.eslintrc.yml\n\t<\/li>\n<li>\n\t\tJSON\uff1a.eslintrc.json\uff0c\u5e76\u4e14\u6b64\u6587\u4ef6\u5141\u8bb8\u4f7f\u7528JS\u5f62\u5f0f\u7684\u6ce8\u91ca\n\t<\/li>\n<li>\n\t\t\u5e9f\u5f03\u7684\u7528\u6cd5\uff1a.eslintrc\uff0c\u6b64\u6587\u4ef6\u53ef\u4ee5\u662fJSON\u6216\u8005YAML\n\t<\/li>\n<li>\n\t\tpackage.json\uff1a\u5728package.json\u6587\u4ef6\u4e2d\u521b\u5efaeslintConfig\u5c5e\u6027\uff0c\u6240\u6709\u7684\u914d\u7f6e\u5305\u542b\u5728\u6b64\u5c5e\u6027\u4e2d\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u53ef\u4ee5\u88ab\u914d\u7f6e\u7684\u4fe1\u606f\u4e3b\u8981\u5206\u4e3a3\u7c7b\uff1a\n<\/p>\n<ul>\n<li>\n\t\tEnvironments\uff1a\u4f60\u7684 javascript \u811a\u6b65\u5c06\u8981\u8fd0\u884c\u5728\u4ec0\u4e48\u73af\u5883\uff08\u5982\uff1anodejs\uff0cbrowser\uff0ccommonjs\u7b49\uff09\u4e2d\u3002\n\t<\/li>\n<li>\n\t\tGlobals\uff1a\u6267\u884c\u4ee3\u7801\u65f6\u811a\u6b65\u9700\u8981\u8bbf\u95ee\u7684\u989d\u5916\u5168\u5c40\u53d8\u91cf\u3002\n\t<\/li>\n<li>\n\t\tRules\uff1a\u5f00\u542f\u67d0\u4e9b\u89c4\u5219\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u89c4\u5219\u7684\u7b49\u7ea7\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\tESLint\u5b89\u88c5<br \/>\n<\/h2>\n<pre class=\"brush:bash;\">\r\nnpm install -g eslint<\/pre>\n<p>\n\t\u5982\u679c\u4f60\u7684\u9879\u76ee\u8fd8\u6ca1\u6709\u914d\u7f6e\u6587\u4ef6\u7684\u8bdd\uff0c\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a&#8211;init\u53c2\u6570\u6765\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\uff1a\n<\/p>\n<pre class=\"brush:bash;\">\r\neslint --init<\/pre>\n<p>\n\t\u7136\u540e\uff0c\u914d\u5408\u547d\u4ee4\u884c\u7684eslint\u5de5\u5177\u5c31\u53ef\u4ee5\u68c0\u67e5\u4ee3\u7801\u4e86\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\neslint [options] file.js [file.js] [dir]<\/pre>\n<p>\n\t\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u5b89\u88c5\u5728\u9879\u76ee\u4e2d\uff0c\u7136\u540e\u914d\u5408\u7f16\u8f91\u5668\u7684\u63d2\u4ef6\uff08\u5982<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=dbaeumer.vscode-eslint\" name=\"vscode-eslint\" target=\"_blank\" title=\"vscode-eslint\">vscode-eslint<\/a>\uff09\u6765\u4f7f\u7528\u3002\n<\/p>\n<h2>\n\t\u6307\u5b9a\u5168\u5c40\u53d8\u91cf<br \/>\n<\/h2>\n<p>\n\t\u53ef\u4ee5\u5728\u914d\u7f6e\u6587\u4ef6\u6216\u6ce8\u91ca\u4e2d\u6307\u5b9a\u989d\u5916\u7684\u5168\u5c40\u53d8\u91cf\uff0cfalse\u8868\u660e\u53d8\u91cf\u53ea\u8bfb\uff1a\n<\/p>\n<p>\n\t\u6ce8\u91ca\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\n\/* global var1, var2 *\/\r\n\/* global var1:false, var2:false *\/<\/pre>\n<p>\n\tJSON\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\n{\r\n  &quot;globals&quot;: {\r\n      &quot;var1&quot;: true,\r\n      &quot;var2&quot;: false\r\n  }\r\n}<\/pre>\n<p>\n\t\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e9b\u89c4\u5219\u3002<br \/>\n\t\u89c4\u5219\u7684\u9519\u8bef\u7b49\u7ea7\u6709\u4e09\u79cd\uff1a\n<\/p>\n<ul>\n<li>\n\t\t&quot;off&quot; \u6216\u8005 0\uff1a\u5173\u95ed\u89c4\u5219\u3002\n\t<\/li>\n<li>\n\t\t&quot;warn&quot; \u6216\u8005 1\uff1a\u6253\u5f00\u89c4\u5219\uff0c\u5e76\u4e14\u4f5c\u4e3a\u4e00\u4e2a\u8b66\u544a\uff08\u4e0d\u5f71\u54cdexit code\uff09\u3002\n\t<\/li>\n<li>\n\t\t&quot;error&quot; \u6216\u8005 2\uff1a\u6253\u5f00\u89c4\u5219\uff0c\u5e76\u4e14\u4f5c\u4e3a\u4e00\u4e2a\u9519\u8bef\uff08exit code\u5c06\u4f1a\u662f1\uff09\u3002\n\t<\/li>\n<\/ul>\n<pre class=\"brush:jscript;\">\r\n\/* eslint eqeqeq: &quot;off&quot;, curly: &quot;error&quot; *\/\r\n\/* eslint eqeqeq: 0, curly: 2 *\/<\/pre>\n<p>\n\t\u4e5f\u53ef\u4ee5\u5728\u6ce8\u91ca\u4e2d\u5173\u95ed\u6240\u6709\u6216\u8005\u67d0\u4e2a\u89c4\u5219\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\n\/* eslint-disable *\/\r\n\/* eslint-enable *\/\r\n\/* eslint-disable no-alert, no-console *\/\r\n\/* eslint-enable no-alert, no-console *\/<\/pre>\n<p>\n\t\u5177\u4f53\u7684\u89c4\u5219\u53ef\u4ee5\u5728<a href=\"http:\/\/eslint.org\/docs\/rules\/\" name=\"eslint\" target=\"_blank\" title=\"eslint\">\u5b98\u7f51<\/a>\u4e0a\u627e\u5230\uff0c\u6216\u8005\u4f7f\u7528\u522b\u4eba\u5199\u597d\u7684\u914d\u7f6e\uff0c\u4f8b\u5982<a href=\"https:\/\/www.npmjs.com\/package\/eslint-config-airbnb\" name=\"eslint-config-airbnb\" target=\"_blank\" title=\"eslint-config-airbnb\">eslint-config-airbnb<\/a>\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u53ef\u4ee5\u4e0b\u8f7d<a href=\"https:\/\/github.com\/ruanyf\/jstraining\/tree\/master\/demos\/eslint-demo\" name=\"eslint-demo\" target=\"_blank\" title=\"eslint-demo\">demo<\/a>\uff0c\u8fdb\u5165\u7ec3\u4e60\u90e8\u5206\u3002\n<\/p>\n<h2>\n\t\u5b66\u4e60\u64cd\u4f5c\u6b65\u9aa4<br \/>\n<\/h2>\n<p>\n\t\u8fdb\u5165demos\/eslint-demo\u76ee\u5f55\uff0c\u5b89\u88c5 ESLint\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n$ cd demos\/eslint-demo\r\n$ npm install eslint --save-dev<\/pre>\n<p>\n\t\u901a\u5e38\uff0c\u6211\u4eec\u4f1a\u4f7f\u7528\u522b\u4eba\u5df2\u7ecf\u5199\u597d\u7684\u4ee3\u7801\u68c0\u67e5\u89c4\u5219\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662f Airbnb \u516c\u53f8\u7684\u89c4\u5219\u3002\u6240\u4ee5\uff0c\u8fd8\u8981\u5b89\u88c5 ESLint \u8fd9\u4e2a\u89c4\u5219\u6a21\u5757\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n$ npm install eslint-plugin-import eslint-config-airbnb-base --save-dev<\/pre>\n<p>\n\t\u4e0a\u9762\u4ee3\u7801\u4e2d\uff0ceslint-plugin-import\u662f\u8fd0\u884c\u8fd9\u4e2a\u89c4\u5219\u96c6\u5fc5\u987b\u7684\uff0c\u6240\u4ee5\u4e5f\u8981\u4e00\u8d77\u5b89\u88c5\u3002\n<\/p>\n<p>\n\tESLint \u7684\u914d\u7f6e\u6587\u4ef6\u662f.eslintrc.json\uff0c\u653e\u7f6e\u5728\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u9762\u3002\u65b0\u5efa\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5728\u91cc\u9762\u6307\u5b9a\u4f7f\u7528 Airbnb \u7684\u89c4\u5219\u3002\n<\/p>\n<pre class=\"brush:jscript;\">\r\n{\r\n  &quot;extends&quot;: &quot;airbnb-base&quot;\r\n}<\/pre>\n<p>\n\t4\u3001\u6253\u5f00\u9879\u76ee\u7684package.json\uff0c\u5728scripts\u5b57\u6bb5\u91cc\u9762\u6dfb\u52a0\u4e09\u4e2a\u811a\u672c\u3002\n<\/p>\n<pre class=\"brush:jscript;\">\r\n{\r\n  \/\/ ...\r\n  &quot;scripts&quot; : {\r\n    &quot;test&quot;: &quot;echo \\&quot;Error: no test specified\\&quot; &amp;&amp; exit 1&quot;,\r\n    &quot;lint&quot;: &quot;eslint **\/*.js&quot;,\r\n    &quot;lint-html&quot;: &quot;eslint **\/*.js -f html -o .\/reports\/lint-results.html&quot;,\r\n    &quot;lint-fix&quot;: &quot;eslint --fix **\/*.js&quot;\r\n  },\r\n  \/\/ ...\r\n}<\/pre>\n<p>\n\t\u9664\u4e86\u539f\u6709\u7684test\u811a\u672c\uff0c\u4e0a\u9762\u4ee3\u7801\u65b0\u5b9a\u4e49\u4e86\u4e09\u4e2a\u811a\u672c\uff0c\u5b83\u4eec\u7684\u4f5c\u7528\u5982\u4e0b\u3002\n<\/p>\n<ul>\n<li>\n\t\tlint\uff1a\u68c0\u67e5\u6240\u6709js\u6587\u4ef6\u7684\u4ee3\u7801\n\t<\/li>\n<li>\n\t\tlint-html\uff1a\u5c06\u68c0\u67e5\u7ed3\u679c\u5199\u5165\u4e00\u4e2a\u7f51\u9875\u6587\u4ef6.\/reports\/lint-results.html\n\t<\/li>\n<li>\n\t\tlint-fix\uff1a\u81ea\u52a8\u4fee\u6b63\u67d0\u4e9b\u4e0d\u89c4\u8303\u7684\u4ee3\u7801\n\t<\/li>\n<\/ul>\n<p>\n\t5\u3001\u8fd0\u884c\u9759\u6001\u68c0\u67e5\u547d\u4ee4\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n$ npm run lint\r\n  1:5  error    Unexpected var, use let or const instead  no-var\r\n  2:5  warning  Unexpected console statement              no-console\r\n  2 problems (1 error, 1 warning)<\/pre>\n<p>\n\t\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0c\u8be5\u547d\u4ee4\u4f1a\u4eceindex.js\u811a\u672c\u91cc\u9762\uff0c\u68c0\u67e5\u51fa\u6765\u4e24\u4e2a\u9519\u8bef\uff1a\u4e00\u4e2a\u662f\u4e0d\u5e94\u8be5\u4f7f\u7528var\u547d\u4ee4\uff0c\u53e6\u4e00\u4e2a\u662f\u4e0d\u5e94\u8be5\u5728\u751f\u4ea7\u73af\u5883\u4f7f\u7528console.log\u65b9\u6cd5\u3002\n<\/p>\n<p>\n\t6\u3001\u4fee\u6b63\u9519\u8bef\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n$ npm run lint-fix<\/pre>\n<p>\n\t\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u4ee5\u540e\uff0c\u518d\u67e5\u770bindex.js\uff0c\u53ef\u4ee5\u770b\u5230var x = 1;\u88ab\u81ea\u52a8\u6539\u6210\u4e86const x = 1;\u3002\u8fd9\u6837\u5c31\u6d88\u9664\u4e86\u4e00\u4e2a\u9519\u8bef\uff0c\u4f46\u662f\u8fd8\u7559\u4e0b\u4e00\u4e2a\u9519\u8bef\u3002\n<\/p>\n<p>\n\t7\u3001\u4fee\u6539\u89c4\u5219\u3002\n<\/p>\n<p>\n\t\u7531\u4e8e\u6211\u4eec\u60f3\u8981\u5141\u8bb8\u4f7f\u7528console.log\u65b9\u6cd5\uff0c\u56e0\u6b64\u53ef\u4ee5\u4fee\u6539.eslintrc.json\uff0c\u6539\u53d8no-console\u89c4\u5219\u3002\u8bf7\u5c06.eslintrc.json\u6539\u6210\u4e0b\u9762\u7684\u6837\u5b50\u3002\n<\/p>\n<pre class=\"brush:plain;\">\r\n{\r\n  &quot;extends&quot;: &quot;airbnb-base&quot;,\r\n  &quot;rules&quot;: {\r\n    &quot;no-console&quot;: &quot;off&quot;\r\n  }\r\n}<\/pre>\n<p>\n\t\u518d\u8fd0\u884cnpm run lint\uff0c\u5c31\u4e0d\u4f1a\u62a5\u9519\u4e86\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n$ npm run lint\r\n<\/pre>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1721\">ESLint\u6559\u7a0b,ESLint\u5f00\u53d1\u6307\u5357,ESLint\u4e2d\u6587\u4f7f\u7528\u624b\u518c,ESLint\u4e2d\u6587\u6587\u6863<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u767e\u5ea6\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u5173\u4e8eESLint\u7684\u6587\u7ae0\u4e0d\u662f\u5f88\u591a\u3002\u800c\u6709\u7684\u4eba\u5df2\u7ecf\u4f7f\u7528\u5f88\u4e45\u4e86\uff0c\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u5728\u7ed9\u5927\u5bb6\u666e\u53ca\u4e00\u4e0beslin [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1379,1404],"class_list":["post-1721","post","type-post","status-publish","format-standard","hentry","category-html5","tag-es6","tag-eslint"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1721"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1721\/revisions"}],"predecessor-version":[{"id":1722,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1721\/revisions\/1722"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}