diff --git a/.eslintrc.yml b/.eslintrc.yml index 46342ee6e38..b229eca61b2 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -2,10 +2,6 @@ env: browser: true es2021: true extends: eslint:recommended -overrides: - - files: ["*.yaml", "*.yml"] - plugins: ["yaml"] - extends: ["plugin:yaml/recommended"] # Required when using experimental EcmaScript features parser: "@babel/eslint-parser" parserOptions: @@ -17,6 +13,22 @@ parserOptions: plugins: - "@babel/plugin-syntax-import-assertions" rules: {} +overrides: + # YAML files + - files: ["**/*.yaml", "**/*.yml"] + plugins: ["yaml"] + extends: ["plugin:yaml/recommended"] + # Markdown files + - files: ["**/*.md"] + plugins: ["markdown"] + processor: "markdown/markdown" + - files: ["**/*.md/*.js"] + rules: + "no-console": "off" + "no-empty": "off" + "no-undef": "off" + "no-unused-labels": "off" + "no-unused-vars": "off" globals: it: readonly describe: readonly diff --git a/package.json b/package.json index 5c0d2e21192..b6cf58cd376 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "esbuild": "^0.15.3", "esbuild-plugin-yaml": "^0.0.1", "eslint": "^8.23.1", + "eslint-plugin-markdown": "^3.0.0", "eslint-plugin-yaml": "^0.5.0", "esm": "^3.2.25", "handlebars": "^4.7.7", diff --git a/yarn.lock b/yarn.lock index 6fb85587c0f..e4643545b65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7921,6 +7921,13 @@ eslint-plugin-jsx-a11y@^6.5.1: minimatch "^3.1.2" semver "^6.3.0" +eslint-plugin-markdown@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.0.tgz#69a63ab3445076a3c2eb6fce6f5114785b19d318" + integrity sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg== + dependencies: + mdast-util-from-markdown "^0.8.5" + eslint-plugin-n@^15.1.0: version "15.2.4" resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.4.tgz#d62021a0821ae650701ed459756aaf478a9b6056" @@ -12316,7 +12323,7 @@ mdast-util-find-and-replace@^2.0.0: unist-util-is "^5.0.0" unist-util-visit-parents "^5.0.0" -mdast-util-from-markdown@^0.8.0: +mdast-util-from-markdown@^0.8.0, mdast-util-from-markdown@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz#d1ef2ca42bc377ecb0463a987910dae89bd9a28c" integrity sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==