Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error MD009/no-trailing-spaces #1554

dakshdeepHERE started this conversation in Show and tell
Discussion options

So I was getting this error when I was running the command yarn lint and as my code was very big so finding the white space was very tough then I found a amazing feature build in the IDE that I was using which was VScode in my case but don't worry I will mention other IDEs too where you can run commands to solve this issue.

Visual Studio Code

  • Open the file in Visual Studio Code.
  • Press Ctrl+Shift+P to open the Command Palette.
  • Type "Trim Trailing White Space" and press Enter.
  • Save the file (Ctrl+S)

Sublime Tex

  • Open the file in Sublime Text.
  • Press Ctrl+A to select all the text in the file.
  • Press Ctrl+K+Delete to remove the trailing spaces.
  • Save the file (Ctrl+S)

Command line

  • Open a terminal/command prompt window.
  • Navigate to the directory containing the Markdown file.
  • Run the following command sed -i 's/[ \t]*$//' filename.md
  • This command will remove all trailing spaces in the file named "filename.md"

Once you have removed the trailing spaces, you should be able to run your linter tool again without encountering the "MD009/no-trailing-spaces" error.

Hope this will help someone who's facing this issue in future. ☺️

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /