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

New rule require-error-positions #485

Open
FloEdelmann opened this issue Jul 8, 2024 · 1 comment
Open

New rule require-error-positions #485

FloEdelmann opened this issue Jul 8, 2024 · 1 comment
Labels
feature needs design Important details about this change need to be discussed rule

Comments

@FloEdelmann
Copy link
Contributor

Many contributors add tests with only line: 4 for reported errors. Often, the test cases should include the column and end position though. This could be enforced with a new ESLint rule that requires all of line, endLine, column, and endColumn to be present for all expected errors.

@FloEdelmann FloEdelmann changed the title New rule require-positions New rule require-error-positions Jul 8, 2024
@aladdin-add
Copy link
Contributor

aladdin-add commented Jul 11, 2024

Currently, there is no rule enforcing the structure of error objects. I am considering introducing a rule that developers can configure to enforce which properties (such as line, endLine, column, and endColumn) must be present in error objects. Additionally, this rule could specify whether the properties must follow a certain order. Of course, this will require a more detailed and specific design.

@aladdin-add aladdin-add added rule feature needs design Important details about this change need to be discussed labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature needs design Important details about this change need to be discussed rule
Projects
None yet
Development

No branches or pull requests

2 participants