Skip to content

Conversation

@bmish
Copy link
Member

@bmish bmish commented Aug 4, 2022

Fixes #276 (half of it).

Situation 1:

module.exports = {
  create(context) {
    context.report({
      node,
      message: 'hello world', // violation should not be reported here
      data: {
        bar: 'abc' // violation should be reported here on the unused placeholder property
      }
    });
  },
};

Situation 2 (even worse because the violation is not even reported inside the specific context.report() call):

module.exports = {
  meta: {
    messages: {
      foo: 'hello world', // violation should not be reported here
    }
  },
  create(context) {
    context.report({
      node,
      messageId: 'foo',
      data: {
        bar: 'abc' // violation should be reported here on the unused placeholder property
      }
    });
  },
};

@bmish bmish added the bug label Aug 4, 2022
@bmish bmish force-pushed the no-unused-placeholders-report-loc branch from 909186e to 03c53c6 Compare August 4, 2022 03:22
bmish added 2 commits August 3, 2022 23:47
* main:
  fix: reporting location in no-missing-placeholders (eslint-community#280)
  fix: clarify report messages for no-missing-placeholders and no-unused-placeholders (eslint-community#278)
  fix: allow additional schema types in require-meta-schema (eslint-community#277)
@aladdin-add aladdin-add merged commit 27c0b65 into eslint-community:main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect reporting location for no-missing-placeholders, no-unused-placeholders

2 participants