blob: 27fe8c9f4b1805b6fba32c0ca58fd201f8af63db [file] [log] [blame]
Nikolay Vitkov65f45cc2024-11-29 12:29:281"use strict";
2
3/* eslint consistent-return: 0 -- no default case */
4
5const messages = {
Nikolay Vitkovd38bb9f2025-04-22 17:21:376 env: `
Nikolay Vitkov65f45cc2024-11-29 12:29:287A config object is using the "env" key, which is not supported in flat config system.
8
9Flat config uses "languageOptions.globals" to define global variables for your files.
10
11Please see the following page for information on how to convert your config object into the correct format:
12https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
Nikolay Vitkovb4e8dc72025-01-07 13:03:0213
14If you're not using "env" directly (it may be coming from a plugin), please see the following:
15https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2816`,
17
Nikolay Vitkovd38bb9f2025-04-22 17:21:3718 extends: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2819A config object is using the "extends" key, which is not supported in flat config system.
20
21Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
22
Nikolay Vitkovb4e8dc72025-01-07 13:03:0223If you're using "extends" in your config file, please see the following:
Nikolay Vitkov65f45cc2024-11-29 12:29:2824https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
Nikolay Vitkovb4e8dc72025-01-07 13:03:0225
26If you're not using "extends" directly (it may be coming from a plugin), please see the following:
27https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2828`,
29
Nikolay Vitkovd38bb9f2025-04-22 17:21:3730 globals: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2831A config object is using the "globals" key, which is not supported in flat config system.
32
33Flat config uses "languageOptions.globals" to define global variables for your files.
34
35Please see the following page for information on how to convert your config object into the correct format:
36https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
Nikolay Vitkovb4e8dc72025-01-07 13:03:0237
38If you're not using "globals" directly (it may be coming from a plugin), please see the following:
39https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2840`,
41
Nikolay Vitkovd38bb9f2025-04-22 17:21:3742 ignorePatterns: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2843A config object is using the "ignorePatterns" key, which is not supported in flat config system.
44
45Flat config uses "ignores" to specify files to ignore.
46
47Please see the following page for information on how to convert your config object into the correct format:
48https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
Nikolay Vitkovb4e8dc72025-01-07 13:03:0249
50If you're not using "ignorePatterns" directly (it may be coming from a plugin), please see the following:
51https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2852`,
53
Nikolay Vitkovd38bb9f2025-04-22 17:21:3754 noInlineConfig: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2855A config object is using the "noInlineConfig" key, which is not supported in flat config system.
56
57Flat config uses "linterOptions.noInlineConfig" to specify files to ignore.
58
59Please see the following page for information on how to convert your config object into the correct format:
60https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
61`,
62
Nikolay Vitkovd38bb9f2025-04-22 17:21:3763 overrides: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2864A config object is using the "overrides" key, which is not supported in flat config system.
65
66Flat config is an array that acts like the eslintrc "overrides" array.
67
68Please see the following page for information on how to convert your config object into the correct format:
69https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
Nikolay Vitkovb4e8dc72025-01-07 13:03:0270
71If you're not using "overrides" directly (it may be coming from a plugin), please see the following:
72https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2873`,
74
Nikolay Vitkovd38bb9f2025-04-22 17:21:3775 parser: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2876A config object is using the "parser" key, which is not supported in flat config system.
77
78Flat config uses "languageOptions.parser" to override the default parser.
79
80Please see the following page for information on how to convert your config object into the correct format:
81https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
Nikolay Vitkovb4e8dc72025-01-07 13:03:0282
83If you're not using "parser" directly (it may be coming from a plugin), please see the following:
84https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2885`,
86
Nikolay Vitkovd38bb9f2025-04-22 17:21:3787 parserOptions: `
Nikolay Vitkov65f45cc2024-11-29 12:29:2888A config object is using the "parserOptions" key, which is not supported in flat config system.
89
90Flat config uses "languageOptions.parserOptions" to specify parser options.
91
92Please see the following page for information on how to convert your config object into the correct format:
93https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
Nikolay Vitkovb4e8dc72025-01-07 13:03:0294
95If you're not using "parserOptions" directly (it may be coming from a plugin), please see the following:
96https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Nikolay Vitkov65f45cc2024-11-29 12:29:2897`,
98
Nikolay Vitkovd38bb9f2025-04-22 17:21:3799 reportUnusedDisableDirectives: `
Nikolay Vitkov65f45cc2024-11-29 12:29:28100A config object is using the "reportUnusedDisableDirectives" key, which is not supported in flat config system.
101
102Flat config uses "linterOptions.reportUnusedDisableDirectives" to specify files to ignore.
103
104Please see the following page for information on how to convert your config object into the correct format:
105https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
106`,
107
Nikolay Vitkovd38bb9f2025-04-22 17:21:37108 root: `
Nikolay Vitkov65f45cc2024-11-29 12:29:28109A config object is using the "root" key, which is not supported in flat config system.
110
111Flat configs always act as if they are the root config file, so this key can be safely removed.
Nikolay Vitkovd38bb9f2025-04-22 17:21:37112`,
Nikolay Vitkov65f45cc2024-11-29 12:29:28113};
114
Nikolay Vitkovd38bb9f2025-04-22 17:21:37115module.exports = function ({ key }) {
116 return messages[key].trim();
Nikolay Vitkov65f45cc2024-11-29 12:29:28117};