Prepare for adding file suffixes

This commit is contained in:
Fedor Indutny
2025-10-16 11:29:11 -07:00
parent 3330dd72ce
commit 3387cf6a77
2095 changed files with 15148 additions and 14629 deletions

View File

@@ -11,17 +11,17 @@ import { readFile } from 'node:fs/promises';
import { join as pathJoin, relative as pathRelative } from 'node:path';
import chalk from 'chalk';
import { deepEqual } from 'node:assert';
import type { Rule } from './utils/rule.js';
import type { Rule } from './utils/rule.std.js';
import icuPrefix from './rules/icuPrefix.js';
import wrapEmoji from './rules/wrapEmoji.js';
import onePlural from './rules/onePlural.js';
import noLegacyVariables from './rules/noLegacyVariables.js';
import noNestedChoice from './rules/noNestedChoice.js';
import noOffset from './rules/noOffset.js';
import noOneChoice from './rules/noOneChoice.js';
import noOrdinal from './rules/noOrdinal.js';
import pluralPound from './rules/pluralPound.js';
import icuPrefix from './rules/icuPrefix.std.js';
import wrapEmoji from './rules/wrapEmoji.std.js';
import onePlural from './rules/onePlural.std.js';
import noLegacyVariables from './rules/noLegacyVariables.std.js';
import noNestedChoice from './rules/noNestedChoice.std.js';
import noOffset from './rules/noOffset.std.js';
import noOneChoice from './rules/noOneChoice.std.js';
import noOrdinal from './rules/noOrdinal.std.js';
import pluralPound from './rules/pluralPound.std.js';
const RULES = [
icuPrefix,

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('icuPrefix', context => {
if (!context.messageId.startsWith('icu:')) {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noLegacyVariables', context => {
return {

View File

@@ -1,8 +1,8 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Element } from '../utils/rule.js';
import { rule } from '../utils/rule.js';
import type { Element } from '../utils/rule.std.js';
import { rule } from '../utils/rule.std.js';
export default rule('noNestedChoice', context => {
let insideChoice = false;

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOffset', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOneChoice', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOrdinal', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('onePlural', context => {
let plurals = 0;

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { PluralElement } from '@formatjs/icu-messageformat-parser';
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('pluralPound', context => {
const stack: Array<PluralElement> = [];

View File

@@ -10,7 +10,7 @@ import {
isTagElement,
isLiteralElement,
} from '@formatjs/icu-messageformat-parser';
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
function isEmojifyTag(
element: MessageFormatElement | null

View File

@@ -5,8 +5,8 @@ import type {
MessageFormatElement,
Location,
} from '@formatjs/icu-messageformat-parser';
import type { Visitor } from './traverse.js';
import { traverse } from './traverse.js';
import type { Visitor } from './traverse.std.js';
import { traverse } from './traverse.std.js';
export type Element = MessageFormatElement;
export type { Location };