Skip to content

Commit

Permalink
Typescript conversion (niklasvh#1828)
Browse files Browse the repository at this point in the history
* initial typescript conversion

* test: update overflow+transform ref test

* fix: correctly render pseudo element content

* fix: testrunner build

* fix: karma test urls

* test: update underline tests with <u> elements

* test: update to es6-promise polyfill

* test: remove watch from server

* test: remove flow

* format: update prettier for typescript

* test: update eslint to use typescript parser

* test: update linear gradient reftest

* test: update test runner

* test: update testrunner promise polyfill

* fix: handle display: -webkit-flex correctly (fix niklasvh#1817)

* fix: correctly render gradients with clip & repeat (fix niklasvh#1773)

* fix: webkit-gradient function support

* fix: implement radial gradients

* fix: text-decoration rendering

* fix: missing scroll positions for elements

* ci: fix ios 11 tests

* fix: ie logging

* ci: improve device availability logging

* fix: lint errors

* ci: update to ios 12

* fix: check for console availability

* ci: fix build dependency

* test: update text reftests

* fix: window reference for unit tests

* feat: add hsl/hsla color support

* fix: render options

* fix: CSSKeyframesRule cssText Permission Denied on Internet Explorer 11 (niklasvh#1830)

* fix: option lint

* fix: list type rendering

* test: fix platform import

* fix: ie css parsing for numbers

* ci: add minified build

* fix: form element rendering

* fix: iframe rendering

* fix: re-introduce experimental foreignobject renderer

* fix: text-shadow rendering

* feat: improve logging

* fix: unit test logging

* fix: cleanup resources

* test: update overflow scrolling to work with ie

* build: update build to include typings

* fix: do not parse select element children

* test: fix onclone test to work with older IEs

* test: reduce reftest canvas sizes

* test: remove dynamic setUp from list tests

* test: update linear-gradient tests

* build: remove old source files

* build: update docs dependencies

* build: fix typescript definition path

* ci: include test.js on docs website
  • Loading branch information
niklasvh authored May 25, 2019
1 parent 20a797c commit 522a443
Show file tree
Hide file tree
Showing 221 changed files with 17,766 additions and 27,797 deletions.
34 changes: 19 additions & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
{
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"flowtype",
"@typescript-eslint",
"prettier"
],
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }],
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/no-weak-types": 2,
"flowtype/delimiter-dangle": 2,
"prettier/prettier": ["error", {
"singleQuote": true,
"bracketSpacing": false,
"parser": "flow",
"tabWidth": 4,
"printWidth": 100
}]
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/class-name-casing": "off",
"prettier/prettier": "error"
}
}
8 changes: 0 additions & 8 deletions .flowconfig

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ npm-debug.log
debug.log
tests/reftests.js
*.log
.rpt2_cache
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ karma.js
karma.conf.js
rollup.config.js
webpack.config.js
.rpt2_cache
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "none",
"tabWidth": 4,
"bracketSpacing": false,
"singleQuote": true,
"printWidth": 120
}
14 changes: 6 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ jobs:
displayName: Build
- script: npm run lint
displayName: Lint
- script: npm run flow
displayName: Flow
- script: npm run test:node
- script: npm run unittest
displayName: Unit tests

- template: ci/browser-tests.yml
Expand Down Expand Up @@ -88,10 +86,10 @@ jobs:

- template: ci/browser-tests.yml
parameters:
name: Browser_Tests_OSX_Safari_IOS_11
displayName: iOS Simulator Safari 11
name: Browser_Tests_OSX_Safari_IOS_12
displayName: iOS Simulator Safari 12
vmImage: 'macOS-10.13'
targetBrowser: Safari_IOS_11
targetBrowser: Safari_IOS_12

- template: ci/browser-tests.yml
parameters:
Expand Down Expand Up @@ -130,7 +128,7 @@ jobs:
- Browser_Tests_Linux_Chrome_Stable
- Browser_Tests_OSX_Safari_IOS_9
- Browser_Tests_OSX_Safari_IOS_10
- Browser_Tests_OSX_Safari_IOS_11
- Browser_Tests_OSX_Safari_IOS_12
- Browser_Tests_OSX_Safari_Stable
- Browser_Tests_Windows_IE9
- Browser_Tests_Windows_IE10
Expand All @@ -153,7 +151,7 @@ jobs:
inputs:
artifactName: dist
downloadPath: $(System.DefaultWorkingDirectory)
- script: cp -R tests/reftests www/static/tests/reftests && cp -R tests/assets www/static/tests/assets && cp -R ReftestResults ./www/static/results
- script: cp -R tests/reftests www/static/tests/reftests && cp -R tests/assets www/static/tests/assets && cp tests/test.js www/static/tests/test.js && cp -R ReftestResults ./www/static/results
displayName: Copy reftests to docs website
- script: cp -R dist ./www/static/dist
displayName: Copy dist to docs website
Expand Down
11 changes: 0 additions & 11 deletions flow-typed/myLibDef.js

This file was deleted.

6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ module.exports = function(config) {
name: 'iPhone 5s',
sdk: '10.0'
},
Safari_IOS_11: {
Safari_IOS_12: {
base: 'MobileSafari',
name: 'iPhone 5s',
sdk: '11.4'
sdk: '12.1'
},
SauceLabs_IE9: {
base: 'SauceLabs',
Expand Down Expand Up @@ -132,6 +132,7 @@ module.exports = function(config) {

if (!d) {
log.error(`No device found for sdk ${args.sdk} with name ${args.name}`);
log.info(`Available devices:`, devices);
this._process.kill();
return;
}
Expand Down Expand Up @@ -172,7 +173,6 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'build/testrunner.js',
'build/RefTestRenderer.js',
{ pattern: './tests/**/*', 'watched': true, 'included': false, 'served': true},
{ pattern: './dist/**/*', 'watched': true, 'included': false, 'served': true},
{ pattern: './node_modules/**/*', 'watched': true, 'included': false, 'served': true},
Expand Down
Loading

0 comments on commit 522a443

Please sign in to comment.