Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoRawTextRule schema is missing additionalProperties #367

Open
Dimava opened this issue Apr 22, 2023 · 0 comments
Open

NoRawTextRule schema is missing additionalProperties #367

Dimava opened this issue Apr 22, 2023 · 0 comments

Comments

@Dimava
Copy link

Dimava commented Apr 22, 2023

schema: [
{
type: 'object',
properties: {
attributes: {
type: 'object',
patternProperties: {
'^(?:\\S+|/.*/[a-z]*)$': {
type: 'array',
items: { type: 'string' },
uniqueItems: true
}
},
additionalProperties: false
},
ignoreNodes: {
type: 'array'
},
ignorePattern: {
type: 'string'
},
ignoreText: {
type: 'array'
}
}
}
]

This rule is one of the rules causing type inconsistency for eslint-define-config
eslint-types/eslint-define-config#189

Please fix this by adding either additionalProperties: false or additionalProperties: { type: recordValueType }

export interface NoRawTextRule {
  /**
   * Disallow to string literal in template or JSX.
   *
   * @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
   */
  '@intlify/vue-i18n/no-raw-text': Rule<
    [
      RuleLevel,
      {
        attributes?: {
          /**
           */
          [k: string]: string[];
        };
        ignoreNodes?: any[];
        ignorePattern?: string;
        ignoreText?: any[];
        [k: string]: any; // <-- UNWANTED additionalProperties
      },
    ]
  >;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant