canirequire › CommonJS › tslint-config-prettier
Is tslint-config-prettier ESM-only? Can you require() it?
Do you wanna use tslint and prettier without conflicts? tslint-config-prettier disables all conflicting rules that may cause such problems. Prettier takes care of formatting and tslint the rest.
Last verified Sep 9, 2026 against tslint-config-prettier@1.18.0. JSON
CommonJS CommonJS — require() works on every Node.js version
tslint-config-prettier ships CommonJS only. require("tslint-config-prettier") works everywhere. import "tslint-config-prettier" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
Does tslint-config-prettier@1.18.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("tslint-config-prettier") from a CommonJS file and import "tslint-config-prettier" from an ES module.
| Runtime | require("tslint-config-prettier") | import "tslint-config-prettier" |
|---|---|---|
| Node.js 18 | ✓ works | ✗ failsERR_IMPORT_ASSERTION_TYPE_MISSING |
| Node.js 20 | ✓ works | ✗ failsERR_IMPORT_ASSERTION_TYPE_MISSING |
| Node.js 22 | ✓ works | ✗ failsERR_IMPORT_ATTRIBUTE_MISSING |
| Node.js 24 | ✓ works | ✗ failsERR_IMPORT_ATTRIBUTE_MISSING |
| Node.js 26 | ✓ works | ✗ failsERR_IMPORT_ATTRIBUTE_MISSING |
| Bun 1.4 | ✓ works | ✓ works |
How to import tslint-config-prettier
ES modules (import)
import tslintConfigPrettier from "tslint-config-prettier";Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.
CommonJS (require)
const tslintConfigPrettier = require("tslint-config-prettier");Module format by version
Derived from the type, main and exports fields of every stable release on npm (19 versions; the newest 19 shown).
| Versions | Format | First published |
|---|---|---|
| 1.0.0 – 1.18.0 | CommonJS | Jun 7, 2017 |
Frequently asked
Is tslint-config-prettier ESM-only?
tslint-config-prettier@1.18.0 is a CommonJS package. tslint-config-prettier ships CommonJS only. require("tslint-config-prettier") works everywhere. import "tslint-config-prettier" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
Can I import tslint-config-prettier with ES module syntax?
Yes. import tslintConfigPrettier from "tslint-config-prettier" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.
Does tslint-config-prettier work in Bun?
Yes. import "tslint-config-prettier" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does tslint-config-prettier ship TypeScript types?
No. tslint-config-prettier ships no type declarations and there is no @types package for it.
Links
Other commonjs packages
- debug 4.4.3CommonJS
- semver 7.8.5CommonJS
- ms 2.1.3CommonJS
- picomatch 4.0.7CommonJS
- ajv 8.20.0CommonJS
- source-map 0.8.0CommonJS
- react-is 19.2.8CommonJS
- readable-stream 4.7.0CommonJS
Similar popularity
- babel-helper-vue-jsx-merge-props 2.0.3CommonJS
- cpx 1.5.0CommonJS
- vue-jest 3.0.7CommonJS
- gulp-postcss 10.0.0CommonJS
- karma-cli 2.0.0CommonJS
- unbuild 3.6.1ESM-only
- ember-resolver 13.2.0CommonJS
- ember-cli 7.2.0CommonJS