Registry / devops / easy-code-formatter-styles

easy-code-formatter-styles

JSON →
library1.2.19jsnpmunverified

A library of syntax highlighting themes for the Easy Code Formatter Microsoft Word add-in. Version 1.2.19 provides 35+ TypeScript-defined themes implementing the ITheme interface, including popular styles like Default, Desert, A11YDark, and A11YLight. Released under MIT, updated via automated CI on GitHub. Designed specifically for Office Add-ins (Office JS), not general web use. Alternative to manual CSS theming; focused on Word document code formatting.

npm install easy-code-formatter-styles
INSTALL
IMPORT
SIG · EASY-CODE-FORMATTE
E
easy-code-formatter-styles
devopsjavascriptv1.2.19
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.

DefaultTheme
import { DefaultTheme } from 'easy-code-formatter-styles'
const DefaultTheme = require('easy-code-formatter-styles').DefaultTheme
ESM-only package; CommonJS require will not work.
DesertTheme
import { DesertTheme } from 'easy-code-formatter-styles'
Named export; no default export.
ITheme
import type { ITheme } from 'easy-code-formatter-styles'
import { ITheme } from 'easy-code-formatter-styles'
Use type-only import for TypeScript interfaces to avoid runtime overhead.

Shows importing and instantiating a theme with TypeScript types.

import { DefaultTheme } from 'easy-code-formatter-styles'; import { ITheme } from 'easy-code-formatter-styles'; const theme: ITheme = new DefaultTheme(); console.log(theme.name); // 'Default' console.log(theme.styles); // CSS style object // Use with Easy Code Formatter add-in // const formatted = formatCode(code, theme);
Debug
Known issues
gotchaPackage is ESM-only; CommonJS require will fail with ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import() in Node.js 12+.
affects: >=1.0.0
breakingNo default export exists; only named exports for each theme.
fix
Use named imports: import { ThemeName } from 'easy-code-formatter-styles'.
affects: >=1.0.0
gotchaThemes are not Tree-shakeable if imported as named exports due to package structure.
fix
Only import the themes you need; avoid barrel imports.
affects: >=1.0.0
deprecatedSome themes may be removed or renamed without major version bump (semver not strictly followed).
fix
Pin exact version and test after updates.
affects: >=1.0.0 <2.0.0
Errors
Common errors & fixes
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/index' is not defined by "exports"
Trying to import from a non-exported subpath inside the package.
fix
Import only from the main entry: import { Theme } from 'easy-code-formatter-styles'.
Module not found: Can't resolve 'easy-code-formatter-styles' in ...
Package not installed or not in node_modules.
fix
Run 'npm install easy-code-formatter-styles'.
TypeError: Class extends value undefined is not a constructor or null
Trying to extend a theme class without proper import.
fix
Ensure you import the class correctly: import { DefaultTheme } from 'easy-code-formatter-styles'.
Upgrade
Version history
1.2.19latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
easy-code-formatter-styles — npm install easy-code-formatter-styles · libregistry