CLI for ensuring all given files match the desired newline pattern (LF or CRLF)
npm install check-eol


bash
npm install check-eol -g
`Usage
check-eol inspects the line endings of every matching file and return a nonzero error code if any file has incorrect line endings, as well as printing out the paths of the non-compliant files.You can specify as many file paths or globs as you wish. They will all be merged into a single unified file list before processing.
Examples
$3
`bash
npx check-eol --eol lf "*/"
`$3
`bash
npx check-eol --eol crlf "*/.txt"
`$3
`bash
npx check-eol --eol platform "/.html" "/.css"
`CLI options
$3
The type of line ending to enforce. If "platform" is selected, then "crlf" will be enforced on Windows, and "lf" everywhere else.Optional: yes
Default:
"lf"
Options: "lf", "crlf", "platform"example:
`bash
#enforce lf line endings
npx check-eol --eol lf
`$3
The current working directory where relative paths are relative toOptional: yes
Default:
process.cwd()example:
`bash
npx check-eol --cwd "/usr/JohnSmith/projects/project1"
``