Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable line ending normalization in git, not in the linter #7019

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rules:
indent: [2, 2, {SwitchCase: 1}]
key-spacing: [2, {mode: "minimum"}]
keyword-spacing: 2
linebreak-style: [2, "unix"]
linebreak-style: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than removing this rule, can you change its value to the default value? The net result would be the same as removing it, but having the explicit value might prevent people in the future from readding the "wrong" rule (at least they might be prompted to look at the commit history for that line).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unix is the default value.

Copy link
Member

@Trott Trott Jun 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options with this rule are unix, windows, or disabling/removing the rule. If we want to leave the line there and have the rule explicitly disabled, change 2 to 0. We don't do that for any other rules, though, if that matters.

max-len: [2, 80, 2]
new-parens: 2
no-mixed-spaces-and-tabs: 2
Expand Down
45 changes: 44 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
* -text
./* text=auto
*.bat text
*.c text
*.cc text
*.css text
*.d text
*.def text
*.gyp text
*.gypi text
*.h text
*.html text
*.inc text
*.js text
*.json text
*.man text
*.manifest text
*.md text
*.out text
*.pl text
*.py text
*.rb text
*.rc text
*.sln text
*.status text
*.txt text
*.vcxproj text
*.wixproj text
*.wxl text
*.wxs text
*.yml text
tools/msvs/npm/npmrc text
deps/v8/test/mjsunit/regress/regress-2825.js -text

test/fixtures/* -text
vcbuild.bat text eol=crlf

# Exceptions for dependencies committed with CRLF line endings
# Should be removed when the files are updated
deps/npm/node_modules/node-gyp/gyp/gyp.bat -text
deps/npm/node_modules/node-gyp/gyp/samples/samples.bat -text
deps/uv/docs/make.bat -text
deps/v8/test/message/regress/regress-73.js -text
deps/zlib/contrib/minizip/ChangeLogUnzip -text
tools/gyp/gyp.bat -text
tools/gyp/samples/samples.bat -text