Skip to content

Commit

Permalink
update estree-walker - closes #3977, closes #3979
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Nov 23, 2019
1 parent cd21acf commit 1a34a5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"eslint": "^6.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-svelte3": "^2.7.3",
"estree-walker": "^0.8.1",
"estree-walker": "^1.0.0",
"is-reference": "^1.1.4",
"jsdom": "^15.1.1",
"kleur": "^3.0.3",
Expand Down
9 changes: 1 addition & 8 deletions src/compiler/compile/Component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { walk, childKeys } from 'estree-walker';
import { walk } from 'estree-walker';
import { getLocator } from 'locate-character';
import Stats from '../Stats';
import { globals, reserved, is_valid } from '../utils/names';
Expand Down Expand Up @@ -37,13 +37,6 @@ interface ComponentOptions {
preserveWhitespace?: boolean;
}

// We need to tell estree-walker that it should always
// look for an `else` block, otherwise it might get
// the wrong idea about the shape of each/if blocks
childKeys.EachBlock = childKeys.IfBlock = ['children', 'else'];
childKeys.Attribute = ['value'];
childKeys.ExportNamedDeclaration = ['declaration', 'specifiers'];

export default class Component {
stats: Stats;
warnings: Warning[];
Expand Down

0 comments on commit 1a34a5e

Please sign in to comment.