|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
851 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | module.exports = function({ plugins }) {
|
|---|
| 4 |
|
|---|
| 5 | const isArrayOfStrings = typeof plugins[0] === "string";
|
|---|
| 6 |
|
|---|
| 7 | return `
|
|---|
| 8 | A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}.
|
|---|
| 9 |
|
|---|
| 10 | Flat config requires "plugins" to be an object in this form:
|
|---|
| 11 |
|
|---|
| 12 | {
|
|---|
| 13 | plugins: {
|
|---|
| 14 | ${isArrayOfStrings && plugins[0] ? plugins[0] : "namespace"}: pluginObject
|
|---|
| 15 | }
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | Please see the following page for information on how to convert your config object into the correct format:
|
|---|
| 19 | https://eslint.org/docs/latest/use/configure/migration-guide#importing-plugins-and-custom-parsers
|
|---|
| 20 |
|
|---|
| 21 | If you're using a shareable config that you cannot rewrite in flat config format, then use the compatibility utility:
|
|---|
| 22 | https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
|
|---|
| 23 | `;
|
|---|
| 24 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.