Commit Graph

16 Commits

Author SHA1 Message Date
ylemkimon
fdb155aa97 Build ECMAScript modules (#1479)
* Separate type import statement from module import statement

* Remove extension from import statements

* Build ECMAScript modules

* Add `cross-env` devDependency

* Use `babel-plugin-import-rename` instead of custom plugin

* Improve `.babelrc` style and add comments

* Update README.md

* Change file extension to `.mjs`

Comply with Node.js spec. Use extensionless package:main.

* Enforce only ESM compatible imports

* Dedupe packages

* Add `unicodeMake.js` to overrides:excludedFiles

* Fix .eslintrc merge conflict

* Use rollup to bundle ES module

* Remove `eslint-plugin-import`

* Change build directory to `dist`

* Change build directory to `dist`

* Change build directory

* Move docs from README.md to browser.md

* Update update-sri.js

* Revert update-sri.js

* Revert update-sri.js

* Update .eslintrc

* Remove SSH key testing
2018-08-13 13:06:40 +09:00
ylemkimon
7f1ce374e0 Lint against function polyfills that may be expensive (#1597)
* Lint against polyfills that may be expensive

* Exclude test file from source code linting
2018-08-13 11:26:46 +09:00
ylemkimon
9a9842886e Remove Object.assign() in auto-render which requires expensive polyfill, update LICENSE (#1591)
* Remove Object.assign() in auto-render which requires expensive polyfill

* Remove underscore.js from LICENSE

* Rename to LICENSE and update year

* Lint `contrib` codes
2018-08-13 01:29:22 +09:00
ylemkimon
c9947220b6 Remove codes that require expensive polyfill (#1469)
* Revert "Cleanup domTree.js to re-use code (#1305)"

This reverts commit 9bb48b83f1.

* Cleanup domTree.js to re-use code

* Extract common constructor/methods into functions

* Remove for...of

* Added eslint rule to disallow for...of

* Remove array destructuring

* Added eslint rule to disallow array destructuring

* Add eslint rule to disallow class inheritance

* Remove Object.keys and Object.assign

* Do not polyfill Object.freeze

* Babel: enable loose mode

* Undo disabling `linebreak-style`

* Move `children` initialization out of `initNode`

* Blacklist files for `no-restricted-syntax`

* Revert "Remove array destructuring"

This reverts commit c9d52c2db31c68cca77fea6ad774ee58b0632ff3.
2018-07-21 18:57:07 -07:00
Kevin Barabash
e1614995e3 enforce consistent object brace spacing (#1376) 2018-05-28 23:31:44 +02:00
Kevin Barabash
dbc5a74ebd Allow test/lint scripts to run without requiring make (#878) 2017-09-13 10:01:39 -04:00
Erik Demaine
588f5a1ee6 eslint-plugin-flowtype & upgrade to eslint@4 (#849)
* Add eslint-plugin-flowtype. Fix #844

Using the recommended settings for plugin.
This involved adding some spaces to some existing union types.

* Upgrade to eslint@4, fix spotted bugs

Switched to indent-legacy to allow e.g. comments to have extra indents.
2017-09-06 22:06:26 -04:00
Hossein Saniei
a019f36f8a Upgrade the source to use ES6 syntax including classes, import and static properties (#679)
* Add babel transform-class-properties to have static class properties

* Upgrade Lexer and Parser files to use ES6 classes

* Update eslint max line length to 90 character (more indent because of using ES6 classes)

* Upgrade eslint and jasmin to support ES stage-2 features

* Use static properties to place constants near their functions

* Migrate all remaining sources to ES6 syntax

* Increase eslint max line length to 84

* Remove non-babelified endpoint in dev server.js

* Clean up server.js functions after removing browserified

* Make screenshotter not to use babel endpoint as we babelify everything now
2017-07-03 08:09:21 -04:00
Martin von Gagern
7ec455083f Builtin macros, macro arguments, overset and underset
* Ship predefined macros with the library, in macros.js.
* Allow macro arguments #1 and so on, with argument count deduced from string.
* Use these features to implement \overset and \underset, fixes #484.
2017-04-05 21:42:38 +01:00
Martin von Gagern
bd9db332d2 Turn var into const or let 2017-01-13 22:37:17 -05:00
Martin von Gagern
9b565a6375 Include babelify step in browserify calls
This allows using ES6 syntax in our code, while maintaining backwards
compatibility for the generated file.
2017-01-13 22:37:17 -05:00
Kevin Barabash
56f3d1db47 Don't cascade .eslintrc
eslint will automatically merge .eslintrc files in the parent folder without "root": true
2017-01-12 22:53:10 -05:00
Martin von Gagern
53e416e296 Revert "Remove trailing commas for IE 9 compatibility"
This reverts commit 4d2e46e7f6.

Having trailing commans makes diffs easier to read as it avoids modifying a
line just to add a trailing comma if there is another item to add at the end
of a list.  There are plans to switch to ES6 notation and to translate that
to ES5 as part of the build process.  Since that translation would remove
trailing commas, the IE9 problems that originally motivated the commit
should vanish soon.
2017-01-11 13:26:00 +01:00
Martin von Gagern
90e25fecc2 Update dependencies to more recent version
All these version ranges include the latest version at the time of this
commit, except for the selenium webdriver.  There version 3 is incompatible
with version 2, and switching to a version 3 library appears to require
switching to version 3 docker images as well, which would entail using
different browser versions which in turn would lead to differences for a
large number of screenshots.  That doesn't appear warranted at this time.
2017-01-09 15:09:43 +01:00
Emily Eisenberg
4d2e46e7f6 Remove trailing commas for IE 9 compatibility
Summary: IE 9 doesn't like trailing commas. When we introduced eslint, we added
a bunch of trailing commas, which makes IE 9 sad.

Test Plan:
 - `make lint`
 - Visit http://localhost:7936/ using IE 9 on browserstack.
 - See that the math loads, and there are no errors in the F12 developer tools.

@kevinb
2017-01-06 19:06:01 -08:00
Kevin Barabash
14a58adb90 Migrate to eslint
Summary
We'd like contributors to use the same linter and lint rules that we use
internally.  This diff swaps out eslint for jshint and fixes all lint failures
except for the max-len failures in the test suites.

Test Plan:
- ka-lint src
- make lint
- make test

Reviewers: emily
2015-12-01 10:02:08 -08:00