6 Every new feature and API change should be accompanied by a README additon.
10 All features and bugs should have tests that verify the fix. You can run all
11 tests using `npm test`.
13 The most common type of test are tests that verify input and output of the
14 Uglify transforms. These tests exist in `test/compress`. New tests can be added
15 either to an existing file or in a new file `issue-xxx.js`.
17 Tests that cannot be expressed as a simple AST can be found in `test/mocha`.
21 - File encoding must be `UTF-8`.
22 - `LF` is always used as a line ending.
23 - Statements end with semicolons.
24 - Indentation uses 4 spaces, switch `case` 2 spaces.
25 - Identifiers use `snake_case`.
26 - Strings use double quotes (`"`).
27 - Use a trailing comma for multiline array and object literals to minimize diffs.
28 - The Uglify code only uses ES5, even in the `harmony` branch.
29 - Line length should be at most 80 cols, except when it is easier to read a
31 - If both sides of a comparison are of the same type, `==` and `!=` are used.
32 - Multiline conditions place `&&` and `||` first on the line.
37 OPT(AST_Debugger, function(self, compressor) {
38 if (compressor.option("drop_debugger"))
39 return make_node(AST_EmptyStatement, self);