Skip to content

Commit 1a34a5e

Browse files
committed
update estree-walker - closes #3977, closes #3979
1 parent cd21acf commit 1a34a5e

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"eslint": "^6.3.0",
7171
"eslint-plugin-import": "^2.18.2",
7272
"eslint-plugin-svelte3": "^2.7.3",
73-
"estree-walker": "^0.8.1",
73+
"estree-walker": "^1.0.0",
7474
"is-reference": "^1.1.4",
7575
"jsdom": "^15.1.1",
7676
"kleur": "^3.0.3",

src/compiler/compile/Component.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { walk, childKeys } from 'estree-walker';
1+
import { walk } from 'estree-walker';
22
import { getLocator } from 'locate-character';
33
import Stats from '../Stats';
44
import { globals, reserved, is_valid } from '../utils/names';
@@ -37,13 +37,6 @@ interface ComponentOptions {
3737
preserveWhitespace?: boolean;
3838
}
3939

40-
// We need to tell estree-walker that it should always
41-
// look for an `else` block, otherwise it might get
42-
// the wrong idea about the shape of each/if blocks
43-
childKeys.EachBlock = childKeys.IfBlock = ['children', 'else'];
44-
childKeys.Attribute = ['value'];
45-
childKeys.ExportNamedDeclaration = ['declaration', 'specifiers'];
46-
4740
export default class Component {
4841
stats: Stats;
4942
warnings: Warning[];

0 commit comments

Comments
 (0)