Socket
Socket
Sign inDemoInstall

gulp-tslint

Package Overview
Dependencies
58
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.3.5 to 5.0.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="5.0.0"></a>
# 5.0.0 (2016-04-24)
## Changes
- support for extends property
<a name="4.3.0"></a>

@@ -2,0 +9,0 @@ # 4.3.0 (2016-01-11)

0

index.d.ts

@@ -0,0 +0,0 @@ export interface PluginOptions {

54

index.js

@@ -11,8 +11,6 @@ /*jshint node:true */

var map = require("map-stream");
// Load rc configs
var Rcloader = require("rcloader");
/**
* Helper function to check if a value is a function
* @param {any} value to check whether or not it is a function.
* @returns {boolean} Returns true if the value is a function.
* @param {any} value to check whether or not it is a function
* @returns {boolean} Returns true if the value is a function
*/

@@ -23,2 +21,10 @@ function isFunction(value) {

/**
* Helper function to check if a value is a string
* @param {any} value to check whether or not it is a string
* @returns {boolean} Returns true if the value is a string
*/
function isString(value) {
return Object.prototype.toString.call(value) === "[object String]";
}
/**
* Returns the TSLint from the options, or if not set, the default TSLint.

@@ -72,4 +78,2 @@ * @param {PluginOptions} options

}
// Create rcloader to load tslint.json
loader = new Rcloader("tslint.json", pluginOptions.configuration);
return map(function (file, cb) {

@@ -84,21 +88,21 @@ // Skip

}
// Finds the config file closest to the linted file
loader.for(file.path, function (error, fileOptions) {
// TSLint default options
var options = {
configuration: fileOptions,
formatter: "json",
// not used, use reporters instead
formattersDirectory: null,
rulesDirectory: pluginOptions.rulesDirectory || null
};
if (error) {
return cb(error, undefined);
}
var linter = getTslint(pluginOptions);
tslint = new linter(file.relative, file.contents.toString("utf8"), options);
file.tslint = tslint.lint();
// Pass file
cb(null, file);
});
// TSLint default options
var options = {
configuration: pluginOptions.configuration,
formatter: "json",
// not used, use reporters instead
formattersDirectory: null,
rulesDirectory: pluginOptions.rulesDirectory || null
};
var linter = getTslint(pluginOptions);
if (pluginOptions.configuration === null ||
pluginOptions.configuration === undefined
|| isString(pluginOptions.configuration)) {
// configuration can be a file path or null, if it's unknown
options.configuration = linter.findConfiguration(pluginOptions.configuration || null, file.path);
}
tslint = new linter(file.relative, file.contents.toString("utf8"), options);
file.tslint = tslint.lint();
// Pass file
cb(null, file);
});

@@ -105,0 +109,0 @@ };

{
"name": "gulp-tslint",
"preferGlobal": false,
"version": "4.3.5",
"version": "5.0.0",
"author": "Panu Horsmalahti <panu.horsmalahti@iki.fi>",

@@ -32,3 +32,2 @@ "description": "TypeScript linter Gulp plugin",

"map-stream": "~0.1.0",
"rcloader": "~0.2.0",
"through": "~2.3.8"

@@ -40,3 +39,3 @@ },

"gulp-concat": "^2.6.0",
"gulp-typescript": "^2.11.0",
"gulp-typescript": "^2.13.0",
"tslint": "^3",

@@ -46,3 +45,3 @@ "typescript": "latest"

"peerDependencies": {
"tslint": "^3 || >=3.1.0-dev || >=3.2.0-dev || >=3.2.1-dev || >= 3.2.2-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev"
"tslint": "^3.7.3 || 3.7.0-dev.5 || >=3.8.0-dev || >=3.9.0-dev || >=3.10.0-dev || >=3.11.0-dev"
},

@@ -49,0 +48,0 @@ "license": "MIT",

@@ -121,2 +121,12 @@ gulp-tslint

You can also supply a file path to the configuration option, and the file name
doesn't need to be tslint.json.
```javascript
.pipe(tslint({
// contains rules in the tslint.json format
configuration: "source/settings.json"
}))
```
Report limits

@@ -123,0 +133,0 @@ -------------

@@ -10,2 +10,3 @@ {

"noImplicitAny": true,
"removeComments": false,
"outDir": ".",

@@ -12,0 +13,0 @@ "rootDir": ".",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc