Skip to content

Instantly share code, notes, and snippets.

@40thieves
Created April 19, 2021 09:27
Show Gist options
  • Save 40thieves/3acd42f6bdf744f8655ebebd350d3838 to your computer and use it in GitHub Desktop.
Save 40thieves/3acd42f6bdf744f8655ebebd350d3838 to your computer and use it in GitHub Desktop.

Fixing ESLint problems with the pokedex app on a Windows computer

Step 1: Remove the eslint disable comments

  1. In your pokedex project, find all the files with a comment like: /* eslint-disable indent, linebreak-style */
  2. Edit the comment to remove the linebreak-style bit, so that it just becomes /* eslint-disable indent */

This will cause ESLint to fail, but don't worry we'll fix it in the next step :)

Step 2: Change the End of Line Sequence in your files

  1. Open a file where ESLint is failing - you can tell by looking for the filename in your browser (if npm start is running), or by looking for red squiggly lines in VSCode
  2. Press Ctrl-Shift-P to open the Command Palette
  3. Type "eol"
  4. Select the "Change End of Line Sequence" option
  5. Select the "LF" option
  6. Repeat these steps for each file where ESLint is failing

This should fix the problem in the files you created in the lesson. But if you create a new file, so you also need to change the "global" setting.

Step 3: Change End of Line Sequence setting globally

  1. In VSCode open the settings file (see here
  2. Search for "end of line"
  3. Seting Eol to \n (shows "LF" at the bottom)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment