Skip to content

Instantly share code, notes, and snippets.

View bjorn2404's full-sized avatar

Björn Holine bjorn2404

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active March 28, 2024 21:06
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@edelabar
edelabar / bourbon-neat-bitters-and-gist-widgets.css
Created September 4, 2014 13:44
CSS to Fix Gist Embed with Bourbon, Neat, and Bitters
// Fix gist widget displays
.gist table {
table-layout: auto;
margin: 0;
}
@Rarst
Rarst / deprecated.md
Last active February 21, 2023 11:21
WordPress coding standards configuration for PhpStorm

Now Native

PhpStorm now bundles WordPress coding style natively, starting from version 8.

  1. Go to Project Settings > Code Style > PHP.
  2. Select Set From... (top right of window) > Predefined Style > WordPress.

No longer need to muck with this import! :)