You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## <aname="stricter-rule-tester"></a> Prohibiting `errors` or `output` of valid RuleTester test cases
290
+
291
+
In ESLint v10.0.0, the RuleTester has become more strict about test case structure. Valid test cases (those that should not produce any linting errors) are no longer allowed to have `errors` or `output` properties.
292
+
293
+
What changed:
294
+
295
+
- Previously, valid test cases could include `errors` or `output` properties, which were ignored.
296
+
- Now, including these properties in valid test cases will cause the test to fail.
297
+
298
+
Example of invalid usage:
299
+
300
+
```js
301
+
// This will now throw an error in ESLint v10.0.0
302
+
constvalidTestCases= [
303
+
{
304
+
code:"const foo = 'bar';",
305
+
errors:0, // ❌ Not allowed in valid test cases
306
+
output:"const foo = 'bar';", // ❌ Not allowed in valid test cases
## <aname="lintmessage-nodetype-removed"></a> Removal of `nodeType` property in `LintMessage` objects
289
318
290
319
In ESLint v10.0.0, the deprecated `nodeType` property on `LintMessage` objects has been removed. This affects consumers of the Node.js API (for example, custom formatters and editor/tool integrations) that previously relied on `message.nodeType`.
0 commit comments