15
Getting Started with ES6 and Meteor

Getting started with ES6 + Meteor.js

Embed Size (px)

Citation preview

Getting Started with ES6 and Meteor

THE CURRENT JAVASCRIPT ECOSYSTEM

meteor add ecmascript

● Arrow functions● Classes● Constants● Block scoping● Property shorthands● For … of● Polyfills!

○ Promise○ Map○ …

● ...More at https://docs.meteor.com/packages/ecmascript.html#Supported-ES2015-Features

meteor add ecmascript&& meteor remove coffeescript underscore

● Arrow functions● Classes● Constants● Block scoping● Property shorthands● For … of● Polyfills!

○ Promise○ Map○ …

● ...More at https://docs.meteor.com/packages/ecmascript.html#Supported-ES2015-Features

meteor add ecmascript

● Arrow functions● Classes● Constants● Block scoping● Property shorthands● For … of● Polyfills!

○ Promise○ Map○ …

● ...More at https://docs.meteor.com/packages/ecmascript.html#Supported-ES2015-Features

“It’s not all or nothing!”

http://info.meteor.com/blog/es2015-get-started

Stick to best practices,use a linter!

+

meteor npm install eslint eslint-plugin-import eslint-config-airbnb-base

eslint-import-resolver-meteor babel-eslint --save-dev

ESLint

Getting started with Linting and Meteor

Update package.json and lint

{ ... "scripts": { "lint": "eslint --quiet .", }, "eslintConfig": { "parser": "babel-eslint", "parserOptions": { "allowImportExportEverywhere": true }, "extends": [ "airbnb-base" ], "settings": { "import/resolver": "meteor" }, "rules": {}, "globals": {} }}

meteor npm run lint

Improving code style and learning ES6!

https://guide.meteor.com/code-style.html#eslint-editor

Not convinced yet?

Demo time!

Thanks for your attention!

Any questions?

faburem Fabian Kromer @faburem