From 02e94797beb77fa5d230fac39c337de8f7b00426 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 13 Apr 2022 08:01:43 +0300 Subject: [PATCH 1/2] build: enforce LF and update .editorconfig --- .editorconfig | 13 +++++++++++-- .gitattributes | 2 ++ gruntfile.js | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig index 363db03c..9d5248e8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,14 @@ +# editorconfig.org + root = true -[**.js] -indent_style = space +[*] +charset = utf-8 +end_of_line = lf indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..205021e4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Enforce Unix newlines +* text=auto eol=lf diff --git a/gruntfile.js b/gruntfile.js index b90b602a..efd5e325 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,6 +1,7 @@ // Do not add new tasks. Grunt is used only for building and will be replaced. module.exports = function (grunt) { grunt.loadTasks('tasks') + grunt.util.linefeed = '\n' grunt.initConfig({ pkgFile: 'package.json', build: { From 1dc85aa3e9d06f982e8df6c7805e5294802cfb1f Mon Sep 17 00:00:00 2001 From: Jonathan Ginsburg Date: Mon, 25 Apr 2022 13:28:25 -0500 Subject: [PATCH 2/2] build(eslint): set CRLF to error out --- .eslintrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 740b7321..fe9bae60 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,6 +2,10 @@ "root": true, "extends": "standard", "rules": { - "no-var": "off" + "no-var": "off", + "linebreak-style": [ + "error", + "unix" + ] } }