Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint.probe does not appear to honor "pug" #1234

Closed
initplatform opened this issue Apr 7, 2021 · 8 comments
Closed

eslint.probe does not appear to honor "pug" #1234

initplatform opened this issue Apr 7, 2021 · 8 comments
Labels
info-needed Issue requires more information from poster

Comments

@initplatform
Copy link

I am trying to incorporate https://github.com/unrelentingtech/eslint-plugin-pug with eslint in vscode and I keep getting:

ESLint is not running. By default only TypeScript and JavaScript files are validated. 
If you want to validate other file types please specify them in the 'eslint.probe' setting.

I add "pug" to eslint.probe and it doesn't seem to make a difference.

    "eslint.probe": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "html",
        "vue",
        "markdown",
        "pug"
    ]
@dbaeumer
Copy link
Member

dbaeumer commented Apr 8, 2021

Do you have an extension installed that adds the pug language id. Otherwise the ESLint extension doesn't know about pug files.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Apr 8, 2021
@initplatform
Copy link
Author

I have ditto.convert-html-to-pug, mrmlnc.vscode-pugbeautify and mrmlnc.vscode-puglint installed.

Not sure if they add a language id. How can I tell?

@dbaeumer
Copy link
Member

dbaeumer commented Apr 9, 2021

When you open the Language Mode picker does pug show up in it?

@initplatform
Copy link
Author

Looks like it

Screen Shot 2021-04-26 at 4 28 16 PM

@dbaeumer
Copy link
Member

@initplatform interesting. Can you provide me with a typical pug setup that should work best as a GitHub repository I can clone.

@initplatform
Copy link
Author

Hi @dbaeumer,

I started the process of making a sample repository, but then I noticed I was no longer receiving the error.

I did update VSCode a couple of times since I first posted this, so that may be it. 🤷

However, I am also still not seeing any linting on my pug files. Upon further inspection, it looks like eslint-plugin-pug doesn't actually lint pug files, it lints javascript in the script tags of pug files :/

So, looks like I will revert back to using pug-lint

Thanks for helping out!

@jooohny
Copy link

jooohny commented Jun 28, 2021

Hello! Can you please help me with eslint-plugin-pug? It only highlights problems when eslint is run via CI, like: ./node_modules/.bin/eslint --ext .js,.pug . But when I simply open .pug files, is doesn't highlight anything and problems don't appear in PROBLEMS tab of terminal.

@boompikachu
Copy link

Since TSX is typescriptreact:
image

Maybe try adding it as jade?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants