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

False positives when meta contains spread with prefer-message-ids, require-meta-type, require-meta-fixable, require-meta-schema #274

Open
bmish opened this issue Aug 1, 2022 · 0 comments
Labels

Comments

@bmish
Copy link
Member

bmish commented Aug 1, 2022

When there's a spread inside the meta object that we can't evaluate, we might want to stop flagging these violations since likely the spread fills these properties in already:

  23:9  error  `meta.messages` must contain at least one violation message                    eslint-plugin/prefer-message-ids
  23:9  error  `meta.type` is required (must be either `problem`, `suggestion`, or `layout`)  eslint-plugin/require-meta-type
  23:9  error  `meta.fixable` must be either `code` or `whitespace` for fixable rules         eslint-plugin/require-meta-fixable
  23:9  error  `meta.schema` has no schema defined but rule has options                       eslint-plugin/require-meta-schema
export default createRule<Options, MessageIds>({
  name: 'object-curly-spacing',
  meta: {
    ...baseRule.meta,
    docs: { /* ... * / }
  }
});

Example: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/object-curly-spacing.ts

This issue is not specific to TypeScript.

@bmish bmish added the bug label Aug 1, 2022
@bmish bmish changed the title False positives when meta contains spread with prefer-message-ids, require-meta-type, require-meta-fixable False positives when meta contains spread with prefer-message-ids, require-meta-type, require-meta-fixable, require-meta-schema 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

No branches or pull requests

1 participant