trekhleb / javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
MIT License
188.46k stars 30.27k forks source link

Eslint parsing error #955

Open alifhs opened 2 years ago

alifhs commented 2 years ago

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?

Skilly55 commented 1 year ago

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.

Pavan-Rajesh commented 1 year ago

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