eslint-plugin-eslint-plugin
eslint-plugin-eslint-plugin copied to clipboard
New rule `require-error-positions`
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.
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.