@bleedingdev/modern-js-code-tools 3.8.3-ultramodern.1 → 3.8.3-ultramodern.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,7 @@ const createNoManualLocaleCopyBranchingRule = ()=>({
54
54
  const reportBranch = (node, text)=>{
55
55
  context.report({
56
56
  node,
57
- message: `Move locale-specific copy branch to i18n resources: ${JSON.stringify(normalizeVisibleText(text))}`
57
+ message: `Move locale-specific copy branch to i18n resources: ${JSON.stringify((0, external_ast_cjs_namespaceObject.normalizeVisibleText)(text))}`
58
58
  });
59
59
  };
60
60
  return {
@@ -64,8 +64,8 @@ const createNoManualLocaleCopyBranchingRule = ()=>({
64
64
  node.consequent,
65
65
  node.alternate
66
66
  ]){
67
- const text = expressionStringValue(branch);
68
- if (text && hasLetters(text) && !isAllowedBranchLiteral(text.trim())) reportBranch(branch, text);
67
+ const text = (0, external_ast_cjs_namespaceObject.expressionStringValue)(branch);
68
+ if (text && (0, external_ast_cjs_namespaceObject.hasLetters)(text) && !isAllowedBranchLiteral(text.trim())) reportBranch(branch, text);
69
69
  }
70
70
  }
71
71
  };
@@ -1,4 +1,4 @@
1
- import { getSourceText } from "../ast.js";
1
+ import { expressionStringValue, getSourceText, hasLetters, normalizeVisibleText } from "../ast.js";
2
2
  const looksLikeLocaleTest = (context, node)=>{
3
3
  const text = getSourceText(context, node);
4
4
  return /\b(?:language|locale|lng|currentLanguage)\b/u.test(text) && /(?:={2,3}|!==?|\.\s*startsWith\s*\()/u.test(text) && /['"][a-z]{2}(?:-[A-Za-z0-9]+)?['"]/u.test(text);
@@ -1,5 +1,5 @@
1
1
  import "node:module";
2
- import { getSourceText } from "../ast.js";
2
+ import { expressionStringValue, getSourceText, hasLetters, normalizeVisibleText } from "../ast.js";
3
3
  const looksLikeLocaleTest = (context, node)=>{
4
4
  const text = getSourceText(context, node);
5
5
  return /\b(?:language|locale|lng|currentLanguage)\b/u.test(text) && /(?:={2,3}|!==?|\.\s*startsWith\s*\()/u.test(text) && /['"][a-z]{2}(?:-[A-Za-z0-9]+)?['"]/u.test(text);
@@ -1,3 +1,3 @@
1
- export { runSingleAppI18nCheck } from './cli/i18n-check';
2
- export { runWorkspaceSourceCheck, type WorkspaceSourceCheckOptions, } from './cli/workspace-source-check';
3
- export { default as oxlintPlugin } from './oxlint-plugin';
1
+ export { runSingleAppI18nCheck } from './cli/i18n-check.js';
2
+ export { runWorkspaceSourceCheck, type WorkspaceSourceCheckOptions, } from './cli/workspace-source-check.js';
3
+ export { default as oxlintPlugin } from './oxlint-plugin.js';
@@ -1,4 +1,4 @@
1
- import type { AstNode, CommonRuleOptions, RuleContext } from './types.ts';
1
+ import type { AstNode, CommonRuleOptions, RuleContext } from './types.js';
2
2
  export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
3
3
  export declare const asStringArray: (value: unknown, fallback: readonly string[]) => readonly string[];
4
4
  export declare const normalizeVisibleText: (value: string) => string;
@@ -1,4 +1,4 @@
1
- import type { AttributeRuleOptions, CommonRuleOptions, RuleContext, SplitTranslationKeyRuleOptions } from './types.ts';
1
+ import type { AttributeRuleOptions, CommonRuleOptions, RuleContext, SplitTranslationKeyRuleOptions } from './types.js';
2
2
  export declare const commonOptionsSchema: {
3
3
  type: string;
4
4
  properties: {
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createNoHardcodedJsxTextRule: () => Rule;
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createNoLegacyMfBoundaryAttributesRule: () => Rule;
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createNoLiteralVisibleJsxAttributesRule: () => Rule;
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createNoManualLocaleCopyBranchingRule: () => Rule;
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createNoSplitTranslationKeysRule: () => Rule;
@@ -1,2 +1,2 @@
1
- import type { Rule } from '../types.ts';
1
+ import type { Rule } from '../types.js';
2
2
  export declare const createStrictEffectApiBoundariesRule: () => Rule;
@@ -1,12 +1,12 @@
1
- export * from './oxlint-plugin/ast.ts';
2
- export * from './oxlint-plugin/options.ts';
3
- export * from './oxlint-plugin/rules/no-hardcoded-jsx-text.ts';
4
- export * from './oxlint-plugin/rules/no-legacy-mf-boundary-attributes.ts';
5
- export * from './oxlint-plugin/rules/no-literal-visible-jsx-attributes.ts';
6
- export * from './oxlint-plugin/rules/no-manual-locale-copy-branching.ts';
7
- export * from './oxlint-plugin/rules/no-split-translation-keys.ts';
8
- export * from './oxlint-plugin/rules/strict-effect-api-boundaries.ts';
9
- export * from './oxlint-plugin/types.ts';
1
+ export * from './oxlint-plugin/ast.js';
2
+ export * from './oxlint-plugin/options.js';
3
+ export * from './oxlint-plugin/rules/no-hardcoded-jsx-text.js';
4
+ export * from './oxlint-plugin/rules/no-legacy-mf-boundary-attributes.js';
5
+ export * from './oxlint-plugin/rules/no-literal-visible-jsx-attributes.js';
6
+ export * from './oxlint-plugin/rules/no-manual-locale-copy-branching.js';
7
+ export * from './oxlint-plugin/rules/no-split-translation-keys.js';
8
+ export * from './oxlint-plugin/rules/strict-effect-api-boundaries.js';
9
+ export * from './oxlint-plugin/types.js';
10
10
  declare const plugin: {
11
11
  meta: {
12
12
  name: string;
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "engines": {
24
24
  "node": ">=20"
25
25
  },
26
- "version": "3.8.3-ultramodern.1",
26
+ "version": "3.8.3-ultramodern.2",
27
27
  "types": "./dist/types/index.d.ts",
28
28
  "main": "./dist/esm-node/index.js",
29
29
  "typesVersions": {
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "modern:source": "./src/index.ts",
74
74
  "scripts": {
75
- "build": "rm -rf dist && rslib build -c rslib.config.mts && pnpm -w tsgo:dts \"$PWD\"",
75
+ "build": "rm -rf dist && rslib build -c rslib.config.mts",
76
76
  "dev": "rslib build -c rslib.config.mts -w",
77
77
  "test": "rstest --passWithNoTests"
78
78
  }