nippur72 / ifdef-loader

Webpack loader for JavaScript/TypeScript conditional compilation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESLint bad indentation

kekkokk opened this issue · comments

The idea to use // #code as a "placeholder" to make eslint works is very appreciated but substituting // #code with spaces lead eslint to complain about the fact that expected indentation was 0 but found 9.

I think we just should replace with "" to maintain the real intended indentation

lines[t] = " ".repeat(r.groups.before.length) + r.groups.line;

unfortunately spaces are needed to make source source maps work (input and output file have a 1:1 correspondence on a character basis).

any ideas on how to resolve? maybe adding some eslint spicific comment at the end of the line to skip the indentation check?