用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
851 B

6 months ago
  1. "use strict";
  2. module.exports = function({ plugins }) {
  3. const isArrayOfStrings = typeof plugins[0] === "string";
  4. return `
  5. A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}.
  6. Flat config requires "plugins" to be an object in this form:
  7. {
  8. plugins: {
  9. ${isArrayOfStrings && plugins[0] ? plugins[0] : "namespace"}: pluginObject
  10. }
  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#importing-plugins-and-custom-parsers
  14. If you're using a shareable config that you cannot rewrite in flat config format, then use the compatibility utility:
  15. https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
  16. `;
  17. };