Skip to content

Commit 57efccb

Browse files
authored
feat: ensure consistent line endings across files (#1372)
* feat: ensure consistent line endings across files adapted from https://github.com/h5bp/html5-boilerplate/blob/main/.gitattributes and https://github.com/h5bp/html5-boilerplate/blob/main/dist/.gitattributes * refactor: configuration for markdown trailing whitespaces
1 parent d7b428c commit 57efccb

File tree

2 files changed

+211
-0
lines changed

2 files changed

+211
-0
lines changed

Diff for: .editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

Diff for: .gitattributes

+208
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# Automatically normalize line endings for all text-based files
2+
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion
3+
#
4+
## GITATTRIBUTES FOR WEB PROJECTS
5+
#
6+
# These settings are for any web project.
7+
#
8+
# Details per file setting:
9+
# text These files should be normalized (i.e. convert CRLF to LF).
10+
# binary These files are binary and should be left untouched.
11+
#
12+
# Note that binary is a macro for -text -diff.
13+
######################################################################
14+
15+
## AUTO-DETECT
16+
## Handle line endings automatically for files detected as
17+
## text and leave all files detected as binary untouched.
18+
## This will handle all files NOT defined below.
19+
* text=auto
20+
21+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22+
23+
# For the following file types, normalize line endings to LF on
24+
# checkin and prevent conversion to CRLF when they are checked out
25+
# (this is required in order to prevent newline related issues like,
26+
# for example, after the build script is run)
27+
28+
.* text eol=lf
29+
*.css text eol=lf
30+
*.html text eol=lf
31+
*.js text eol=lf
32+
*.json text eol=lf
33+
*.md text eol=lf
34+
*.sh text eol=lf
35+
*.txt text eol=lf
36+
*.xml text eol=lf
37+
38+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
39+
40+
## SOURCE CODE
41+
*.bat text eol=crlf
42+
*.coffee text
43+
*.htm text
44+
*.inc text
45+
*.ini text
46+
*.jsx text
47+
*.less text
48+
*.od text
49+
*.onlydata text
50+
*.php text
51+
*.pl text
52+
*.py text
53+
*.rb text
54+
*.sass text
55+
*.scm text
56+
*.scss text
57+
*.sql text
58+
*.styl text
59+
*.tag text
60+
*.ts text
61+
*.tsx text
62+
*.xhtml text
63+
64+
## DOCKER
65+
*.dockerignore text
66+
Dockerfile text
67+
68+
## DOCUMENTATION
69+
*.markdown text
70+
*.mdwn text
71+
*.mdown text
72+
*.mkd text
73+
*.mkdn text
74+
*.mdtxt text
75+
*.mdtext text
76+
AUTHORS text
77+
CHANGELOG text
78+
CHANGES text
79+
CONTRIBUTING text
80+
COPYING text
81+
copyright text
82+
*COPYRIGHT* text
83+
INSTALL text
84+
license text
85+
LICENSE text
86+
NEWS text
87+
readme text
88+
*README* text
89+
TODO text
90+
91+
## TEMPLATES
92+
*.dot text
93+
*.ejs text
94+
*.haml text
95+
*.handlebars text
96+
*.hbs text
97+
*.hbt text
98+
*.jade text
99+
*.latte text
100+
*.mustache text
101+
*.njk text
102+
*.phtml text
103+
*.tmpl text
104+
*.tpl text
105+
*.twig text
106+
107+
## LINTERS
108+
.babelrc text
109+
.csslintrc text
110+
.eslintrc text
111+
.htmlhintrc text
112+
.jscsrc text
113+
.jshintrc text
114+
.jshintignore text
115+
.prettierrc text
116+
.stylelintrc text
117+
118+
## CONFIGS
119+
*.bowerrc text
120+
*.cnf text
121+
*.conf text
122+
*.config text
123+
.browserslistrc text
124+
.editorconfig text
125+
.gitattributes text
126+
.gitconfig text
127+
.gitignore text
128+
.htaccess text
129+
*.npmignore text
130+
*.yaml text
131+
*.yml text
132+
browserslist text
133+
Makefile text
134+
makefile text
135+
136+
## HEROKU
137+
Procfile text
138+
.slugignore text
139+
140+
## GRAPHICS
141+
*.ai binary
142+
*.bmp binary
143+
*.eps binary
144+
*.gif binary
145+
*.ico binary
146+
*.jng binary
147+
*.jp2 binary
148+
*.jpg binary
149+
*.jpeg binary
150+
*.jpx binary
151+
*.jxr binary
152+
*.pdf binary
153+
*.png binary
154+
*.psb binary
155+
*.psd binary
156+
*.svg text
157+
*.svgz binary
158+
*.tif binary
159+
*.tiff binary
160+
*.wbmp binary
161+
*.webp binary
162+
163+
## AUDIO
164+
*.kar binary
165+
*.m4a binary
166+
*.mid binary
167+
*.midi binary
168+
*.mp3 binary
169+
*.ogg binary
170+
*.ra binary
171+
172+
## VIDEO
173+
*.3gpp binary
174+
*.3gp binary
175+
*.as binary
176+
*.asf binary
177+
*.asx binary
178+
*.fla binary
179+
*.flv binary
180+
*.m4v binary
181+
*.mng binary
182+
*.mov binary
183+
*.mp4 binary
184+
*.mpeg binary
185+
*.mpg binary
186+
*.ogv binary
187+
*.swc binary
188+
*.swf binary
189+
*.webm binary
190+
191+
## ARCHIVES
192+
*.7z binary
193+
*.gz binary
194+
*.jar binary
195+
*.rar binary
196+
*.tar binary
197+
*.zip binary
198+
199+
## FONTS
200+
*.ttf binary
201+
*.eot binary
202+
*.otf binary
203+
*.woff binary
204+
*.woff2 binary
205+
206+
## EXECUTABLES
207+
*.exe binary
208+
*.pyc binary

0 commit comments

Comments
 (0)