How to set line length limit when using grep (Filter result by line length)?

First approach, try to exclude the one-liner JS files from being grepped in the first place. Often these will have a name like some-library.min.js, so you could do something like:

$ grep --exclude '*.min.js' ...

Another approach is that if you know that it's going to be in a CSS file, you can use ack to restrict your search to CSS files (and ignore various VCS cruft):

$ ack --type=css ...

However, to answer your question, you can write a regular expression to match on line length. The following will match any line with 100 or fewer characters.

$ grep -E '^.{,100}$'