From 5f6e04456642141ad5e60cd17eb9bca8e0877167 Mon Sep 17 00:00:00 2001 From: Justin Anastos Date: Mon, 26 Aug 2019 12:02:05 -0400 Subject: [PATCH] install eslint-plugin-mdx --- .eslintrc.js | 5 + package-lock.json | 316 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 3 files changed, 323 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 765e3c5a..194f21ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,7 @@ module.exports = { "prettier/flowtype", "prettier/react", "prettier/standard", + "plugin:mdx/recommended", ], plugins: ["prettier", "react", "react-hooks"], rules: { @@ -76,6 +77,10 @@ module.exports = { node: true, }, }, + { + files: ["*.mdx"], + extends: ["plugin:mdx/overrides"], + }, ], settings: { react: { diff --git a/package-lock.json b/package-lock.json index 607a6170..8bd75903 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2670,6 +2670,12 @@ "object-assign": "^4.1.1" } }, + "@styled-system/css": { + "version": "5.0.23", + "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.0.23.tgz", + "integrity": "sha512-yC3S0Iox8OTPAyrP1t5yY9nURUICcUdhVYOkwffftuxa5+txxI4qkT2e9JNCc2aaem+DG8mlXTdnYefjqge5wg==", + "dev": true + }, "@styled-system/flexbox": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.0.12.tgz", @@ -2715,6 +2721,149 @@ "@styled-system/core": "^5.0.12" } }, + "@styled-system/should-forward-prop": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.1.tgz", + "integrity": "sha512-vWgA9qtmo+Cjg63UiLNbuIHUA+nUMvl2tAFtiYE8KKIAz+CB8D11spVXE4JL89HG77sjuuQFwI5D778CKz7q6Q==", + "dev": true, + "requires": { + "@emotion/is-prop-valid": "^0.8.1", + "@emotion/memoize": "^0.7.1", + "styled-system": "^5.1.1" + }, + "dependencies": { + "@styled-system/background": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.1.tgz", + "integrity": "sha512-AtcDYXVO3Rfui2jZGNBuFinqx25FQ54d6d8JKRPd4g/5wlyw24hgps6VvB3fqNgsA6JKwulIuZf9mfUX4RnPFg==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/border": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.1.tgz", + "integrity": "sha512-N4jSiyq18zfY2xg1G2+adGCQ3s+geRYZPJ4R/PT/rZM7kbzCRr8xqHNg+OWkDiDTqgZ0eU7OSsRQD/byQpziZg==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/color": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.1.tgz", + "integrity": "sha512-LHG5HQPZQdMNouXq9/cs/ovadNnnvPFkb6SkTqT9uxTUzTT416erGBaXZPGFqdwPpcDw4Y1MsmrAd1taeJEzvQ==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/core": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.1.tgz", + "integrity": "sha512-8doP1Uptn1nlNrG44O/DfiRtLvoh9OkPqxEv9Gp1YAKAD2RgRTTQou/wYw/4y4pqmV3Hjb3NA/5Nbp/Uo5eGUQ==", + "dev": true, + "requires": { + "object-assign": "^4.1.1" + } + }, + "@styled-system/flexbox": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.1.tgz", + "integrity": "sha512-r9kBiCpXJee4zUQJnBom/c8d2CfUXEqrnZ5sdH62RsisoAByJ6vF5a3jI3zQXc8diEHjvNaunZL+K3gQjwJQGg==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/grid": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.1.tgz", + "integrity": "sha512-vzBNBg62syA62jEpxS21QEIwgndtxFgpCWWpitytApAybEll0mZctB06eOFhFgSNgarzOyox+1NdETB5h9KGnw==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/layout": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.1.tgz", + "integrity": "sha512-a0YnXNlORdpfcxejQEwMGd1k+pamRj+VjnAIafRdFBxBXsw55T8eG0iqWEs8U/d3i0+isKcfIyw/9OrElsksBg==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/position": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.1.tgz", + "integrity": "sha512-75+EvQA5Juh+Zbq1Hkcm0QHx5GwEGoG7BABpG/n/K0Uz2aBGKVKJ4Y3NmPRvSS7fl1Ktl7azIGAPW9XOZ9TdHA==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/shadow": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.1.tgz", + "integrity": "sha512-axdgRJ0gU8Rbw/DS24G4AAQIxYjo/fMmqxiegWja2XZDpeljqjyiYfGc7Dad3fgc+DUMn3Jjc1fHcTziTGWA4g==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/space": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.1.tgz", + "integrity": "sha512-hwF938Zx83YRZmk30HtBE2EPWT8Z8H3+Rvpkdg13Q6P93DpSNH8wIlIObFKSgcmbOcqXzvFlAYcQ3l6F6Hu3IA==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/typography": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.1.tgz", + "integrity": "sha512-zqrA9+nboPl5h/VhSKdlsUDUciHKb+Ly9YSCsvYb0Di1vI0lnYAtHzbBmI1xsfQW5us1BNflUpirCAQJshJMSQ==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1" + } + }, + "@styled-system/variant": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.1.tgz", + "integrity": "sha512-Gh3iBqksx+cTx5drqazu56KL5cJrGEdxMFQ/6Yo4ravrZd0dRmzBhsUh0+UWtSvfWfN0M0ziE3m/Zu4ZKMHMaQ==", + "dev": true, + "requires": { + "@styled-system/core": "^5.1.1", + "@styled-system/css": "^5.0.23" + } + }, + "styled-system": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.1.tgz", + "integrity": "sha512-jTFstSW5valWSkCsJhgh0fqUFLi1hL+S7Zj6Q6Dj1VTkR77l8B3/mgtSROjjiIwRG9SLW1BsJWjLn8mTNiwqgg==", + "dev": true, + "requires": { + "@styled-system/background": "^5.1.1", + "@styled-system/border": "^5.1.1", + "@styled-system/color": "^5.1.1", + "@styled-system/core": "^5.1.1", + "@styled-system/flexbox": "^5.1.1", + "@styled-system/grid": "^5.1.1", + "@styled-system/layout": "^5.1.1", + "@styled-system/position": "^5.1.1", + "@styled-system/shadow": "^5.1.1", + "@styled-system/space": "^5.1.1", + "@styled-system/typography": "^5.1.1", + "@styled-system/variant": "^5.1.1", + "object-assign": "^4.1.1" + } + } + } + }, "@styled-system/space": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.0.12.tgz", @@ -5023,6 +5172,12 @@ "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==", "dev": true }, + "character-entities-html4": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.3.tgz", + "integrity": "sha512-SwnyZ7jQBCRHELk9zf2CN5AnGEc2nA+uKMZLHvcqhpPprjkYhiLn0DywMHgN5ttFZuITMATbh68M6VIVKwJbcg==", + "dev": true + }, "character-entities-legacy": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz", @@ -6751,6 +6906,16 @@ "resolve": "^1.5.0" } }, + "eslint-mdx": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-1.4.0.tgz", + "integrity": "sha512-35uHNR256X8XgkMetyJyrO+pwt4MDvvSftrIqvoLP7n7vqF1SQFkOtW83royokFsLlWiEqESUX4vv+khhNVMBw==", + "dev": true, + "requires": { + "remark-mdx": "^1.3.1", + "remark-parse": "^7.0.1" + } + }, "eslint-module-utils": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", @@ -6780,6 +6945,19 @@ "resolve": "^1.10.0" } }, + "eslint-plugin-mdx": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-1.4.0.tgz", + "integrity": "sha512-YPznUlcNKfQmS/J8gb69tM/RtTsGUiiFnN3h8Hlusd7Epcd1772G31SHALK2X1efNOXR3+zE8KCBBxY+SIKhTQ==", + "dev": true, + "requires": { + "cosmiconfig": "^5.2.1", + "eslint-mdx": "^1.4.0", + "rebass": "^4.0.5", + "remark-lint-file-extension": "^1.0.3", + "remark-stringify": "^7.0.2" + } + }, "eslint-plugin-prettier": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz", @@ -9133,6 +9311,12 @@ "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==", "dev": true }, + "is-alphanumeric": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", + "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=", + "dev": true + }, "is-alphanumerical": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz", @@ -9859,6 +10043,12 @@ "object.assign": "^4.1.0" } }, + "longest-streak": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz", + "integrity": "sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw==", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -9963,6 +10153,12 @@ "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==", "dev": true }, + "markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": true + }, "markdown-to-jsx": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-6.10.3.tgz", @@ -9999,6 +10195,26 @@ "unist-util-remove": "^1.0.0" } }, + "mdast-util-compact": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.3.tgz", + "integrity": "sha512-nRiU5GpNy62rZppDKbLwhhtw5DXoFMqw9UNZFmlPsNaQCZ//WLjGKUwWMdJrUH+Se7UvtO2gXtAMe0g/N+eI5w==", + "dev": true, + "requires": { + "unist-util-visit": "^1.1.0" + }, + "dependencies": { + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "dev": true, + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + } + } + }, "mdast-util-definitions": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-1.2.4.tgz", @@ -12291,6 +12507,15 @@ "readable-stream": "^2.0.2" } }, + "rebass": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/rebass/-/rebass-4.0.5.tgz", + "integrity": "sha512-8MZngk/AmbC8u8pGmI1WelbsKYjmN9Z91C11G4ESB9QZnoppWsI+OAqio1/4/l6dxHmwZ/hR8Q4UApF+IVEprA==", + "dev": true, + "requires": { + "reflexbox": "^4.0.5" + } + }, "recast": { "version": "0.14.7", "resolved": "https://registry.npmjs.org/recast/-/recast-0.14.7.tgz", @@ -12335,6 +12560,20 @@ "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", "dev": true }, + "reflexbox": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/reflexbox/-/reflexbox-4.0.5.tgz", + "integrity": "sha512-SFWlrlKusgQVqjEimlLGNls3khjMlaTLrrF1H7YY7FfXv/mKK5mREDOW4l95D6Qa1kGoyM3hF+H5RLb3N6bCCA==", + "dev": true, + "requires": { + "@emotion/core": "^10.0.0", + "@emotion/styled": "^10.0.0", + "@styled-system/css": "^5.0.0", + "@styled-system/should-forward-prop": "^5.0.0", + "react": "^16.8.6", + "styled-system": "^5.0.0" + } + }, "refractor": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-2.10.0.tgz", @@ -12479,6 +12718,15 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, + "remark-lint-file-extension": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/remark-lint-file-extension/-/remark-lint-file-extension-1.0.3.tgz", + "integrity": "sha512-P5gzsxKmuAVPN7Kq1W0f8Ss0cFKfu+OlezYJWXf+5qOa+9Y5GqHEUOobPnsmNFZrVMiM7JoqJN2C9ZjrUx3N6Q==", + "dev": true, + "requires": { + "unified-lint-rule": "^1.0.0" + } + }, "remark-mdx": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.4.0.tgz", @@ -12647,6 +12895,28 @@ "mdast-squeeze-paragraphs": "^3.0.0" } }, + "remark-stringify": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-7.0.3.tgz", + "integrity": "sha512-+jgmjNjm2kR7y2Ns1BATXRlFr+iQ7sDcpSgytfU77nkw7UCd5yJNArSxB3MU3Uul7HuyYNTCjetoGfy8xLia1A==", + "dev": true, + "requires": { + "ccount": "^1.0.0", + "is-alphanumeric": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "longest-streak": "^2.0.1", + "markdown-escapes": "^1.0.0", + "markdown-table": "^1.1.0", + "mdast-util-compact": "^1.0.0", + "parse-entities": "^1.0.2", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "stringify-entities": "^2.0.0", + "unherit": "^1.0.4", + "xtend": "^4.0.1" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -13189,6 +13459,12 @@ "is-fullwidth-code-point": "^2.0.0" } }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=", + "dev": true + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -13606,6 +13882,19 @@ "safe-buffer": "~5.1.0" } }, + "stringify-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-2.0.0.tgz", + "integrity": "sha512-fqqhZzXyAM6pGD9lky/GOPq6V4X0SeTAFBl0iXb/BzOegl40gpf/bV3QQP7zULNYvjr6+Dx8SCaDULjVoOru0A==", + "dev": true, + "requires": { + "character-entities-html4": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.2", + "is-hexadecimal": "^1.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -14352,6 +14641,15 @@ } } }, + "unified-lint-rule": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.4.tgz", + "integrity": "sha512-q9wY6S+d38xRAuWQVOMjBQYi7zGyKkY23ciNafB8JFVmDroyKjtytXHCg94JnhBCXrNqpfojo3+8D+gmF4zxJQ==", + "dev": true, + "requires": { + "wrapped": "^1.0.1" + } + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -15212,6 +15510,24 @@ "microevent.ts": "~0.1.1" } }, + "wrapped": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wrapped/-/wrapped-1.0.1.tgz", + "integrity": "sha1-x4PZ2Aeyc+mwHoUWgKk4yHyQckI=", + "dev": true, + "requires": { + "co": "3.1.0", + "sliced": "^1.0.1" + }, + "dependencies": { + "co": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", + "integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g=", + "dev": true + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 6180fd4e..561351fd 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "netlify": "run-s build build:storybook", "icons": "run-s clean:icons icons:generate", "icons:generate": "ts-node src/icons/scripts/convert", - "lint": "eslint --max-warnings 0 --cache --ext .js,.jsx,.ts,.tsx .eslintrc.js build-reset.ts components-util/ .storybook/ stories/ src/", + "lint": "eslint --max-warnings 0 --cache --ext .js,.jsx,.ts,.tsx,.mdx .eslintrc.js build-reset.ts components-util/ .storybook/ stories/ src/", "prepare": "npm run build", "release": "./scripts/release.sh", "start": "npm run storybook", @@ -75,6 +75,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^6.0.0", "eslint-config-problems": "^3.0.1", + "eslint-plugin-mdx": "^1.4.0", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.14.2", "eslint-plugin-react-hooks": "^1.6.1",