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 positive detection on function that is not a rule function #455

Closed
bradzacher opened this issue Apr 6, 2024 · 1 comment · Fixed by #457
Closed

False positive detection on function that is not a rule function #455

bradzacher opened this issue Apr 6, 2024 · 1 comment · Fixed by #457

Comments

@bradzacher
Copy link
Member

Version: 5.5.0

Relevant Code: https://github.com/typescript-eslint/typescript-eslint/blob/fde44275117b3a7bbdcaaf267c73986b6637c5f9/packages/eslint-plugin/tests/rules/prefer-optional-chain/base-cases.ts#L232-L283

Output:

/Users/bjz/git/typescript-eslint/packages/eslint-plugin/tests/rules/prefer-optional-chain/base-cases.ts
  232:43  error  `meta.messages` must contain at least one violation message                    eslint-plugin/prefer-message-ids
  232:43  error  Rules should be declared using the object style                                eslint-plugin/prefer-object-rule
  232:43  error  `meta.type` is required (must be either `problem`, `suggestion`, or `layout`)  eslint-plugin/require-meta-type
  232:43  error  `meta.schema` is required (use [] if rule has no schema)                       eslint-plugin/require-meta-schema
@bradzacher
Copy link
Member Author

Also finding even more across the repo on the same commit as above:

      /Users/bjz/git/typescript-eslint/packages/typescript-estree/src/create-program/createIsolatedProgram.ts
        14:1  error  `meta.messages` must contain at least one violation message                    eslint-plugin/prefer-message-ids
        14:1  error  Rules should be declared using the object style                                eslint-plugin/prefer-object-rule
        14:1  error  `meta.type` is required (must be either `problem`, `suggestion`, or `layout`)  eslint-plugin/require-meta-type
        14:1  error  `meta.schema` is required (use [] if rule has no schema)                       eslint-plugin/require-meta-schema
      
      /Users/bjz/git/typescript-eslint/packages/typescript-estree/src/create-program/createSourceFile.ts
        32:1  error  `meta.messages` must contain at least one violation message                    eslint-plugin/prefer-message-ids
        32:1  error  Rules should be declared using the object style                                eslint-plugin/prefer-object-rule
        32:1  error  `meta.type` is required (must be either `problem`, `suggestion`, or `layout`)  eslint-plugin/require-meta-type
        32:1  error  `meta.schema` is required (use [] if rule has no schema)                       eslint-plugin/require-meta-schema
      
      /Users/bjz/git/typescript-eslint/packages/typescript-estree/src/create-program/shared.ts
        40:1  error  `meta.messages` must contain at least one violation message                    eslint-plugin/prefer-message-ids
        40:1  error  Rules should be declared using the object style                                eslint-plugin/prefer-object-rule
        40:1  error  `meta.type` is required (must be either `problem`, `suggestion`, or `layout`)  eslint-plugin/require-meta-type
        40:1  error  `meta.schema` is required (use [] if rule has no schema)                       eslint-plugin/require-meta-schema

aladdin-add added a commit that referenced this issue Apr 8, 2024
aladdin-add added a commit that referenced this issue Apr 8, 2024
aladdin-add added a commit that referenced this issue Apr 8, 2024
aladdin-add added a commit that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant