From a819cc9f6ef4d96776293ac895068e16a42d9ba0 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Fri, 27 Dec 2019 12:33:18 +0100 Subject: [PATCH] Updated Style Guide (markdown) --- Style-Guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Style-Guide.md b/Style-Guide.md index a4e6ecf..c339796 100644 --- a/Style-Guide.md +++ b/Style-Guide.md @@ -1,6 +1,6 @@ -This page outlines the style conventions that PDF.js follows to maintain a consistent codebase. We ask each contributor that creates a pull request to adhere to these conventions. +This page outlines the style conventions that PDF.js follows to maintain a consistent code base. We ask each contributor that creates a pull request to adhere to these conventions. -Many of these conventions will be checked automatically by a linter after each push to a branch of a pull request. Please refer to https://github.com/mozilla/pdf.js/wiki/Contributing#4-run-lint-and-testing for information about running the linter locally. +Most of these conventions ware checked automatically by a linter (Prettier) after each push to a branch of a pull request. Refer to https://github.com/mozilla/pdf.js/wiki/Contributing#4-run-lint-and-testing for information about running the linter locally. ## General * Indentation: 2 spaces @@ -45,7 +45,7 @@ if (someVar === conditionA) { Variables must be defined only once within a function scope, preferably at the top of the function. Use `const` if the value is not mutated and `let` if it is mutated. In new code we don't use `var` unless absolutely necessary. ## Classes -The standard way of creating classes in PDF.js used to be the following, so you might see this pattern in the current codebase. Please note that by class we mean an object that is class-like. +The standard way of creating classes in PDF.js used to be the following, so you might see this pattern in the current code base. Please note that by class we mean an object that is class-like. ```javascript var ClassName = (function ClassNameClosure() { @@ -68,7 +68,7 @@ var ClassName = (function ClassNameClosure() { })(); ``` -However, we are in the process of converting the codebase to ES6 syntax since classes are generally available in browsers and well optimized nowadays, so for new code we prefer the following way of creating classes. +However, we are in the process of converting our code to ES6 syntax since classes are generally available in browsers and well optimized nowadays, so for new code we prefer the following way of creating classes. ```javascript class ClassName {