pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

Support pug templates in TemplateLiterals #151

Open ezhlobo opened 6 years ago

ezhlobo commented 6 years ago

Babel plugin babel-plugin-transform-react-pug becomes more popular and I want to set up linting of its templates as well.

We need to allow custom parsers for this linter or something else. So we can parse .js files, extract pug templates from there and lint only pug.

Example of javascript file:

import React from 'react'

const MyComponent = props => pug`
  div
    p= props.text
`

export default MyComponent

What should be linted in that file:

  div
    p= props.text