From 6f50688c1c16871a7055f5da0730bd43f9306b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20Mari=C8=99?= Date: Wed, 15 Oct 2014 15:50:01 +0300 Subject: [PATCH] Enforce `LF` newlines This change is done in order to ensure that Windows users don't encounter any newline related issues. e.g.: Prior to this change, after the build script was run, files from `node_modules` (having `LF` newlines, and which wouldn't have be normalized by `git`) would be copied to the `dist/` directory and would appear to Windows users as if they where changed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thanks to @XhmikosR for pointing this out! Ref http://git-scm.com/docs/gitattributes#_effects http://en.wikipedia.org/wiki/Newline Close h5bp/html5-boilerplate#1618 --- .editorconfig | 5 ++++- .gitattributes | 15 +++++++++++++++ .jscsrc | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index e7a5fdf3..1b96f95e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,12 @@ -# http://editorconfig.org +# For more information about the properties used in +# this file, please see the EditorConfig documentation: +# http://editorconfig.org/ root = true [*] charset = utf-8 +end_of_line = lf indent_size = 4 indent_style = space insert_final_newline = true diff --git a/.gitattributes b/.gitattributes index 176a458f..7b1038c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,16 @@ +# Automatically normalize line endings for all text-based files +# http://git-scm.com/docs/gitattributes#_effects * text=auto + +# For the following file types, normalize line endings to LF on +# checkin and prevent conversion to CRLF when they are checked out +# (this is required in order to prevent newline related issues like, +# for example, after the build script is run) +*.css text eol=lf +*.html text eol=lf +*.js text eol=lf +*.json text eol=lf +*.md text eol=lf +*.sh text eol=lf +*.txt text eol=lf +*.xml text eol=lf diff --git a/.jscsrc b/.jscsrc index 46b46934..a83f173d 100644 --- a/.jscsrc +++ b/.jscsrc @@ -62,6 +62,7 @@ }, "requireSpacesInsideObjectBrackets": "allButNested", "validateIndentation": 4, + "validateLineBreaks": "LF", "validateParameterSeparator": ", ", "validateQuoteMarks": "'" }