I would like to get an idea of how we might get whitespace (and other formatting characters) detection into ESLint. I see two approaches: 1. We do something like we did for tokens and ancestors. Create a function in the core object that can run a regular expression on the whole file (and cache it) and find all of the characters that esprima ignores (whitespaces, commas, brackets, etc.) 2. We might want to consider something crazy, like forking Esprima and adding thing like comments, whitespaces, etc. into the AST, that way we can write separate rules for those node types. It might sound like an overkill, but we are already traversing AST multiple times in order to wire in comments, tokens and ancestors. Performance might start to degrade out of control if we start re-parsing file as a whole multiple times...
Thanks, Ilya Volodin -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
