diff --git a/package.json b/package.json index 09d5e711..40998c0c 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,8 @@ "rollup-plugin-visualizer": "^0.3.1", "sinon": "^4.1", "standard": "^10.0.3", + "tslint": "5.9.1", + "tslib": "1.9.0", "typescript": "^2.6.2" }, "workspaces": [ diff --git a/packages/node_modules b/packages/node_modules deleted file mode 120000 index 945c9b46..00000000 --- a/packages/node_modules +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/packages/tko.utils/package.json b/packages/tko.utils/package.json index 3055fa0b..5f98e772 100644 --- a/packages/tko.utils/package.json +++ b/packages/tko.utils/package.json @@ -27,7 +27,8 @@ ] }, "dependencies": { - "tslib": "^1.8.0" + "@types/jquery": "3.3.1", + "tslib": "1.9.0" }, "__about__shared.package.json": "These properties are copied into all packages/*/package.json", "standard": { diff --git a/packages/tko.utils/src/array.js b/packages/tko.utils/src/array.ts similarity index 100% rename from packages/tko.utils/src/array.js rename to packages/tko.utils/src/array.ts diff --git a/packages/tko.utils/src/async.js b/packages/tko.utils/src/async.ts similarity index 100% rename from packages/tko.utils/src/async.js rename to packages/tko.utils/src/async.ts diff --git a/packages/tko.utils/src/bind-shim.js b/packages/tko.utils/src/bind-shim.ts similarity index 100% rename from packages/tko.utils/src/bind-shim.js rename to packages/tko.utils/src/bind-shim.ts diff --git a/packages/tko.utils/src/css.js b/packages/tko.utils/src/css.ts similarity index 100% rename from packages/tko.utils/src/css.js rename to packages/tko.utils/src/css.ts diff --git a/packages/tko.utils/src/dom/data.js b/packages/tko.utils/src/dom/data.ts similarity index 100% rename from packages/tko.utils/src/dom/data.js rename to packages/tko.utils/src/dom/data.ts diff --git a/packages/tko.utils/src/dom/disposal.js b/packages/tko.utils/src/dom/disposal.ts similarity index 100% rename from packages/tko.utils/src/dom/disposal.js rename to packages/tko.utils/src/dom/disposal.ts diff --git a/packages/tko.utils/src/dom/event.js b/packages/tko.utils/src/dom/event.ts similarity index 100% rename from packages/tko.utils/src/dom/event.js rename to packages/tko.utils/src/dom/event.ts diff --git a/packages/tko.utils/src/dom/fixes.js b/packages/tko.utils/src/dom/fixes.ts similarity index 100% rename from packages/tko.utils/src/dom/fixes.js rename to packages/tko.utils/src/dom/fixes.ts diff --git a/packages/tko.utils/src/dom/html.js b/packages/tko.utils/src/dom/html.ts similarity index 100% rename from packages/tko.utils/src/dom/html.js rename to packages/tko.utils/src/dom/html.ts diff --git a/packages/tko.utils/src/dom/info.js b/packages/tko.utils/src/dom/info.ts similarity index 100% rename from packages/tko.utils/src/dom/info.js rename to packages/tko.utils/src/dom/info.ts diff --git a/packages/tko.utils/src/dom/manipulation.js b/packages/tko.utils/src/dom/manipulation.ts similarity index 100% rename from packages/tko.utils/src/dom/manipulation.js rename to packages/tko.utils/src/dom/manipulation.ts diff --git a/packages/tko.utils/src/dom/selectExtensions.js b/packages/tko.utils/src/dom/selectExtensions.ts similarity index 100% rename from packages/tko.utils/src/dom/selectExtensions.js rename to packages/tko.utils/src/dom/selectExtensions.ts diff --git a/packages/tko.utils/src/dom/virtualElements.js b/packages/tko.utils/src/dom/virtualElements.ts similarity index 100% rename from packages/tko.utils/src/dom/virtualElements.js rename to packages/tko.utils/src/dom/virtualElements.ts diff --git a/packages/tko.utils/src/error.js b/packages/tko.utils/src/error.ts similarity index 100% rename from packages/tko.utils/src/error.js rename to packages/tko.utils/src/error.ts diff --git a/packages/tko.utils/src/function.js b/packages/tko.utils/src/function.ts similarity index 100% rename from packages/tko.utils/src/function.js rename to packages/tko.utils/src/function.ts diff --git a/packages/tko.utils/src/ie.js b/packages/tko.utils/src/ie.ts similarity index 100% rename from packages/tko.utils/src/ie.js rename to packages/tko.utils/src/ie.ts diff --git a/packages/tko.utils/src/index.js b/packages/tko.utils/src/index.ts similarity index 100% rename from packages/tko.utils/src/index.js rename to packages/tko.utils/src/index.ts diff --git a/packages/tko.utils/src/jquery.js b/packages/tko.utils/src/jquery.ts similarity index 100% rename from packages/tko.utils/src/jquery.js rename to packages/tko.utils/src/jquery.ts diff --git a/packages/tko.utils/src/memoization.js b/packages/tko.utils/src/memoization.ts similarity index 100% rename from packages/tko.utils/src/memoization.js rename to packages/tko.utils/src/memoization.ts diff --git a/packages/tko.utils/src/object.js b/packages/tko.utils/src/object.ts similarity index 100% rename from packages/tko.utils/src/object.js rename to packages/tko.utils/src/object.ts diff --git a/packages/tko.utils/src/options.js b/packages/tko.utils/src/options.ts similarity index 100% rename from packages/tko.utils/src/options.js rename to packages/tko.utils/src/options.ts diff --git a/packages/tko.utils/src/proto.js b/packages/tko.utils/src/proto.ts similarity index 100% rename from packages/tko.utils/src/proto.js rename to packages/tko.utils/src/proto.ts diff --git a/packages/tko.utils/src/string.js b/packages/tko.utils/src/string.ts similarity index 100% rename from packages/tko.utils/src/string.js rename to packages/tko.utils/src/string.ts diff --git a/packages/tko.utils/src/symbol.js b/packages/tko.utils/src/symbol.ts similarity index 100% rename from packages/tko.utils/src/symbol.js rename to packages/tko.utils/src/symbol.ts diff --git a/packages/tko.utils/src/tasks.js b/packages/tko.utils/src/tasks.ts similarity index 100% rename from packages/tko.utils/src/tasks.js rename to packages/tko.utils/src/tasks.ts diff --git a/tsconfig.json b/tsconfig.json index ab16a324..e1b7c65d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,10 @@ "compileOnSave": false, "compilerOptions": { "downlevelIteration": true, - "target": "ES3", + "target": "ES5", + "lib": [ "dom", "es5", "es2015.core", "es2015.collection", "es2015.promise", "es2015.symbol", "es2015.symbol.wellknown", "scripthost" ], "module": "ES2015", + "moduleResolution": "node", "allowJs": true, "importHelpers": true, "strict": true diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000..406fd033 --- /dev/null +++ b/tslint.json @@ -0,0 +1,46 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": { + "arrow-parens": [true, "ban-single-arg-parens"], + "quotemark": [true, "single","avoid-template", "avoid-escape"], + "object-literal-sort-keys": false, + "ordered-imports": [ + true, + { + "import-sources-order": "any", + "named-imports-order": "any" + } + ], + "member-ordering": false, + "max-classes-per-file": [true, 6], + "max-line-length": [true, 250], + "no-conditional-assignment": false, + "no-empty": false, + "one-variable-per-declaration": false, + "no-console": false, + "no-shadowed-variable": false, + "trailing-comma": false, + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, + { + "call-signature": "onespace", + "index-signature": "onespace", + "parameter": "onespace", + "property-declaration": "onespace", + "variable-declaration": "onespace" + } + ] + }, + "rulesDirectory": [] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8dc9782f..9d9b7609 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,6 +6,10 @@ version "1.0.0" resolved "https://registry.yarnpkg.com/@comandeer/babel-plugin-banner/-/babel-plugin-banner-1.0.0.tgz#40bcce0bbee084b5b02545a33635d053c248356f" +"@types/jquery@3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.1.tgz#55758d44d422756d6329cbf54e6d41931d7ba28f" + "@types/node@^7.0.18": version "7.0.46" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.46.tgz#c3dedd25558c676b3d6303e51799abb9c3f8f314" @@ -119,6 +123,12 @@ ansi-styles@^3.1.0: dependencies: color-convert "^1.9.0" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -275,7 +285,7 @@ aws4@^1.2.1, aws4@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-code-frame@^6.16.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -771,6 +781,14 @@ chalk@^2.0.0, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chalk@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + check-error@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" @@ -890,6 +908,10 @@ commander@2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" +commander@^2.12.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + commander@^2.9.0: version "2.12.2" resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" @@ -1324,6 +1346,10 @@ diff@^3.1.0: version "3.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + doctrine@1.5.0, doctrine@^1.2.2: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -2204,6 +2230,10 @@ has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2636,6 +2666,13 @@ js-yaml@^3.5.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.7.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -3906,6 +3943,12 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.4.0: dependencies: path-parse "^1.0.5" +resolve@^1.3.2: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -4406,6 +4449,12 @@ supports-color@^4.0.0, supports-color@^4.4.0: dependencies: has-flag "^2.0.0" +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" @@ -4553,10 +4602,37 @@ tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +tslib@1.9.0, tslib@^1.8.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" + tslib@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" +tslint@5.9.1: + version "5.9.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.12.1" + +tsutils@^2.12.1: + version "2.26.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.26.1.tgz#9e4a0cb9ff173863f34c22a961969081270d1878" + dependencies: + tslib "^1.8.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"