[d565449] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | /* eslint consistent-return: 0 -- no default case */
|
---|
| 4 |
|
---|
| 5 | const messages = {
|
---|
| 6 |
|
---|
| 7 | env: `
|
---|
| 8 | A config object is using the "env" key, which is not supported in flat config system.
|
---|
| 9 |
|
---|
| 10 | Flat config uses "languageOptions.globals" to define global variables for your files.
|
---|
| 11 |
|
---|
| 12 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 13 | https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
---|
| 14 | `,
|
---|
| 15 |
|
---|
| 16 | extends: `
|
---|
| 17 | A config object is using the "extends" key, which is not supported in flat config system.
|
---|
| 18 |
|
---|
| 19 | Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
|
---|
| 20 |
|
---|
| 21 | Please see the following page for more information:
|
---|
| 22 | https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
|
---|
| 23 | `,
|
---|
| 24 |
|
---|
| 25 | globals: `
|
---|
| 26 | A config object is using the "globals" key, which is not supported in flat config system.
|
---|
| 27 |
|
---|
| 28 | Flat config uses "languageOptions.globals" to define global variables for your files.
|
---|
| 29 |
|
---|
| 30 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 31 | https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
---|
| 32 | `,
|
---|
| 33 |
|
---|
| 34 | ignorePatterns: `
|
---|
| 35 | A config object is using the "ignorePatterns" key, which is not supported in flat config system.
|
---|
| 36 |
|
---|
| 37 | Flat config uses "ignores" to specify files to ignore.
|
---|
| 38 |
|
---|
| 39 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 40 | https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
|
---|
| 41 | `,
|
---|
| 42 |
|
---|
| 43 | noInlineConfig: `
|
---|
| 44 | A config object is using the "noInlineConfig" key, which is not supported in flat config system.
|
---|
| 45 |
|
---|
| 46 | Flat config uses "linterOptions.noInlineConfig" to specify files to ignore.
|
---|
| 47 |
|
---|
| 48 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 49 | https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
|
---|
| 50 | `,
|
---|
| 51 |
|
---|
| 52 | overrides: `
|
---|
| 53 | A config object is using the "overrides" key, which is not supported in flat config system.
|
---|
| 54 |
|
---|
| 55 | Flat config is an array that acts like the eslintrc "overrides" array.
|
---|
| 56 |
|
---|
| 57 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 58 | https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
|
---|
| 59 | `,
|
---|
| 60 |
|
---|
| 61 | parser: `
|
---|
| 62 | A config object is using the "parser" key, which is not supported in flat config system.
|
---|
| 63 |
|
---|
| 64 | Flat config uses "languageOptions.parser" to override the default parser.
|
---|
| 65 |
|
---|
| 66 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 67 | https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
|
---|
| 68 | `,
|
---|
| 69 |
|
---|
| 70 | parserOptions: `
|
---|
| 71 | A config object is using the "parserOptions" key, which is not supported in flat config system.
|
---|
| 72 |
|
---|
| 73 | Flat config uses "languageOptions.parserOptions" to specify parser options.
|
---|
| 74 |
|
---|
| 75 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 76 | https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
---|
| 77 | `,
|
---|
| 78 |
|
---|
| 79 | reportUnusedDisableDirectives: `
|
---|
| 80 | A config object is using the "reportUnusedDisableDirectives" key, which is not supported in flat config system.
|
---|
| 81 |
|
---|
| 82 | Flat config uses "linterOptions.reportUnusedDisableDirectives" to specify files to ignore.
|
---|
| 83 |
|
---|
| 84 | Please see the following page for information on how to convert your config object into the correct format:
|
---|
| 85 | https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
|
---|
| 86 | `,
|
---|
| 87 |
|
---|
| 88 | root: `
|
---|
| 89 | A config object is using the "root" key, which is not supported in flat config system.
|
---|
| 90 |
|
---|
| 91 | Flat configs always act as if they are the root config file, so this key can be safely removed.
|
---|
| 92 | `
|
---|
| 93 | };
|
---|
| 94 |
|
---|
| 95 | module.exports = function({ key }) {
|
---|
| 96 |
|
---|
| 97 | return messages[key].trim();
|
---|
| 98 | };
|
---|