Skip to content

Commit

Permalink
Fix eslint trying to look at node_modules/ (#275)
Browse files Browse the repository at this point in the history
I'm not sure what exactly is causing the behavior change now besides that I am running on Linux.

The quote fix around the path is from https://stackoverflow.com/questions/51021751/express-js-lint-gives-mistake

`node_modules/` is already part of our `.eslintignore`.

Previously:

```sh
$ npm run lint

> [email protected] lint
> eslint **/*.js

Oops! Something went wrong! :(

ESLint: 8.37.0

You are linting "node_modules/ipaddr.js", but all of the files matching the glob pattern "node_modules/ipaddr.js" are ignored.

If you don't want to lint these files, remove the pattern "node_modules/ipaddr.js" from the list of arguments passed to ESLint.

If you do want to lint these files, try the following solutions:

* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.
```
  • Loading branch information
MadLittleMods committed Jun 27, 2023
1 parent 1d3e930 commit 2243db5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/matrix-org/matrix-public-archive"
},
"scripts": {
"lint": "eslint **/*.js",
"lint": "eslint \"**/*.js\"",
"build": "node ./build-scripts/do-client-build.js",
"start": "node server/server.js",
"start-dev": "node server/start-dev.js",
Expand Down

0 comments on commit 2243db5

Please sign in to comment.