-
-
Notifications
You must be signed in to change notification settings - Fork 412
Closed
Description
Right now, no-empty-file
assumes that if an AST node includes a directive
property, then that's enough to indicate it's a directive:
const isDirective = node => node.type === 'ExpressionStatement' && 'directive' in node; |
That assumption no longer holds true in @typescript-eslint/parser
's v6.0.0 due to typescript-eslint/typescript-eslint#6274. We changed the AST shape roughly like:
- directive?: string;
+ directive: string | undefined;
The PR explains why we did that (tl;dr: normalizing AST node shapes). So eslint-plugin-unicorn
will need to update with a change like:
- const isDirective = node => node.type === 'ExpressionStatement' && 'directive' in node;
+ const isDirective = node => node.type === 'ExpressionStatement' && node.directive;
Right now, no-empty-line
is flagging totally valid files such as https://github.com/jakebailey/pyright-action/pull/19/files#diff-1e058ca1442e46581b13571fb8d261f9e1f5657e26c96634d4c1072f0f0347f1. Thanks @jakebailey for reporting!
fisker, HiDeoo, mcous, saibotk, studnitz and 16 more
Metadata
Metadata
Assignees
Labels
No labels