Right now this plugin works with files only and it always parses the file, then analyze and then provide feedback.
I suggest to split this plugin into two options: a) linter; b) parser; c) cli. We might think about more options, but it will be a good start to make it extendable.
a) linter — will get AST and provide feedback
b) parser — will parse string into AST (mostly nested from pug-parser but it should be different than that to allow plugins)
c) cli — it will works with files, get their source code and execute a) and b) phases
The main advantage is that we will allow integrations with plugins like eslint when we use pug in js way more efficiently.
The disadvantage it will require a lot of work and a lot of decisions among community.
Right now this plugin works with files only and it always parses the file, then analyze and then provide feedback.
I suggest to split this plugin into two options: a) linter; b) parser; c) cli. We might think about more options, but it will be a good start to make it extendable.
a) linter — will get AST and provide feedback b) parser — will parse string into AST (mostly nested from pug-parser but it should be different than that to allow plugins) c) cli — it will works with files, get their source code and execute a) and b) phases
The main advantage is that we will allow integrations with plugins like eslint when we use pug in js way more efficiently.
The disadvantage it will require a lot of work and a lot of decisions among community.