New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@favware/milky-tslint

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@favware/milky-tslint - npm Package Compare versions

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"
}
<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)