Registry / testing / tslint-config-prettier

tslint-config-prettier

JSON →
library1.18.0jsnpmunverified

tslint-config-prettier is a shareable TSLint configuration that disables all TSLint rules that conflict with Prettier, allowing you to use both tools together without clashes. Version 1.18.0 is the latest stable release, actively maintained until TSLint's deprecation. It bundles a CLI checker to identify conflicting rules in your config. It supports multiple TSLint rule set extensions including codelyzer, tslint-consistent-codestyle, tslint-eslint-rules, tslint-immutable, tslint-microsoft-contrib, and tslint-react. It is deprecated in favor of using ESLint with @typescript-eslint and eslint-config-prettier.

npm install tslint-config-prettier
INSTALL
IMPORT
SIG · TSLINT-CONFIG-PRET
T
tslint-config-prettier
testingjavascriptv1.18.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

tslint-config-prettier
// In tslint.json { "extends": ["tslint-config-prettier"] }
Using `require('tslint-config-prettier')` in JavaScript file instead of extending in tslint.json
This is not a JavaScript import; it's a configuration extension. Place it last in the extends array.
tslint-config-prettier-check
npx tslint-config-prettier-check ./tslint.json
Running `tslint-config-prettier` without arguments or with wrong path
CLI tool that checks for conflicting rules; requires tslint installed.

Install tslint and tslint-config-prettier, then extend your tslint.json placing tslint-config-prettier last.

// Install npm install --save-dev tslint tslint-config-prettier // tslint.json { "extends": [ "tslint:recommended", "tslint-config-prettier" ] }
tslint-config-prettier --version
Debug
Known issues
deprecatedtslint is deprecated; TSLint is no longer maintained. Use ESLint with @typescript-eslint instead.
fix
Migrate from TSLint to ESLint. Consider using eslint-config-prettier.
affects: >=0.0.0
gotchatslint-config-prettier must be the last extension in the "extends" array to properly override conflicting rules.
fix
Ensure the extends array ends with "tslint-config-prettier".
affects: >=1.0.0
gotchaThe CLI checker `tslint-config-prettier-check` requires tslint to be installed as a peer dependency.
fix
Install tslint: npm install --save-dev tslint
affects: >=1.11.0
Errors
Common errors & fixes
Error: Cannot find module 'tslint'
tslint is not installed as a peer dependency
fix
Run npm install --save-dev tslint
tslint-config-prettier-check: No rules found
Path to tslint.json is incorrect or file doesn't exist
fix
Verify the path: npx tslint-config-prettier-check ./tslint.json
Upgrade
Version history
1.18.0latest on npm
Audit
Dependencies
tslintrequiredpeer dependency required to work; tslint must be installed separately
Agent activity
6 hits · last 30 days
node
6
Resources
tslint-config-prettier — npm install tslint-config-prettier · libregistry