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

@omnicajs/eslint-plugin-i18n

v0.0.2

Published

OmnicaJS wrapper for @intlify/eslint-plugin-vue-i18n

Readme

@omnicajs/eslint-plugin-i18n

npm version

ESLint plugin that wraps @intlify/eslint-plugin-vue-i18n and adds custom rules.

Description

This package provides:

  • pass-through access to upstream Vue i18n rules;
  • exported config rule ids remapped from the upstream @intlify/vue-i18n/* namespace to @omnicajs/i18n/*;
  • flat shared configs;
  • custom rule valid-message-text with external validator functions.

Installation

Install the plugin and its peer dependencies:

npm install --save-dev eslint @omnicajs/eslint-plugin-i18n @intlify/eslint-plugin-vue-i18n@^4.3.0 jsonc-eslint-parser vue-eslint-parser yaml-eslint-parser

This package is developed against @intlify/eslint-plugin-vue-i18n 4.3.x. See the upstream rule documentation in the Intlify Vue i18n ESLint plugin docs.

Usage

Flat Config (eslint.config.js)

import i18n, { defineValidator } from '@omnicajs/eslint-plugin-i18n'

const noCrmWord = defineValidator(
  'project/no-crm-word',
  await import('/absolute/path/to/validator.js')
)

export default [
  ...i18n.configs.recommended,
  {
    rules: {
      '@omnicajs/i18n/valid-message-text': ['error', {
        validators: {
          ru: [noCrmWord],
        },
        forbid: {
          words: ['forbidden'],
          locales: {
            ru: {
              patterns: ['/test/i'],
            },
          },
        },
      }],
    },
  },
]

Configs

Available exported configs:

  • configs.base
  • configs.recommended
  • configs['flat/base']
  • configs['flat/recommended']

Upstream rule ids in exported configs are rewritten to the local namespace. When using this package, configure upstream Vue i18n rules with @omnicajs/i18n/* rule ids:

export default [
  ...i18n.configs.recommended,
  {
    rules: {
      // Upstream: '@intlify/vue-i18n/no-missing-keys'
      '@omnicajs/i18n/no-missing-keys': 'error',
    },
  },
]

Rule: valid-message-text

@omnicajs/i18n/valid-message-text validates leaf translation messages using custom validator modules.

Rule option shape:

type RuleOptions = [{
  validators?: Record<string, string[]>
  forbid?: {
    words?: string[]
    patterns?: Array<string | RegExp>
    locales?: Record<string, {
      words?: string[]
      patterns?: Array<string | RegExp>
    }>
  }
}]

Load validators with dynamic import in flat config, register them with defineValidator(), and pass the returned string names to rule options:

import i18n, { defineValidator } from '@omnicajs/eslint-plugin-i18n'

const noEmpty = (text) => [
  text.length > 0,
  'Message must not be empty',
]

const noEmptyName = defineValidator('no-empty', noEmpty)
const noCrmName = defineValidator(
  'project/no-crm-word',
  await import('./eslint/validators/no-crm-word.js')
)

export default [
  ...i18n.configs.recommended,
  {
    rules: {
      '@omnicajs/i18n/valid-message-text': ['error', {
        validators: {
          ru_RU: [noEmptyName, noCrmName],
        },
      }],
    },
  },
]

Validator files are not published with this package; pass project-local or package-external validators from your ESLint config.

forbid checks are applied before custom validators. Top-level words and patterns are global; locale-specific checks can be placed under locales:

'@omnicajs/i18n/valid-message-text': ['error', {
  forbid: {
    words: ['CRM'],
    patterns: [/old-term/i],
    locales: {
      es_ES: {
        words: ['asesor'],
      },
    },
  },
}]