diff --git a/README.md b/README.md index 873ce05..d01efa5 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,10 @@ If there are lint warnings, you will also be asked whether you want those to be -If you decide not to make autofixes, or the autofix completes but cannot fix all the errors, then a detailed list of the errors will be presented, using [eslint-friendly-formatter](https://github.com/royriojas/eslint-friendly-formatter). +If you decide not to make autofixes, or the autofix completes but cannot fix all the errors, then a detailed list of the errors will be presented. If you are using iTerm2 or Guake, you can set them up so that your text editor opens to the correct line when you click on the filename. -![eslint-friendly-formatter-screenshot](docs/eslint-friendly-formatter-screenshot.png) +![eslint-formatter-screenshot](docs/eslint-formatter-screenshot.png) ## Options diff --git a/docs/eslint-formatter-screenshot.png b/docs/eslint-formatter-screenshot.png new file mode 100644 index 0000000..888c7e7 Binary files /dev/null and b/docs/eslint-formatter-screenshot.png differ diff --git a/docs/eslint-friendly-formatter-screenshot.png b/docs/eslint-friendly-formatter-screenshot.png deleted file mode 100644 index 5c5c982..0000000 Binary files a/docs/eslint-friendly-formatter-screenshot.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json index da4f1bc..1f2b80d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "@inquirer/select": "^4.3.2", "eslint-filtered-fix": "^0.3.0", "optionator": "^0.9.1", - "terminal-link": "^5.0.0", "text-table": "^0.2.0", "yoctocolors": "^2.1.2" }, @@ -34,7 +33,7 @@ "tape-catch": "^1.0.6" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" }, "peerDependencies": { "eslint": "7 || 8 || 9" @@ -1394,18 +1393,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -4002,46 +3989,6 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-4.3.0.tgz", - "integrity": "sha512-i6sWEzuwadSlcr2mOnb0ktlIl+K5FVxsPXmoPfknDd2gyw4ZBIAZ5coc0NQzYqDdEYXMHy8NaY9rWwa1Q1myiQ==", - "license": "MIT", - "dependencies": { - "has-flag": "^5.0.1", - "supports-color": "^10.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" - } - }, - "node_modules/supports-hyperlinks/node_modules/has-flag": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-5.0.1.tgz", - "integrity": "sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-hyperlinks/node_modules/supports-color": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", - "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4260,37 +4207,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/terminal-link": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-5.0.0.tgz", - "integrity": "sha512-qFAy10MTMwjzjU8U16YS4YoZD+NQLHzLssFMNqgravjbvIPNiqkGFR4yjhJfmY9R5OFU7+yHxc6y+uGHkKwLRA==", - "license": "MIT", - "dependencies": { - "ansi-escapes": "^7.0.0", - "supports-hyperlinks": "^4.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/terminal-link/node_modules/ansi-escapes": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.1.tgz", - "integrity": "sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==", - "license": "MIT", - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5547,11 +5463,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==" - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -7330,27 +7241,6 @@ "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-4.3.0.tgz", - "integrity": "sha512-i6sWEzuwadSlcr2mOnb0ktlIl+K5FVxsPXmoPfknDd2gyw4ZBIAZ5coc0NQzYqDdEYXMHy8NaY9rWwa1Q1myiQ==", - "requires": { - "has-flag": "^5.0.1", - "supports-color": "^10.0.0" - }, - "dependencies": { - "has-flag": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-5.0.1.tgz", - "integrity": "sha512-CsNUt5x9LUdx6hnk/E2SZLsDyvfqANZSUq4+D3D8RzDJ2M+HDTIkF60ibS1vHaK55vzgiZw1bEPFG9yH7l33wA==" - }, - "supports-color": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", - "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==" - } - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -7528,25 +7418,6 @@ "global": "~4.3.0" } }, - "terminal-link": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-5.0.0.tgz", - "integrity": "sha512-qFAy10MTMwjzjU8U16YS4YoZD+NQLHzLssFMNqgravjbvIPNiqkGFR4yjhJfmY9R5OFU7+yHxc6y+uGHkKwLRA==", - "requires": { - "ansi-escapes": "^7.0.0", - "supports-hyperlinks": "^4.1.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.1.tgz", - "integrity": "sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==", - "requires": { - "environment": "^1.0.0" - } - } - } - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", diff --git a/package.json b/package.json index cd9c0d2..c599bf3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "@inquirer/select": "^4.3.2", "eslint-filtered-fix": "^0.3.0", "optionator": "^0.9.1", - "terminal-link": "^5.0.0", "text-table": "^0.2.0", "yoctocolors": "^2.1.2" }, diff --git a/src/detailed.js b/src/detailed.js index 21167dd..122fd55 100644 --- a/src/detailed.js +++ b/src/detailed.js @@ -1,7 +1,6 @@ 'use strict'; const { codeFrameColumns } = require('@babel/code-frame'); -const link = require('terminal-link').default; const colors = require('yoctocolors'); const table = require('text-table'); const fs = require('node:fs'); @@ -144,7 +143,7 @@ function formatMessage(message) { const { filePath, severity, ruleId, ruleUrl } = message; let output = ` -${colors.cyanBright(filePath)}:${colors.yellowBright(message.line)}:${colors.yellowBright(message.column)} - ${colors[severityColors[severities[severity]]](severities[severity])} ${colors.dim(`${link(ruleId, ruleUrl)}`)} +${colors.cyanBright(filePath)}:${colors.yellowBright(message.line)}:${colors.yellowBright(message.column)} - ${colors[severityColors[severities[severity]]](severities[severity])} ${colors.dim(`${ruleId} ${ruleUrl}`)} ${message.message} `;