canirequire › CommonJS › eslint-config-standard-react
Is eslint-config-standard-react ESM-only? Can you require() it?
JavaScript Standard Style React/JSX support - ESLint Shareable Config
Latest version 13.0.0, published Dec 15, 2022. JSON
CommonJS CommonJS — require() works on every Node.js version
eslint-config-standard-react ships CommonJS only. require("eslint-config-standard-react") works everywhere. import "eslint-config-standard-react" 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 eslint-config-standard-react@13.0.0 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("eslint-config-standard-react") | import "eslint-config-standard-react" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4 | pending | pending |
Install failed in our sandbox: error: ConnectionRefused downloading package manifest eslint-config-standard-react The rows above show what package.json declares.
How to import eslint-config-standard-react
ES modules (import)
import eslintConfigStandardReact from "eslint-config-standard-react";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 eslintConfigStandardReact = require("eslint-config-standard-react");Module format by version
Derived from the type, main and exports fields of every stable release on npm (37 versions; the newest 37 shown).
| Versions | Format | First published |
|---|---|---|
| 1.0.0 – 13.0.0 | CommonJS | Jun 10, 2015 |
Frequently asked
Is eslint-config-standard-react ESM-only?
eslint-config-standard-react@13.0.0 is a CommonJS package. eslint-config-standard-react ships CommonJS only. require("eslint-config-standard-react") works everywhere. import "eslint-config-standard-react" 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 eslint-config-standard-react with ES module syntax?
Yes. import eslintConfigStandardReact from "eslint-config-standard-react" 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 eslint-config-standard-react ship TypeScript types?
No. eslint-config-standard-react 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
- rollup-watch 4.3.1CommonJS
- babel-plugin-external-helpers 6.22.0CommonJS
- vuepress 1.9.10CommonJS
- tslint-loader 3.5.4CommonJS
- ember-cli-htmlbars-inline-precompile 3.0.2CommonJS
- karma-sinon-chai 2.0.2CommonJS
- progress-bar-webpack-plugin 2.1.0CommonJS
- ember-cli-uglify 3.0.0CommonJS