Skip to content

Commit a1308db

Browse files
committed
refacror: function renamed
1 parent 6e01ba8 commit a1308db

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/cjs/rules/exportPrivateDeclareRule.cts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Rule } from "eslint";
22
import type * as ESTree from "estree";
33

4-
function exportRestrictFixer<T>(
4+
function exportPrivateFixer<T>(
55
fixer: Rule.RuleFixer,
66
targetNode: Rule.Node,
77
hint: {
@@ -41,7 +41,7 @@ function exportRestrictFixer<T>(
4141
return { range: [0, 0], text: "" };
4242
}
4343

44-
const exportRestrictRule: Rule.RuleModule = {
44+
const exportPrivateRule: Rule.RuleModule = {
4545
meta: {
4646
type: "problem",
4747
docs: {
@@ -245,7 +245,7 @@ const exportRestrictRule: Rule.RuleModule = {
245245
loc: declaration.loc,
246246
message: `private function ${declaration.id.name} cannot export`,
247247
fix: (fixer) =>
248-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
248+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
249249
declaration,
250250
}),
251251
});
@@ -254,7 +254,7 @@ const exportRestrictRule: Rule.RuleModule = {
254254
loc: declaration.loc,
255255
message: `private class ${declaration.id.name} cannot export`,
256256
fix: (fixer) =>
257-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
257+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
258258
declaration,
259259
}),
260260
});
@@ -272,7 +272,7 @@ const exportRestrictRule: Rule.RuleModule = {
272272
variableIdentifiers.length === 1 ? variableIdentifiers.map((id) => id.name).toString() + " " : ""
273273
}cannot export`,
274274
fix: (fixer) =>
275-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
275+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
276276
declaration,
277277
}),
278278
});
@@ -329,7 +329,7 @@ const exportRestrictRule: Rule.RuleModule = {
329329
names.length === 1 ? names.map((name) => name).toString() + " " : ""
330330
}cannot export`,
331331
fix: (fixer) =>
332-
exportRestrictFixer<typeof type>(fixer, node, {
332+
exportPrivateFixer<typeof type>(fixer, node, {
333333
identifier,
334334
}),
335335
});
@@ -339,4 +339,4 @@ const exportRestrictRule: Rule.RuleModule = {
339339
},
340340
};
341341

342-
module.exports = exportRestrictRule;
342+
module.exports = exportPrivateRule;

src/esm/index.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { exportRestrictRule } from "./rules/exportPrivateDeclareRule.mjs";
1+
import { exportPrivateRule } from "./rules/exportPrivateDeclareRule.mjs";
22

33
export default {
4-
rules: { "no-export-private-declare": exportRestrictRule },
4+
rules: { "no-export-private-declare": exportPrivateRule },
55
};

src/esm/rules/exportPrivateDeclareRule.mts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Rule } from "eslint";
22
import type * as ESTree from "estree";
33

4-
function exportRestrictFixer<T>(
4+
function exportPrivateFixer<T>(
55
fixer: Rule.RuleFixer,
66
targetNode: Rule.Node,
77
hint: {
@@ -41,7 +41,7 @@ function exportRestrictFixer<T>(
4141
return { range: [0, 0], text: "" };
4242
}
4343

44-
const exportRestrictRule: Rule.RuleModule = {
44+
const exportPrivateRule: Rule.RuleModule = {
4545
meta: {
4646
type: "problem",
4747
docs: {
@@ -245,7 +245,7 @@ const exportRestrictRule: Rule.RuleModule = {
245245
loc: declaration.loc,
246246
message: `private function ${declaration.id.name} cannot export`,
247247
fix: (fixer) =>
248-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
248+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
249249
declaration,
250250
}),
251251
});
@@ -254,7 +254,7 @@ const exportRestrictRule: Rule.RuleModule = {
254254
loc: declaration.loc,
255255
message: `private class ${declaration.id.name} cannot export`,
256256
fix: (fixer) =>
257-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
257+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
258258
declaration,
259259
}),
260260
});
@@ -272,7 +272,7 @@ const exportRestrictRule: Rule.RuleModule = {
272272
variableIdentifiers.length === 1 ? variableIdentifiers.map((id) => id.name).toString() + " " : ""
273273
}cannot export`,
274274
fix: (fixer) =>
275-
exportRestrictFixer<typeof declaration.type>(fixer, node, {
275+
exportPrivateFixer<typeof declaration.type>(fixer, node, {
276276
declaration,
277277
}),
278278
});
@@ -329,7 +329,7 @@ const exportRestrictRule: Rule.RuleModule = {
329329
names.length === 1 ? names.map((name) => name).toString() + " " : ""
330330
}cannot export`,
331331
fix: (fixer) =>
332-
exportRestrictFixer<typeof type>(fixer, node, {
332+
exportPrivateFixer<typeof type>(fixer, node, {
333333
identifier,
334334
}),
335335
});
@@ -339,4 +339,4 @@ const exportRestrictRule: Rule.RuleModule = {
339339
},
340340
};
341341

342-
export { exportRestrictRule };
342+
export { exportPrivateRule };

0 commit comments

Comments
 (0)