From 14fb080f802a6db7e7284e518b86e22b3bae232a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 17 Dec 2019 15:05:02 -0700 Subject: [PATCH] Document ES6 changes --- CONTRIBUTING.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b4b7f67f1..398ea2e23 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -36,8 +36,15 @@ minutes. Code style ~~~~~~~~~~ -The code-style for matrix-js-sdk is not formally documented, but contributors -are encouraged to read the code style document for matrix-react-sdk +The js-sdk aims to target TypeScript/ES6. All new files should be written in +TypeScript and existing files should use ES6 principles where possible. + +Members should not be exported as a default export - this is to prevent problems +down the line when importing various bits of code in other layers and in the +index for this project. In short, don't use `export default`. + +The remaining code-style for matrix-js-sdk is not formally documented, but +contributors are encouraged to read the code style document for matrix-react-sdk (``_) and follow the principles set out there.