Skip to content

Lint all JavaScript in markdown files by default #1355

@feross

Description

@feross

ESLint supports the notion of "processors" which allows us to extract JS from markdown files and lint it to ensure it is in standard style. https://eslint.org/docs/user-guide/configuring#specifying-processor

That would let us eliminate this whole section of the readme which describes how to install eslint-plugin-markdown, run standard with the --plugin flag. In the end you need to actually run standard twice if you do this: standard && standard --plugin markdown '**/*.md'

I think we can do better. Let's just do the right thing out of the box.

We should probably do the same for <script> tags in HTML files too, while we're at it.

We can provide a --no-md or --no-html escape hatch for those who need it. But ideally, this just does the right thing 99.9% of the time.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions