npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xrmforge/eslint-plugin

v0.3.2

Published

ESLint rules for Dynamics 365 form scripting with XrmForge

Readme

@xrmforge/eslint-plugin

npm version license

D365-specific ESLint rules for Dynamics 365 form scripting with XrmForge. Catches the mistakes a generic TypeScript linter cannot see: deprecated Xrm.Page, raw field/entity strings, magic OptionSet numbers, synchronous Web API calls, and missing error handling in event handlers.

Part of XrmForge. Built for ESLint v9 flat config.


Installation

npm install --save-dev @xrmforge/eslint-plugin eslint

Requirements: ESLint >= 8 (peer dependency; flat config needs ESLint v9).


Setup (flat config)

Add the recommended config to your eslint.config.mjs:

import xrmforge from '@xrmforge/eslint-plugin';

export default [
  xrmforge.configs.recommended,
  // ... your other configs
];

The default export is the plugin object; xrmforge.configs.recommended registers the plugin under the @xrmforge namespace and enables the rules below at their recommended severities.


Rules

| Rule | Recommended | What it catches | |------|-------------|-----------------| | no-xrm-page | error | Deprecated Xrm.Page API. Use formContext from the execution context instead. | | no-sync-webapi | error | Synchronous XMLHttpRequest. Use Xrm.WebApi or fetch() instead. | | no-typegen-import | error | Importing @xrmforge/typegen in browser code (it pulls in Node APIs). Use @xrmforge/helpers. | | no-raw-field-strings | error | Raw string literals in getAttribute() / getControl(). Use a generated Fields enum. | | no-raw-entity-names | error | Raw entity-name string literals in Xrm.WebApi calls. Use the generated EntityNames enum. | | no-raw-select | error | Raw field-name literals in select() / selectExpand(). Use a generated Fields enum. | | no-magic-optionset | warn | Raw numbers in OptionSet comparisons. Use the generated OptionSet const enum. | | require-error-handling | warn | async form event handlers (on*) without try/catch. | | require-namespace | warn | Assigning functions to the global scope. Use module exports with the IIFE bundler. |


Configuring individual rules

Override severities or enable rules not in the recommended set by referencing them under the @xrmforge/ prefix:

import xrmforge from '@xrmforge/eslint-plugin';

export default [
  xrmforge.configs.recommended,
  {
    rules: {
      '@xrmforge/no-magic-optionset': 'error',     // promote from warn to error
      '@xrmforge/require-error-handling': 'off',    // disable for a file group
    },
  },
];

Each rule is also exported individually (noXrmPage, noMagicOptionSet, noSyncWebapi, requireErrorHandling, requireNamespace, noTypegenImport, noRawFieldStrings, noRawEntityNames, noRawSelect) for building a custom config.


Why these rules

XrmForge's premise is that every string referencing a Dataverse resource should come from a generated constant. TypeScript alone cannot enforce that -- getAttribute("naem") is valid TypeScript. These rules close that gap, so the "no raw strings" guarantee holds in practice and not just by convention.

Documentation

Full guide: XrmForge on GitHub.

License

MIT (c) XrmForge Contributors.