Skip to content

Commit c25b64a

Browse files
authored
Eslint parser cleanup (babel#17144)
1 parent 1432002 commit c25b64a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

eslint/babel-eslint-parser/src/worker/ast-info.cts

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@ export function getVisitorKeys() {
2323

2424
// AST Types that shares `"type"` property with Babel but have different shape
2525
const conflictTypes = {
26-
// todo: remove this when we drop Babel 7 support
27-
ClassPrivateMethod: ["decorators"].concat(
28-
ESLINT_VISITOR_KEYS.MethodDefinition,
29-
),
3026
ExportAllDeclaration: ESLINT_VISITOR_KEYS.ExportAllDeclaration,
3127
};
3228

3329
visitorKeys = {
3430
...newTypes,
3531
...babel.types.VISITOR_KEYS,
3632
...conflictTypes,
33+
...(process.env.BABEL_8_BREAKING
34+
? {}
35+
: {
36+
ClassPrivateMethod: ["decorators"].concat(
37+
ESLINT_VISITOR_KEYS.MethodDefinition,
38+
),
39+
}),
3740
};
3841
}
3942
return visitorKeys;

scripts/babel-plugin-bit-decorator/plugin.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function pluginBabelBitDecorator({ types: t, template }) {
6565
}
6666
if (!storageName) {
6767
throw path.buildCodeFrameError(
68-
"Cannot use @bit withuot also declaring a @bit.storage field"
68+
"Cannot use @bit without also declaring a @bit.storage field"
6969
);
7070
}
7171
if (nextMask === 0) {

0 commit comments

Comments
 (0)