From 2b7cd59b85d86877a4859a06b900f49c15854738 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Thu, 17 Jan 2019 10:04:19 +1100 Subject: [PATCH] Line break rule fix for windows. --- .eslintrc.js | 3 +++ .gitattributes | 11 ++++++++++- .travis.yml | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9bc431d91..34ab52aaa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -39,6 +39,9 @@ module.exports = { // consistently place operators at end of line except ternaries 'operator-linebreak': 'error', + // Use LF to stay consistent + 'linebreak-style': ['error', 'unix'], + quotes: [ 'error', 'single', diff --git a/.gitattributes b/.gitattributes index 94f480de9..b83a209d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,10 @@ -* text=auto eol=lf \ No newline at end of file +* text=auto +*.js text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.scss text eol=lf +*.json text eol=lf +*.css text eol=lf +*.html text eol=lf +*.yaml text eol=lf +*.yml text eol=lf diff --git a/.travis.yml b/.travis.yml index 10190110f..9de89d951 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,3 +36,9 @@ matrix: cache: false env: - YARN_GPG=no + before_install: + - cd ../.. + - mv $TRAVIS_REPO_SLUG _old + - git config --global core.autocrlf false + - git clone --depth=50 _old $TRAVIS_REPO_SLUG + - cd $TRAVIS_REPO_SLUG