return { ExportDefaultDeclaration: function(node) { } }; } }; (we’ll talk about how we find these later) ESLint calls this function to “visit” the node while traversing down the AST Creating our own ESLint plugin that disallows default exports
ExportDefaultDeclaration: function(node) { context.report(node, 'Default exports are not allowed.'); } }; } }; Publishes a warning or error Creating our own ESLint plugin that disallows default exports
implemented by Acorn.” “[Babylon has] support for experimental language proposals” "Unfortunately, ESLint relies on more than just the AST to do its job. It relies on […] tokens and comment attachment features to get a complete picture of the source code." “Experimental support for JSX”
ES6 modules var const / let Change test lib (Mocha to Jest) and assertion lib (e.g. to.be() to toBe()) Remove unused code, e.g. unused variables and functions Object.assign Object spread Introduce support for I18N
with it. Path: Collection: Similar to jQuery's $(...) APIs to find, filter, map and remove AST nodes. const ast = j(file.source); ast .find(j.Identifier) .forEach(function(path) { // do something with path });
e.g. React deprecating PropTypes Transforms for switching test libraries, e.g. moving from Mocha to Jest Pre-built codemods for moving to ES6+ features, e.g. arrow functions and const/let