javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Eslint parsing error

Open alifhs opened this issue 2 years ago • 2 comments

I'm facing "src\data-structures\queue\README.md 1:1 error Parsing error: Unexpected character '#' " error. I'm on the windows platform and tried to ignore .md files adding { "eslintIgnore" : ["**/*.md"], } propety to eslintIgnore file. am still facing the same issue. How to resolve this?

alifhs avatar Oct 30 '22 14:10 alifhs

This error is indicating that the # symbol in your README.md file is causing a parsing error in your linter. To resolve this issue, you can try the following steps:

Check if you have the correct syntax in your .eslintrc.json file: Ensure that the property name is "eslintIgnore" and that the value is an array of file paths or glob patterns to ignore.

Try using a different glob pattern: Instead of using "**/.md", try using ".md" or a more specific pattern that matches your README.md file.

Check if the .eslintrc.json file is located in the correct directory: It should be located in the root directory of your project or in a parent directory.

Make sure that you have the latest version of ESLint installed: You can run the command npm install -g eslint to install or update ESLint.

If none of the above steps work, you can also try disabling the linter for the specific line that is causing the error or temporarily removing the line until you can resolve the issue.

Skilly55 avatar Feb 13 '23 06:02 Skilly55

add this line in your .eslintrc
"ignorePatterns": [".md", ".png", ".jpeg", ".jpg"],

Pavan-Rajesh avatar Jul 21 '23 15:07 Pavan-Rajesh