Open brianhelba opened 6 years ago
I've looked into submitting a PR for this myself, but I'm stuck on the fact that all lines are split and re-formed by the parser before being passed to any rules. Furthermore, the origLine
that's passed to each rule is lacking a trailing newline.
This probably isn't that bad, since a normal rule which is run on every single line is probably inefficient (since we only need to run it on the last line of the file). It would be simpler to have a rule which gets run on the entire file, but I'm not sure where that should be called from. Perhaps we could add another special case call (like the one for commentSpace
)? Could we add this to parse.js
?
Feedback would be appreciated before I start coding this.
Ping @SimenB .
Text files on Unix-like systems should generally end with a newline. It would be helpful to have a rule,
trailingNewline
(or some similar name), which required that all files had aLF
(or perhaps the platform-specific equivalent) as their final character.ESLint has this rule as
eol-last
.