You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
; EditorConfig to support per-solution formatting.; Use the EditorConfig VS add-in to make this work.; http://editorconfig.org/; This is the default for the codeline.root = true
[*]indent_style = space
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.sln]indent_style = tab
charset = utf-8-bom
[*.*proj]charset = utf-8-bom
[*.cs]indent_size = 4
dotnet_sort_system_directives_first = true:warning
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]indent_size = 2
[*.json]indent_size = 2
[*.{ps1,psm1}]indent_size = 4
[*.sh]indent_size = 4
end_of_line = lf
The text was updated successfully, but these errors were encountered:
.pipe(through.obj((file: VinylFile,_enc: string,done: Done)=>{fs.readFile(file.path,(err,data)=>{try{if(err==null){varmodifiedBuffer=<Buffer>file.contents;// This is workaround for bug https://github.com/jedmao/eclint/issues/154// ------------------------------------------------------------------------// if modified buffer ends with 'lf'if((modifiedBuffer.length>1&&modifiedBuffer[modifiedBuffer.length-2]!=0x0D&&modifiedBuffer[modifiedBuffer.length-1]==0x0A)||(modifiedBuffer.length==1&&modifiedBuffer[modifiedBuffer.length-1]==0x0A)){// Checking that modified buffer contains 'crlf'varcontains_crlf=false;varcontains_lf=false;for(vari=0;i<modifiedBuffer.length-1;i++){if(modifiedBuffer[i+1]==0x0A){if(modifiedBuffer[i]==0x0D){contains_crlf=true;}else{contains_lf=true;}}}if(contains_crlf||!contains_lf){// Fixing last lf to crlf//modifiedBuffer[modifiedBuffer.length - 1] = 0x0D;modifiedBuffer[modifiedBuffer.length-1]=0x0D;modifiedBuffer=Buffer.concat([modifiedBuffer,Buffer.from([0x0A])])}}if(modifiedBuffer.compare(data)==0){done(null,file);}else{// Overwriting file only if it has been fixed.fs.writeFile(file.path,modifiedBuffer,(err)=>{if(err==null){console.log(`File updated: ${file.path}`);}done(null,file)});}}else{done(null,file);}}catch{done(null,file);return;}})}));
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
OS: Windows
Problem: Last CRLF replaced by LF
File that is processed by "fix" method (contains only CRLF):
Name = package.json
Command that executes "fix"
Content of .editorconfig:
The text was updated successfully, but these errors were encountered: