Skip to content

Commit

Permalink
fix: remove plural expression
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-bandi committed Feb 19, 2024
1 parent c20b471 commit 4d83242
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions lib/rules/jsx-boolean-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const NEVER = 'never';
* @returns {object} errorData
*/
function getErrorData(propName) {
return { exceptionsMessage: ` for the following props: \`${propName}\`` };
return { exceptionsMessage: ` for the following prop: \`${propName}\`` };
}
/**
* @param {string} configuration
Expand Down Expand Up @@ -56,9 +56,9 @@ function isNever(configuration, exceptions, propName) {
}

const messages = {
omitBoolean: 'Value must be omitted for boolean attributes{{exceptionsMessage}}',
setBoolean: 'Value must be set for boolean attributes{{exceptionsMessage}}',
omitPropAndBoolean: 'Value and Prop must be omitted for false attributes{{exceptionsMessage}}',
omitBoolean: 'Value must be omitted for boolean attribute{{exceptionsMessage}}',
setBoolean: 'Value must be set for boolean attribute{{exceptionsMessage}}',
omitPropAndBoolean: 'Value and prop must be omitted for false attribute{{exceptionsMessage}}',
};

module.exports = {
Expand Down
30 changes: 15 additions & 15 deletions tests/lib/rules/jsx-boolean-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
],
},
Expand All @@ -76,11 +76,11 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `bar`' },
data: { exceptionsMessage: ' for the following prop: `bar`' },
},
],
},
Expand All @@ -90,7 +90,7 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
],
},
Expand All @@ -100,7 +100,7 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
],
},
Expand All @@ -111,7 +111,7 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'setBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
],
},
Expand All @@ -122,11 +122,11 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'setBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
{
messageId: 'setBoolean',
data: { exceptionsMessage: ' for the following props: `bar`' },
data: { exceptionsMessage: ' for the following prop: `bar`' },
},
],
},
Expand All @@ -137,11 +137,11 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitPropAndBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
{
messageId: 'omitPropAndBoolean',
data: { exceptionsMessage: ' for the following props: `bak`' },
data: { exceptionsMessage: ' for the following prop: `bak`' },
},
],
},
Expand All @@ -155,11 +155,11 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitPropAndBoolean',
data: { exceptionsMessage: ' for the following props: `baz`' },
data: { exceptionsMessage: ' for the following prop: `baz`' },
},
{
messageId: 'omitPropAndBoolean',
data: { exceptionsMessage: ' for the following props: `bak`' },
data: { exceptionsMessage: ' for the following prop: `bak`' },
},
],
},
Expand All @@ -170,15 +170,15 @@ ruleTester.run('jsx-boolean-value', rule, {
errors: [
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `foo`' },
data: { exceptionsMessage: ' for the following prop: `foo`' },
},
{
messageId: 'omitBoolean',
data: { exceptionsMessage: ' for the following props: `bar`' },
data: { exceptionsMessage: ' for the following prop: `bar`' },
},
{
messageId: 'setBoolean',
data: { exceptionsMessage: ' for the following props: `baz`' },
data: { exceptionsMessage: ' for the following prop: `baz`' },
},
],
},
Expand Down

0 comments on commit 4d83242

Please sign in to comment.