What rule do you want to change?
Every rule
What change do you want to make?
N/A
How do you think the change should be implemented?
Other
Example code
meta: {
type: "problem",
docs: {
description: "Disallow HTML tags",
},
messages: {
disallowedElement: 'HTML element "{{name}}" is not allowed.',
},
schema: [
{
type: "object",
properties: {
allowed: {
type: "array",
items: {
type: "string",
},
uniqueItems: true,
},
},
additionalProperties: false,
},
],
},
What does the rule currently do for this code?
Currently, none of the rules have the language or dialects fields in their meta.
I noticed that all new rules added to ESLint for TypeScript support now include the language and dialects fields:
https://github.com/eslint/eslint/pull/19562/files#diff-d46d32957ba664c4b406c7587c5e047ab7f719ea98a597e0316837d61be4fc48R150-R151
Like we did for JavaScript, I’d like to suggest adding the language and dialects fields to meta as well.
What will the rule do after it's changed?
I think we could add them like this:
meta: {
// ...
language: 'markdown',
dialects: ['commonmark', 'gfm'],
// ...
}
The language field should be 'markdown', and the dialects can be 'commonmark' and 'gfm'.
Participation
Additional comments
No response
What rule do you want to change?
Every rule
What change do you want to make?
N/A
How do you think the change should be implemented?
Other
Example code
meta: { type: "problem", docs: { description: "Disallow HTML tags", }, messages: { disallowedElement: 'HTML element "{{name}}" is not allowed.', }, schema: [ { type: "object", properties: { allowed: { type: "array", items: { type: "string", }, uniqueItems: true, }, }, additionalProperties: false, }, ], },What does the rule currently do for this code?
Currently, none of the rules have the
languageordialectsfields in theirmeta.I noticed that all new rules added to ESLint for TypeScript support now include the
languageanddialectsfields:https://github.com/eslint/eslint/pull/19562/files#diff-d46d32957ba664c4b406c7587c5e047ab7f719ea98a597e0316837d61be4fc48R150-R151
Like we did for JavaScript, I’d like to suggest adding the
languageanddialectsfields tometaas well.What will the rule do after it's changed?
I think we could add them like this:
The
languagefield should be'markdown', and thedialectscan be'commonmark'and'gfm'.Participation
Additional comments
No response