Explore ESLint failures with a very basic GUI.
- Node and yarn are installed
- ESLint is installed and configured in your JavaScript or TypeScript project.
-
Clone this repo:
git clone git@github.com:jakierice/eslint-output-explorer.git
-
Install dependencies for ESLint Output Explorer:
cd eslint-output-explorer yarn
-
Add the following command to your project's
scripts
in thepackage.json
file. This will be used to generate a JSON formatted ESLint output file in to the proper file path ofeslint-output-explorer/src/data/eslint-output.json
:NOTE: Replace
{path/to/eslint-output-explorer/src/data/eslint-output.json}
with the appropriate path where you cloned theeslint-output-explorer
directory on your local machine."scripts": { "eslint-output": "eslint --format json --output-file {path/to/eslint-output-explorer/src/data/eslint-output.json}", },
-
Run the new
eslint-output
script from your JavaScript or TypeScript project:yarn run eslint-output
OR if your project is using NPM, run this command:
npm run eslint-output
-
Run the ESLint Output Explorer app locally to explore the ESLint output grouped by failed rule:
# Run this command from the eslint-output-explorer project you cloned to your machine. yarn start
-
View all files that have failed a specific rule by clicking on the rule name and expanding the list of files. Clicking on a file name will open the file in VS Code if you have it installed.
-
Fix some errors, run the
eslint-ouput
command from your project again, and then refresh your locally running ESLint Output Explorer app to see the new results.