Skip to content

Silent success when languageOptions.sourceType is incorrectly defined #483

Closed
@DamienCassou

Description

@DamienCassou

I'm migrating my eslint plugin to v9 and forgot to set languageOptions.sourceType to "commonjs" so the default value was "module". Running eslint on my rules would produce 0 warnings or errors because getRuleExportsESM() (from util.js) returns an empty object so getRuleInfo() returns null and no-missing-message-ids.js (for example) has this code:

const ruleInfo = utils.getRuleInfo(sourceCode);
if (!ruleInfo) {
  return {};
}

Would it be possible to get warnings/errors in such cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions