@favware/milky-tslint
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -6,10 +6,10 @@ # Change Log | ||
## [1.1.4](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.3...@favware/milky-tslint@1.1.4) (2019-11-25) | ||
## [1.1.5](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.4...@favware/milky-tslint@1.1.5) (2020-01-22) | ||
**Note:** Version bump only for package @favware/milky-tslint | ||
## [1.1.4](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.3...@favware/milky-tslint@1.1.4) (2019-11-25) | ||
**Note:** Version bump only for package @favware/milky-tslint | ||
## [1.1.3](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.2...@favware/milky-tslint@1.1.3) (2019-11-09) | ||
@@ -19,17 +19,8 @@ | ||
## [1.1.2](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.1...@favware/milky-tslint@1.1.2) (2019-10-13) | ||
### Bug Fixes | ||
* completely re-do tsconfig standardized ([9eb030f](https://github.com/favware/node-packages/commit/9eb030fdf1deb75d5ae8b273d0e9c359bcb985a1)) | ||
- completely re-do tsconfig standardized ([9eb030f](https://github.com/favware/node-packages/commit/9eb030fdf1deb75d5ae8b273d0e9c359bcb985a1)) | ||
## [1.1.1](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.1.0...@favware/milky-tslint@1.1.1) (2019-10-13) | ||
@@ -39,17 +30,8 @@ | ||
# [1.1.0](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.0.10...@favware/milky-tslint@1.1.0) (2019-10-13) | ||
### Features | ||
* standardize TS configuration ([47696f4](https://github.com/favware/node-packages/commit/47696f4e1dd2632b305ff9789cdd6c473fa709ca)) | ||
- standardize TS configuration ([47696f4](https://github.com/favware/node-packages/commit/47696f4e1dd2632b305ff9789cdd6c473fa709ca)) | ||
## [1.0.10](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.0.9...@favware/milky-tslint@1.0.10) (2019-09-11) | ||
@@ -59,6 +41,2 @@ | ||
## [1.0.9](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.0.8...@favware/milky-tslint@1.0.9) (2019-09-11) | ||
@@ -68,6 +46,2 @@ | ||
## [1.0.8](https://github.com/favware/node-packages/compare/@favware/milky-tslint@1.0.7...@favware/milky-tslint@1.0.8) (2019-08-21) | ||
@@ -77,11 +51,6 @@ | ||
## 1.0.7 (2019-08-18) | ||
### Reverts | ||
* "ci: another attempt to fix CI config" ([37c385f](https://github.com/favware/node-packages/commit/37c385f)) | ||
- "ci: another attempt to fix CI config" ([37c385f](https://github.com/favware/node-packages/commit/37c385f)) |
@@ -1,3 +0,2 @@ | ||
The MIT License (MIT) | ||
===================== | ||
# The MIT License (MIT) | ||
@@ -25,2 +24,2 @@ Copyright © `2019` `Favware` | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
OTHER DEALINGS IN THE SOFTWARE. |
{ | ||
"name": "@favware/milky-tslint", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "TypeScript linter Gulp plugin, based on gulp-tslint but updated for modernization", | ||
@@ -12,20 +12,2 @@ "author": "@favware", | ||
"homepage": "https://github.com/favware/node-packages/tree/master/packages/milky-tslint#readme", | ||
"scripts": { | ||
"test": "jest", | ||
"lint": "eslint src __tests__ --ext js,ts --fix -c ../../.eslintrc", | ||
"prebuild": "yarn lint && yarn test", | ||
"build": "rollup -c rollup.config.js", | ||
"start": "yarn build -w" | ||
}, | ||
"peerDependencies": { | ||
"tslint": ">=5" | ||
}, | ||
"dependencies": { | ||
"chalk": "^3.0.0", | ||
"map-stream": "^0.0.7", | ||
"moment": "^2.24.0", | ||
"plugin-error": "^1.0.1", | ||
"strict-event-emitter-types": "^2.0.0", | ||
"through": "^2.3.8" | ||
}, | ||
"files": [ | ||
@@ -65,3 +47,3 @@ "dist" | ||
}, | ||
"gitHead": "e73cad43f984fb5ba8730b9bd871d972cce99bf4" | ||
"gitHead": "8e98409c837e5a6882a3e301303136a23db9cd64" | ||
} |
165
README.md
<div align="center"> | ||
<h1> <b><i>DEPRECATED</i></b> | ||
TSLint has been deprecated in favor of ESLint. Please see | ||
<a href="https://github.com/palantir/tslint/issues/4534">this TSLint issue</a> for more information. | ||
</h1> | ||
--- | ||
<p> | ||
@@ -52,18 +62,21 @@ <a href="https://favware.tech/milkylint"><img src="https://storage.googleapis.com/data-sunlight-146313.appspot.com/website-project-icons/milkylint.png" height="200" alt="logo"/></a> | ||
```js | ||
const tslint = require("tslint"); | ||
const tslint = require('tslint'); | ||
const ts = require('typescript'); | ||
const {milkyLint, milkyReport} = require("milky-tslint"); | ||
const { milkyLint, milkyReport } = require('milky-tslint'); | ||
gulp.task("lint", () => { | ||
const lintProgram = tslint.Linter.createProgram('./tsconfig.json', '.'); | ||
ts.getPreEmitDiagnostics(lintProgram); | ||
gulp.task('lint', () => { | ||
const lintProgram = tslint.Linter.createProgram('./tsconfig.json', '.'); | ||
ts.getPreEmitDiagnostics(lintProgram); | ||
return gulp.src(tsSource) | ||
.pipe(milkyLint({ | ||
formatter: 'stylish', | ||
program: lintProgram, | ||
tslint: tslint, | ||
fix: !!argv.fix, | ||
})) | ||
.pipe(milkyReport()); | ||
return gulp | ||
.src(tsSource) | ||
.pipe( | ||
milkyLint({ | ||
formatter: 'stylish', | ||
program: lintProgram, | ||
tslint: tslint, | ||
fix: !!argv.fix | ||
}) | ||
) | ||
.pipe(milkyReport()); | ||
}); | ||
@@ -101,2 +114,3 @@ ``` | ||
If there is at least one failure a PluginError is emitted after execution of the reporters: | ||
```javascript | ||
@@ -109,16 +123,21 @@ [gulp] Error in plugin 'milky-tslint': Failed to lint: input.ts | ||
```js | ||
gulp.task("lint-noerroremit", () => { | ||
const lintProgram = tslint.Linter.createProgram('./tsconfig.json', '.'); | ||
ts.getPreEmitDiagnostics(lintProgram); | ||
gulp.task('lint-noerroremit', () => { | ||
const lintProgram = tslint.Linter.createProgram('./tsconfig.json', '.'); | ||
ts.getPreEmitDiagnostics(lintProgram); | ||
return gulp.src(tsSource) | ||
.pipe(milkyLint({ | ||
formatter: 'stylish', | ||
program: lintProgram, | ||
tslint: tslint, | ||
fix: !!argv.fix, | ||
})) | ||
.pipe(milkyReport({ | ||
emitError: false | ||
})); | ||
return gulp | ||
.src(tsSource) | ||
.pipe( | ||
milkyLint({ | ||
formatter: 'stylish', | ||
program: lintProgram, | ||
tslint: tslint, | ||
fix: !!argv.fix | ||
}) | ||
) | ||
.pipe( | ||
milkyReport({ | ||
emitError: false | ||
}) | ||
); | ||
}); | ||
@@ -128,14 +147,18 @@ ``` | ||
tslint.json can be supplied as a parameter by setting the configuration property. | ||
```js | ||
gulp.task("tslint-json", () => | ||
gulp.src("input.ts") | ||
.pipe(milkyLint({ | ||
configuration: { | ||
rules: { | ||
"class-name": true, | ||
// ... | ||
} | ||
} | ||
})) | ||
.pipe(milkyReport.report()) | ||
gulp.task('tslint-json', () => | ||
gulp | ||
.src('input.ts') | ||
.pipe( | ||
milkyLint({ | ||
configuration: { | ||
rules: { | ||
'class-name': true | ||
// ... | ||
} | ||
} | ||
}) | ||
) | ||
.pipe(milkyReport.report()) | ||
); | ||
@@ -159,10 +182,15 @@ ``` | ||
```js | ||
gulp.task("tslint", () => | ||
gulp.src(["input.ts",]) | ||
.pipe(milkyLint({ | ||
formatter: "prose" | ||
})) | ||
.pipe(milkyReport.report({ | ||
reportLimit: 2 | ||
})) | ||
gulp.task('tslint', () => | ||
gulp | ||
.src(['input.ts']) | ||
.pipe( | ||
milkyLint({ | ||
formatter: 'prose' | ||
}) | ||
) | ||
.pipe( | ||
milkyReport.report({ | ||
reportLimit: 2 | ||
}) | ||
) | ||
); | ||
@@ -173,13 +201,18 @@ ``` | ||
TSLint 5.0 introduced support for a "warning" severity for linting errors. By default, warnings cause `milky-tslint` to emit an error to maintain backwards-compatibility with previous versions. To let the build succeed in the presence of warnings, use the `allowWarnings` report option. | ||
TSLint 5.0 introduced support for a "warning" severity for linting errors. By default, warnings cause `milky-tslint` to emit an error to maintain backwards-compatibility with previous versions. To let the build succeed in the presence of warnings, use the `allowWarnings` report option. | ||
```javascript | ||
gulp.task("tslint", () => | ||
gulp.src("input.ts") | ||
.pipe(milkyLint({ | ||
formatter: "prose" | ||
})) | ||
.pipe(milkyReport.report({ | ||
allowWarnings: true | ||
})) | ||
gulp.task('tslint', () => | ||
gulp | ||
.src('input.ts') | ||
.pipe( | ||
milkyLint({ | ||
formatter: 'prose' | ||
}) | ||
) | ||
.pipe( | ||
milkyReport.report({ | ||
allowWarnings: true | ||
}) | ||
) | ||
); | ||
@@ -192,9 +225,9 @@ ``` | ||
const tslintOptions = { | ||
configuration: {}, | ||
fix: false, | ||
formatter: 'stylish', | ||
formattersDirectory: null, | ||
rulesDirectory: null, | ||
tslint: null, | ||
program: null | ||
configuration: {}, | ||
fix: false, | ||
formatter: 'stylish', | ||
formattersDirectory: null, | ||
rulesDirectory: null, | ||
tslint: null, | ||
program: null | ||
}; | ||
@@ -207,9 +240,9 @@ ``` | ||
const reportOptions = { | ||
emitError: false, | ||
reportLimit: 0, | ||
summarizeFailureOutput: true, | ||
allowWarnings: false | ||
emitError: false, | ||
reportLimit: 0, | ||
summarizeFailureOutput: true, | ||
allowWarnings: false | ||
}; | ||
``` | ||
## [API Documentation](https://favware.github.io/node-packages/modules/_favware_milky_tslint.html) | ||
## [API Documentation](https://favware.github.io/node-packages/modules/_favware_milky_tslint.html) |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
1
241
12178
4
0
2
- Removedchalk@^3.0.0
- Removedmap-stream@^0.0.7
- Removedmoment@^2.24.0
- Removedplugin-error@^1.0.1
- Removedstrict-event-emitter-types@^2.0.0
- Removedthrough@^2.3.8
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removedansi-colors@1.1.0(transitive)
- Removedansi-styles@3.2.14.3.0(transitive)
- Removedansi-wrap@0.1.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbuiltin-modules@1.1.1(transitive)
- Removedchalk@2.4.23.0.0(transitive)
- Removedcolor-convert@1.9.32.0.1(transitive)
- Removedcolor-name@1.1.31.1.4(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddiff@4.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@4.0.1(transitive)
- Removedextend-shallow@3.0.2(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob@7.2.3(transitive)
- Removedhas-flag@3.0.04.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedis-extendable@1.0.1(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedisobject@3.0.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedmap-stream@0.0.7(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedmoment@2.30.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedplugin-error@1.0.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedstrict-event-emitter-types@2.0.0(transitive)
- Removedsupports-color@5.5.07.2.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtslib@1.14.1(transitive)
- Removedtslint@6.1.3(transitive)
- Removedtsutils@2.29.0(transitive)
- Removedtypescript@5.8.2(transitive)
- Removedwrappy@1.0.2(transitive)