Registry / devops / ionic-gulp-tslint

ionic-gulp-tslint

JSON →
library1.1.0jsnpmunverified

A Gulp task wrapper for linting TypeScript files in Ionic projects using TSLint. This package (v1.1.0) simplifies integrating TSLint into an Ionic build pipeline. It exposes a single function accepting options for source globs, TSLint configuration, reporter type, and reporter options. The release cadence is low; no updates since 2016. Compared to using gulp-tslint directly, this package provides Ionic-specific defaults like 'app/**/*.ts', but is largely unnecessary as it tightly couples to an older Ionic toolchain. Note that TSLint itself is deprecated in favor of ESLint with TypeScript plugins, and this package has no active maintenance.

npm install ionic-gulp-tslint
INSTALL
IMPORT
SIG · IONIC-GULP-TSLINT
I
ionic-gulp-tslint
devopsjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tslint
const tslint = require('ionic-gulp-tslint');
import { tslint } from 'ionic-gulp-tslint';
This package exports a single function as default. ESM import style (import tslint from 'ionic-gulp-tslint') may work if bundler supports CJS interop, but it's primarily CommonJS.
default
import tslint from 'ionic-gulp-tslint';
const { tslint } = require('ionic-gulp-tslint');
Named import with braces will break because the module exports a single function, not an object with tslint property.
tslint.default
const tslint = require('ionic-gulp-tslint').default;
const tslint = require('ionic-gulp-tslint').tslint;
If using TypeScript with esModuleInterop, the default export is available as .default.

Shows how to define a Gulp task that lints TypeScript files using the default tslint function with custom source and configuration.

const gulp = require('gulp'); const tslint = require('ionic-gulp-tslint'); gulp.task('lint', function () { return tslint({ src: 'app/**/*.ts', tslintOptions: { configuration: 'tslint.json' }, reporter: 'verbose', reportOptions: { emitError: true } }); });
Debug
Known issues
deprecatedTSLint is deprecated in favor of ESLint with TypeScript support.
fix
Migrate to ESLint with @typescript-eslint/parser and @typescript-eslint/eslint-plugin. Use community Gulp plugins like gulp-eslint.
affects: >=0.0.0
breakingPackage relies on deprecated gulp-tslint v4.x which has breaking changes in options structure compared to earlier versions.
fix
Refer to gulp-tslint documentation: reporter property is a string, reportOptions object. Also ensure tslintOptions fields match expected.
affects: 1.0.0 - 1.1.0
breakingDefault glob 'app/**/*.ts' may not match your project structure if files are elsewhere (e.g., src/).
fix
Explicitly set the src option to match your TypeScript files.
affects: >=1.0.0
gotchaThe tslint option inside tslintOptions is not used; the Linter instance is controlled by gulp-tslint.
fix
Omit the tslint option; it's ignored. Use configuration and rulesDirectory only.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: tslint is not a function
Importing using require('ionic-gulp-tslint').tslint instead of require('ionic-gulp-tslint').
fix
Use const tslint = require('ionic-gulp-tslint');
Error: Cannot find module 'tslint'
Missing tslint dependency.
fix
Install tslint: npm install tslint --save-dev
Error: Invalid reporter 'prose'
gulp-tslint does not support 'prose' reporter; it was removed.
fix
Use 'verbose', 'json', 'full', or 'msbuild'.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
gulp-tslintrequiredCore dependency for running TSLint in Gulp
tslintoptionalLinter engine, must be installed separately
Agent activity
9 hits · last 30 days
node
8
Perplexity
1
Resources
ionic-gulp-tslint — npm install ionic-gulp-tslint · libregistry