Skip to content

willklein/scaling-best-practices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scaling Best Practices with Syntax Trees

Slides and material for a conference talk

Proposal

There's a myriad of good and bad ways to write our JavaScript-and it keeps evolving! ES2015 is here, ES2016 is coming soon, and the language is changing faster than ever.

Fortunately, there is also a revolution in JavaScript tooling. New tools are here to help us understand and improve our code. Let's look at one of these tools, ESLint, and write our own rules to detect patterns in computer language. While we're at it, let's rediscover how languages are parsed, analyzed, and represented as abstract syntax trees.

Slides

Midwest.io - November 2015

Nodevember - November 2015

Code

The slides have a simple, self-contained example, along with the code snippet for a simple ESLint rule. This repo has a richer example, a clone of TodoMVC in React. It also has the same rule broken out into a plugin, along with tests that you can run to experiment with modifications.

Testing

To run the Mocha tests for the ESLint plugin, cd into the code/eslint-plugin-demo directory and run:

npm test

Further Learning

Articles

Maintaining JavaScript Code Quality with ESLint - by Jamund Ferguson

Lint Like It's 2015 - by Dan Abramov

Detect Problems in JavaScript Automatically with ESLint - by Jani Hartikainen

Understanding the Real Advantages of Using ESLint - by Evan Schultz

Using eslint alongside the Firefox Hello code base to help productivity - by Standard8

Get Started with ESLint v1.0 - by Ian VanSchooten

Linting JavaScript in 2015 - by Lauritz Hilsøe

Tools

ESLint - Pluggable JavaScript linter

Esprima Parser demo and related blog post by Ariya Hidayat

metajs: visualize JavaScript AST execution - for visualizing code stepping

Docs

ESLint: Working with Rules - doc for writing rules in ESLint

ESTree Spec - core ESTree AST node types

ESTree ES6 Spec - extensions to the core ESTree AST types to support the ES6 grammar

Other Conference Talks

Gurdas Nijor @ React.js Conf - Unlocking the Structure of Your React Applications with the AST

Mark Knichel @ JSConf EU 2014 - JavaScript Tools at Scale Using Type Information

Dann Toliver @ JSConf US 2015 - Visualizing Process Evolution

Podcasts

JavaScript Jabber 162 - ESLint with Jamund Ferguson

Support

ESLint Gitter Chat - These folks are very helpful

Tweet me @willslab

About

Talk for Nodevember & Midwest.io 2015

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published