diff --git a/package.json b/package.json index 9575db8..15c4c44 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": true, "scripts": { "preinstall": "npx only-allow pnpm", - "lint": "npx eslint --ext .js,.json,.vue --fix .", + "lint": "npx eslint --ext .js,.json,.vue,.md .", "release": "lerna publish --conventional-commits" }, "devDependencies": { diff --git a/packages/basic/index.js b/packages/basic/index.js index c6bfbc6..08a36e2 100644 --- a/packages/basic/index.js +++ b/packages/basic/index.js @@ -10,6 +10,16 @@ module.exports = { 'plugin:eslint-comments/recommended', 'plugin:jsonc/recommended-with-jsonc', 'plugin:yml/standard', + 'plugin:markdown/recommended', + ], + ignorePatterns: [ + '.cache', + '*.min.*', + 'CHANGELOG.md', + 'dist', + 'LICENSE.*', + 'public', + 'temp', ], plugins: [ 'html', @@ -88,7 +98,7 @@ module.exports = { }, }, { - files: ['scripts/**/*.*'], + files: ['scripts/**/*.*', 'cli.*'], rules: { 'no-console': 'off', }, @@ -99,6 +109,20 @@ module.exports = { 'no-unused-expressions': 'off', }, }, + { + files: ['*.md'], + parser: 'markdown-eslint-parser', + }, + { + // Code blocks in markdown file + files: ['**/*.md/*.*'], + rules: { + 'no-unused-vars': 'off', + 'no-undef': 'off', + 'no-unused-expressions': 'off', + 'import/no-unresolved': 'off', + }, + }, ], rules: { // import diff --git a/packages/basic/package.json b/packages/basic/package.json index a424cd9..db5988e 100644 --- a/packages/basic/package.json +++ b/packages/basic/package.json @@ -21,6 +21,7 @@ "eslint-plugin-html": "^6.2.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsonc": "^2.2.1", + "eslint-plugin-markdown": "^2.2.1", "eslint-plugin-n": "^15.0.1", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-unicorn": "^41.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e82d49e..bf0de1b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: packages/all: specifiers: - '@antfu/eslint-config-react': ^0.16.1 - '@antfu/eslint-config-vue': ^0.16.1 + '@antfu/eslint-config-react': ^0.17.0 + '@antfu/eslint-config-vue': ^0.17.0 '@typescript-eslint/eslint-plugin': ^5.13.0 '@typescript-eslint/parser': ^5.13.0 eslint: ^8.10.0 @@ -61,6 +61,7 @@ importers: eslint-plugin-html: ^6.2.0 eslint-plugin-import: ^2.25.4 eslint-plugin-jsonc: ^2.2.1 + eslint-plugin-markdown: ^2.2.1 eslint-plugin-n: ^15.0.1 eslint-plugin-promise: ^6.0.0 eslint-plugin-unicorn: ^41.0.0 @@ -73,6 +74,7 @@ importers: eslint-plugin-html: 6.2.0 eslint-plugin-import: 2.25.4_eslint@8.10.0 eslint-plugin-jsonc: 2.2.1_eslint@8.10.0 + eslint-plugin-markdown: 2.2.1_eslint@8.10.0 eslint-plugin-n: 15.0.1_eslint@8.10.0 eslint-plugin-promise: 6.0.0_eslint@8.10.0 eslint-plugin-unicorn: 41.0.0_eslint@8.10.0 @@ -84,7 +86,7 @@ importers: packages/react: specifiers: - '@antfu/eslint-config-ts': ^0.16.1 + '@antfu/eslint-config-ts': ^0.17.0 eslint: ^8.10.0 eslint-plugin-react: ^7.29.3 react: ^17.0.2 @@ -99,7 +101,7 @@ importers: packages/typescript: specifiers: - '@antfu/eslint-config-basic': ^0.16.1 + '@antfu/eslint-config-basic': ^0.17.0 '@typescript-eslint/eslint-plugin': ^5.13.0 '@typescript-eslint/parser': ^5.13.0 eslint: ^8.10.0 @@ -112,7 +114,7 @@ importers: packages/vue: specifiers: - '@antfu/eslint-config-ts': ^0.16.1 + '@antfu/eslint-config-ts': ^0.17.0 eslint: ^8.10.0 eslint-plugin-vue: ^8.5.0 dependencies: @@ -1043,6 +1045,12 @@ packages: resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=} dev: false + /@types/mdast/3.0.10: + resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} + dependencies: + '@types/unist': 2.0.6 + dev: false + /@types/minimatch/3.0.3: resolution: {integrity: sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==} dev: true @@ -1062,6 +1070,10 @@ packages: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true + /@types/unist/2.0.6: + resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + dev: false + /@typescript-eslint/eslint-plugin/5.13.0_33fffc354ccfa91fbe7d1677b9395a0a: resolution: {integrity: sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1534,6 +1546,18 @@ packages: supports-color: 7.1.0 dev: true + /character-entities-legacy/1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: false + + /character-entities/1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: false + + /character-reference-invalid/1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: false + /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true @@ -2187,6 +2211,18 @@ packages: natural-compare: 1.4.0 dev: false + /eslint-plugin-markdown/2.2.1_eslint@8.10.0: + resolution: {integrity: sha512-FgWp4iyYvTFxPwfbxofTvXxgzPsDuSKHQy2S+a8Ve6savbujey+lgrFFbXQA0HPygISpRYWYBjooPzhYSF81iA==} + engines: {node: ^8.10.0 || ^10.12.0 || >= 12.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.10.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: false + /eslint-plugin-n/15.0.1_eslint@8.10.0: resolution: {integrity: sha512-w1vgnlS3Y3kd2Ye2YpQvWJppx6ViySIpBIcdlw1dBBaX3m1R/cdKHE3X2PWXhJdH88pmFy1a+04a6lMlo5D9EQ==} engines: {node: '>=12.22.0'} @@ -3042,7 +3078,7 @@ packages: run-async: 2.4.1 rxjs: 6.6.0 string-width: 4.2.2 - strip-ansi: 6.0.0 + strip-ansi: 6.0.1 through: 2.3.8 dev: true @@ -3064,6 +3100,17 @@ packages: resolution: {integrity: sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=} dev: true + /is-alphabetical/1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: false + + /is-alphanumerical/1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: false + /is-arrayish/0.2.1: resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} @@ -3116,6 +3163,10 @@ packages: resolution: {integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==} engines: {node: '>= 0.4'} + /is-decimal/1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: false + /is-extglob/2.1.1: resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} engines: {node: '>=0.10.0'} @@ -3155,6 +3206,10 @@ packages: dependencies: is-extglob: 2.1.1 + /is-hexadecimal/1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: false + /is-lambda/1.0.1: resolution: {integrity: sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=} dev: true @@ -3575,6 +3630,22 @@ packages: engines: {node: '>=8'} dev: true + /mdast-util-from-markdown/0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.10 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-to-string/2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: false + /meow/3.7.0: resolution: {integrity: sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=} engines: {node: '>=0.10.0'} @@ -3616,6 +3687,15 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + /micromark/2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.2 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: false + /micromatch/4.0.2: resolution: {integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==} engines: {node: '>=8'} @@ -4207,6 +4287,17 @@ packages: callsites: 3.1.0 dev: true + /parse-entities/2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: false + /parse-github-repo-url/1.4.1: resolution: {integrity: sha1-nn2LslKmy2ukJZUGC3v23z28H1A=} dev: true @@ -4933,7 +5024,7 @@ packages: dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.0 + strip-ansi: 6.0.1 dev: true /string.prototype.matchall/4.0.6: @@ -5310,6 +5401,12 @@ packages: imurmurhash: 0.1.4 dev: true + /unist-util-stringify-position/2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.6 + dev: false + /universal-user-agent/6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: true