Registry / testing / tslint-ionic-rules

tslint-ionic-rules

JSON →
library0.0.21jsnpmunverified

Package of TSLint rules for Ionic Angular projects. Current version 0.0.21, last release Feb 2022. Provides two preset configurations: base and strict. Requires TSLint ^5.1.0 and TypeScript ^2.1.0 || ^3.0.0. Note: TSLint is deprecated in favor of ESLint; this package is no longer maintained for new projects.

npm install tslint-ionic-rules
INSTALL
IMPORT
SIG · TSLINT-IONIC-RULES
T
tslint-ionic-rules
testingjavascriptv0.0.21
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.

extends
✓ // in tslint.json { "extends": "tslint-ionic-rules" }
✗ // using non-existent path { "extends": "tslint-ionic-rules/base" }
The package exports two presets: 'tslint-ionic-rules' (base) and 'tslint-ionic-rules/strict'. Do not add '/base'.
extends (strict)
✓ // in tslint.json { "extends": "tslint-ionic-rules/strict" }
✗ // using 'strict' as a separate config key { "extends": "tslint-ionic-rules", "rulesDirectory": ["strict"] }
Use the '/strict' path suffix to enable the strict preset.
npm install
✓ npm i -D tslint-ionic-rules
✗ npm install tslint-ionic-rules --save
This is a dev dependency; use --save-dev to avoid production installs.

Installs the package with TSLint and TypeScript, configures tslint.json to use the strict preset, and runs the linter.

// 1. Install dependencies npm i -D tslint-ionic-rules tslint typescript // 2. Create tslint.json with: { "extends": "tslint-ionic-rules/strict", "rules": { "no-console": [true, "log", "error"] } } // 3. Run lint npx tslint -p tsconfig.json
Debug
Known issues
deprecatedTSLint is deprecated; use ESLint with @typescript-eslint instead.
fix
Migrate to ESLint using the Angular ESLint schematic: ng add @angular-eslint/schematics
affects: >=0.0.0
breakingRequires TypeScript 2.1.0 to 3.x; incompatible with TypeScript >=4.0.
fix
Downgrade TypeScript to ^3.0.0 or migrate to ESLint-based rules.
affects: >=0.0.0
gotchaThe base preset extends 'tslint:recommended'. Custom rules may conflict with other rulesets.
fix
Review the full rules list at node_modules/tslint-ionic-rules/tslint.js before combining with other configs.
affects: >=0.0.0
deprecatedPackage is unmaintained since 2019 (last commit Feb 2022).
fix
Use @ionic/eslint-config or ESLint with Angular preset.
affects: >=0.0.0
Errors
Common errors & fixes
Could not find rule: 'ionic-rule-name'
The rule name does not exist; typo or wrong preset path.
fix
Use 'extends': 'tslint-ionic-rules/strict' and verify rule names from the source.
Cannot find module 'tslint-ionic-rules'
Package not installed or missing from node_modules.
fix
Run 'npm i -D tslint-ionic-rules' and ensure tslint.json is in the project root.
Upgrade
Version history
0.0.21latest on npm
Audit
Dependencies
tslintrequiredPeer dependency required to resolve rules
typescriptrequiredPeer dependency required for TypeScript version compatibility
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
tslint-ionic-rules — npm install tslint-ionic-rules · libregistry