We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The final-newline rule is always reporting a warning for me and I believe it's because of the way Windows reports newlines.
final-newline
Because they are actually \r\n, this line (last.content !== '\n') is always true.
\r\n
last.content !== '\n'
If I test for \r\nas well the rule behaves as expected on Windows (although I don't have a mac handy to test it on).
if (last.content !== '\n' && last.content !== '\r\n' && parser.options.include) {
Or a shorter version...
if (!last.content.match(/\r?\n/) && parser.options.include) {
The text was updated successfully, but these errors were encountered:
It looks like the issue for empty-line-between-blocks. This line might need to be this to play well with Windows:
empty-line-between-blocks
space = (previous.content.indexOf('\n\n') >= 0 || previous.content.indexOf('\r\n\r\n') >= 0);
Sorry, something went wrong.
Or... having just learnt that os.EOL is a thing
os.EOL
var os = require('os'); if (last.content !== os.EOL && parser.options.include) { // etc. }
Nice and descriptive...
Snugug
No branches or pull requests
The
final-newline
rule is always reporting a warning for me and I believe it's because of the way Windows reports newlines.Because they are actually
\r\n
, this line (last.content !== '\n'
) is always true.If I test for
\r\n
as well the rule behaves as expected on Windows (although I don't have a mac handy to test it on).Or a shorter version...
The text was updated successfully, but these errors were encountered: