Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

check-eol

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-eol

CLI for ensuring all given files match the desired newline pattern (LF or CRLF)

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

check-eol

A command line utility to check what line endings are being used in files. Useful for enforcing consisten line endings across an entire project (such as an open source project with both windows and non-windows contributors).

build Coverage Status NPM Version

Installation

npm

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

verify all files have LF endings

npx check-eol --eol lf "**/*"

verify all .txt files have CRLF endings

npx check-eol --eol crlf "**/*.txt"

verify all html and css files have the platform-specific line endings

npx check-eol --eol platform "**/*.html" "**/*.css"

CLI options

eol

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:

#enforce lf line endings
npx check-eol --eol lf

cwd

The current working directory where relative paths are relative to

Optional: yes Default: process.cwd()

example:

npx check-eol --cwd "/usr/JohnSmith/projects/project1"

Changelog

Click here to view the changelog.

FAQs

Package last updated on 17 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc