# eslint-plugin/require-meta-type 📝 Require rules to implement a `meta.type` property. 💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets). ESLint v5.9.0 introduces a new `--fix-type` option for the command line interface. This option allows users to filter the type of fixes applied when using `--fix`. Fixes in custom rules will not be applied when using `--fix-type` unless they include a `meta.type` field. ## Rule Details This rule aims to require ESLint rules to have a valid `meta.type` property with one of the following values: - `"problem"` means the rule is identifying code that either will cause an error or may cause a confusing behavior. Developers should consider this a high priority to resolve. - `"suggestion"` means the rule is identifying something that could be done in a better way but no errors will occur if the code isn't changed. - `"layout"` means the rule cares primarily about whitespace, semicolons, commas, and parentheses, all the parts of the program that determine how the code looks rather than how it executes. These rules work on parts of the code that aren't specified in the AST. Examples of **incorrect** code for this rule: ```js /* eslint eslint-plugin/require-meta-type: error */ module.exports = { meta: {}, create(context) { // ... }, }; module.exports = { meta: { type: 'invalid' }, create(context) { // ... }, }; ``` Examples of **correct** code for this rule: ```js /* eslint eslint-plugin/require-meta-type: error */ module.exports = { meta: { type: 'problem' }, create(context) { // ... }, }; ``` ## Further Reading - [ESLint CLI docs: `--fix-type`](https://eslint.org/docs/latest/use/command-line-interface#--fix-type) - [ESLint rule docs: Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure) - [ESLint v5.9.0 released](https://eslint.org/blog/2018/11/eslint-v5.9.0-released#the-fix-type-option)