Skip to content

Conversation

@isaac-j-miller
Copy link

This adds a --ignore option, as well as an --ignore-file option. The patterns from the CLI input and loaded from the --ignore-file files passed from the CLI are merged and passed to globbySync's ignore option. If it exists, .ejslintignore is loaded automatically.

@RyanZim
Copy link
Owner

RyanZim commented Jan 13, 2024

Sorry, somehow this slipped through the cracks and I didn't get to reviewing until now. This PR adds 3 ways to ignore:

  • The --ignore option, which allows multiple patterns
  • The --ignore-file option, which accepts a file path
  • The .ejslintignore file

I'm not sure if I want all the added complexity of these 3 options. Additionally, I can see a few problems with the current implementations:

  • --ignore is implemented as an array; though your help message is useful, I can already imagine all the spurious bug reports this will generate when people try to do ejslint --ignore ignore.ejs *.ejs
  • Adding support for .ejslintignore is technically a breaking change. Additionally, as currently implemented, it only looks for it in the cwd; one would expect a full recursive filesystem search. However, that's complex to implement.

Accordingly, I'd suggest the following changes:

  • Make --ignore a string. If you have multiple ignore patterns, you can use --ignore-file.
  • Remove .eslintignore support; anyone who wants it can simply run --ignore-file .eslintignore.

That said, I'm open to feedback if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants