diff --git a/.gitignore b/.gitignore index b1d3a1b1ac0..517a64896a2 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ lerna-debug.log # Yarn lock file yarn.lock + +# Custom typings +custom_typing/*.js diff --git a/package-lock.json b/package-lock.json index 5f39a90f402..ca41be60b2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "webpack-cli", - "version": "0.0.9-development", + "version": "3.0.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -15440,9 +15440,9 @@ "dev": true }, "resolve": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.0.tgz", - "integrity": "sha512-MNcwJ8/K9iJqFDBDyhcxZuDWvf/ai0GcAJWetx2Cvvcz4HLfA8j0KasWR5Z6ChcbjYZ+FaczcXjN2jrCXCjQ4w==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { "path-parse": "^1.0.5" @@ -17507,6 +17507,35 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.2.tgz", "integrity": "sha512-AVP5Xol3WivEr7hnssHDsaM+lVrVXWUvd1cfXTRkTj80b//6g2wIFEH6hZG0muGZRnHGrfttpdzRk3YlBkWjKw==" }, + "tslint": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.10.0.tgz", + "integrity": "sha1-EeJrzLiK+gLdDZlWyuPUVAtfVMM=", + "dev": true, + "requires": { + "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": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.27.1.tgz", + "integrity": "sha512-AE/7uzp32MmaHvNNFES85hhUDHFdFZp6OAiZcd6y4ZKKIg6orJTm8keYWBhIhrJQH3a4LzNKat7ZPXZt5aTf6w==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", diff --git a/package.json b/package.json index b71234df510..193f6ce651b 100644 --- a/package.json +++ b/package.json @@ -25,22 +25,25 @@ "bin" ], "scripts": { - "lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"{packages}/**/!(node_modules)/*.js\" ", + "appveyor:lint": "lerna bootstrap && npm run lint", + "appveyor:test": "npm run test", + "bootstrap": "npm run clean:all && npm install && lerna bootstrap", + "build": "tsc", + "bundlesize": "bundlesize", + "changelog": "conventional-changelog --config ./build/changelog-generator/index.js --infile CHANGELOG.md --same-file", + "clean:all": "rimraf node_modules package-lock.json packages/*/node_modules packages/*/package-lock.json", "format": "prettier-eslint ./bin/*.js ./test/**/*.js ./packages/**/*.js --write", + "jsdoc": "jsdoc -c jsdoc.json -r -d docs", "lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"", + "lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"{packages}/**/!(node_modules)/*.test.js\" && npm run tslint", "precommit": "lint-staged", "pretest": "npm run lint", - "test": "nyc jest", "reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov", - "jsdoc": "jsdoc -c jsdoc.json -r -d docs", - "appveyor:lint": "lerna bootstrap && npm run lint", - "appveyor:test": "npm run test", + "test": "nyc jest", "travis:integration": "npm run test && npm run reportCoverage", "travis:lint": "lerna bootstrap && npm run lint && npm run bundlesize", - "bundlesize": "bundlesize", - "changelog": "conventional-changelog --config ./build/changelog-generator/index.js --infile CHANGELOG.md --same-file", - "clean:all": "rimraf node_modules package-lock.json packages/*/node_modules packages/*/package-lock.json", - "bootstrap": "npm run clean:all && npm install && lerna bootstrap" + "tslint": "tslint -c tslint.json \"{packages}/**/!(node_modules)/*.ts\"", + "watch": "tsc -w" }, "lint-staged": { "{packages,bin}/**/!(__testfixtures__)/**.js": [ @@ -128,6 +131,8 @@ "prettier-eslint-cli": "^4.7.1", "rimraf": "^2.6.2", "schema-utils": "^0.4.5", + "tslint": "^5.10.0", + "typescript": "^2.9.2", "webpack": "^4.8.3", "webpack-dev-server": "^3.1.4" } diff --git a/packages/generators/package-lock.json b/packages/generators/package-lock.json index aee37e0551d..e5a13031127 100644 --- a/packages/generators/package-lock.json +++ b/packages/generators/package-lock.json @@ -5274,9 +5274,9 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "requires": { "path-parse": "^1.0.5" } diff --git a/packages/migrate/package-lock.json b/packages/migrate/package-lock.json index 5c370f11157..783c42b3087 100644 --- a/packages/migrate/package-lock.json +++ b/packages/migrate/package-lock.json @@ -3,17 +3,17 @@ "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", - "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", "requires": { - "@babel/highlight": "7.0.0-beta.49" + "@babel/highlight": "7.0.0-beta.51" } }, "@babel/highlight": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", - "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -34,9 +34,9 @@ "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=" }, "acorn": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.6.2.tgz", - "integrity": "sha512-zUzo1E5dI2Ey8+82egfnttyMlMZ2y0D8xOCO3PNPPlYXpl8NZvF6Qk9L9BEtJs+43FqEmfBViDqc5d1ckRDguw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-globals": { "version": "4.1.0", @@ -3794,9 +3794,9 @@ } }, "rxjs": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.0.tgz", - "integrity": "sha512-qBzf5uu6eOKiCZuAE0SgZ0/Qp+l54oeVxFfC2t+mJ2SFI6IB8gmMdJHs5DUMu5kqifqcCtsKS2XHjhZu6RKvAw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.1.tgz", + "integrity": "sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==", "requires": { "tslib": "^1.9.0" } @@ -4785,9 +4785,9 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "psl": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.27.tgz", - "integrity": "sha512-J8tJX5tAeEp9tQTI2w2aMZ6V1INuU4JmNaNPRuHAqjjVq3ZJ+jV3+tcT3ncgTnBxvwJy740IB/WZrxFus2VdMA==" + "version": "1.1.28", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.28.tgz", + "integrity": "sha512-+AqO1Ae+N/4r7Rvchrdm432afjT9hqJRyBN3DQv9At0tPz4hIFSGKbq64fN9dVoCow4oggIIax5/iONx0r9hZw==" }, "punycode": { "version": "2.1.1", diff --git a/packages/utils/package-lock.json b/packages/utils/package-lock.json index 7f0e59a24bf..00ded0905cd 100644 --- a/packages/utils/package-lock.json +++ b/packages/utils/package-lock.json @@ -3,17 +3,17 @@ "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz", - "integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", "requires": { - "@babel/highlight": "7.0.0-beta.49" + "@babel/highlight": "7.0.0-beta.51" } }, "@babel/highlight": { - "version": "7.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.49.tgz", - "integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -45,9 +45,9 @@ "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=" }, "acorn": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.6.2.tgz", - "integrity": "sha512-zUzo1E5dI2Ey8+82egfnttyMlMZ2y0D8xOCO3PNPPlYXpl8NZvF6Qk9L9BEtJs+43FqEmfBViDqc5d1ckRDguw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-globals": { "version": "4.1.0", @@ -5261,9 +5261,9 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "psl": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.27.tgz", - "integrity": "sha512-J8tJX5tAeEp9tQTI2w2aMZ6V1INuU4JmNaNPRuHAqjjVq3ZJ+jV3+tcT3ncgTnBxvwJy740IB/WZrxFus2VdMA==" + "version": "1.1.28", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.28.tgz", + "integrity": "sha512-+AqO1Ae+N/4r7Rvchrdm432afjT9hqJRyBN3DQv9At0tPz4hIFSGKbq64fN9dVoCow4oggIIax5/iONx0r9hZw==" }, "punycode": { "version": "2.1.1", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..7e692ad4acb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "allowJs": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true + }, + "include": [ + "packages/**/*.ts" + ], + "exclude": [ + "node_modules/**", + "packages/*/node_modules/**" + ] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000000..0ce40166829 --- /dev/null +++ b/tslint.json @@ -0,0 +1,15 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": {}, + "rulesDirectory": [], + "linterOptions": { + "exclude": [ + "node_modules/**", + "packages/*/node_modules/**" + ] + } +}