{"version":3,"sources":["jsdelivr-header.js","/npm/@metamask/eslint-config@15.0.0/src/index.mjs"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCJO,OAAQ,oBACR,YAAa,gCACb,UAAW,6BACX,aAAc,4CAEd,YAAa,+BACb,YAAa,iBACX,kBAAqB,gBAErB,iBAAoB,cAG7B,MAAM,cAAgB,0BAA0B,KAC1C,iBAAmB,cAAc,sBAKjC,MAAQ,aAAa,CACzB,KAAM,0BAEN,QAAS,CAEP,GAAG,QAAQ,YAGX,QAAQ,YAAY,YACpB,MAAM,QAAQ,0BACd,SACA,QAAQ,QAAQ,qBAGlB,gBAAiB,CAIf,YAAa,KACb,cAAe,CACb,YAAa,MAIf,WAAY,SAEZ,QAAS,IACJ,QAAQ,UACR,QAAQ,yBAIf,MAAO,IACF,iBAGH,oBAAqB,CACnB,QACA,CAGE,UAAW,OACX,WAAY,YACZ,aAAa,EACb,SAAU,EACV,cAAe,OAEjB,CAGE,eAAe,IAInB,MAAO,CAAC,QAAS,OACjB,UAAW,QAGX,iBAAkB,QAClB,wBAAyB,QACzB,mBAAoB,QACpB,UAAW,CACT,QACA,CACE,WAAY,QACZ,MAAO,CAAC,cAGZ,oBAAqB,QACrB,kBAAmB,CAAC,QAAS,QAC7B,eAAgB,QAChB,qBAAsB,QACtB,eAAgB,QAChB,OAAQ,CAAC,QAAS,cAClB,qBAAsB,QACtB,yBAA0B,QAC1B,eAAgB,QAChB,cAAe,CAEb,QAEA,MACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,OAEF,YAAa,CACX,QACA,CACE,IAAK,EACL,WAAY,QACZ,kBAAmB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,OAGjD,8BAA+B,QAC/B,UAAW,CACT,QACA,CACE,UAAU,EACV,UAAU,IAGd,WAAY,QACZ,uBAAwB,QACxB,aAAc,QACd,wBAAyB,QACzB,YAAa,QACb,wBAAyB,QACzB,eAAgB,QAChB,iBAAkB,Q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iD,CAC/C,QACA,SACA,CAAE,KAAM,CAAE,QAAS,QAAS,SAAU,SAAU,OAAQ,WAE1D,sBAAuB,CACrB,QACA,CACE,QAAS,CACP,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GAEpB,SAAU,CACR,yBACA,yBACA,oBACA,yBAIN,2BAA4B,QAC5B,sBAAuB,CAAC,QAAS,CAAE,gBAAiB,CAAC,aACrD,kCAAmC,QACnC,2BAA4B,QAC5B,yBAA0B,QAC1B,qCAAsC,QACtC,8BAA+B,QAC/B,8BAA+B,QAC/B,wBAAyB,QACzB,8BAA+B,QAC/B,oCAAqC,QACrC,6BAA8B,QAC9B,uBAAwB,QACxB,6BAA8B,QAC9B,kBAAmB,CACjB,QACA,MACA,CACE,WAAY,IAGhB,oBAAqB,QAGrB,0BAA2B,CACzB,QACA,CACE,cAAc,IAGlB,iCAAkC,QAClC,qBAAsB,QACtB,iCAAkC,QAClC,+BAAgC,QAChC,sBAAuB,CACrB,QACA,CACE,eAAgB,aAChB,cAAe,cAGnB,uBAAwB,kBAInB,6BACM","file":"/npm/@metamask/eslint-config@15.0.0/src/index.mjs","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@metamask/eslint-config@15.0.0/src/index.mjs\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// @ts-check\n\nimport js from '@eslint/js';\nimport importX from 'eslint-plugin-import-x';\nimport jsdoc from 'eslint-plugin-jsdoc';\nimport prettier from 'eslint-plugin-prettier/recommended';\n// @ts-ignore - `eslint-plugin-promise` doesn't have TypeScript types.\nimport promise from 'eslint-plugin-promise';\nimport globals from 'globals';\nimport { createRequire } from 'module';\n\nimport { createConfig } from './utils.mjs';\n\n// TODO: Use import attributes when ESLint supports them.\nconst customRequire = createRequire(import.meta.url);\nconst environmentRules = customRequire('./environment.json');\n\n/**\n * @type {import('eslint').Linter.Config[]}\n */\nconst rules = createConfig({\n  name: '@metamask/eslint-config',\n\n  extends: [\n    // Recommended ESLint configuration.\n    js.configs.recommended,\n\n    // Third-party plugin configurations.\n    importX.flatConfigs.recommended,\n    jsdoc.configs['flat/recommended-error'],\n    prettier,\n    promise.configs['flat/recommended'],\n  ],\n\n  languageOptions: {\n    // The `esXXXX` option under `env` is supposed to set the correct\n    // `ecmaVersion` option here, but we've had issues with it being\n    // overridden in the past and therefore set it explicitly.\n    ecmaVersion: 2022,\n    parserOptions: {\n      ecmaVersion: 2022,\n    },\n\n    // We want to default to 'script' and only use 'module' explicitly.\n    sourceType: 'script',\n\n    globals: {\n      ...globals.es2022,\n      ...globals['shared-node-browser'],\n    },\n  },\n\n  rules: {\n    ...environmentRules,\n\n    /* Prettier rules */\n    'prettier/prettier': [\n      'error',\n      {\n        // All of these are defaults except singleQuote and endOfLine, but we specify them\n        // for explicitness\n        endOfLine: 'auto',\n        quoteProps: 'as-needed',\n        singleQuote: true,\n        tabWidth: 2,\n        trailingComma: 'all',\n      },\n      {\n        // Allow consumers to override this Prettier config.\n        // This is the default, but we specify it for the sake of clarity.\n        usePrettierrc: true,\n      },\n    ],\n\n    curly: ['error', 'all'],\n    'no-tabs': 'error',\n\n    /* Core rules */\n    'accessor-pairs': 'error',\n    'array-callback-return': 'error',\n    'block-scoped-var': 'error',\n    camelcase: [\n      'error',\n      {\n        properties: 'never',\n        allow: ['^UNSAFE_'],\n      },\n    ],\n    'consistent-return': 'error',\n    'consistent-this': ['error', 'self'],\n    'default-case': 'error',\n    'default-param-last': 'error',\n    'dot-notation': 'error',\n    eqeqeq: ['error', 'allow-null'],\n    'func-name-matching': 'error',\n    'grouped-accessor-pairs': 'error',\n    'guard-for-in': 'error',\n    'id-denylist': [\n      // This sets this rule to 'error', the rest are the forbidden IDs.\n      'error',\n      // These are basically all useless contractions.\n      'buf',\n      'cat',\n      'err',\n      'cb',\n      'cfg',\n      'hex',\n      'int',\n      'msg',\n      'num',\n      'opt',\n      'sig',\n    ],\n    'id-length': [\n      'error',\n      {\n        min: 2,\n        properties: 'never',\n        exceptionPatterns: ['_', 'a', 'b', 'i', 'j', 'k'],\n      },\n    ],\n    'lines-between-class-members': 'error',\n    'new-cap': [\n      'error',\n      {\n        newIsCap: true,\n        capIsNew: false,\n      },\n    ],\n    'no-alert': 'error',\n    'no-array-constructor': 'error',\n    'no-bitwise': 'error',\n    'no-buffer-constructor': 'error',\n    'no-caller': 'error',\n    'no-constructor-return': 'error',\n    'no-div-regex': 'error',\n    'no-else-return': 'error',\n    'no-empty-function': 'error',\n    'no-eq-null': 'error',\n    'no-eval': 'error',\n    'no-extend-native': 'error',\n    'no-extra-bind': 'error',\n    'no-extra-label': 'error',\n    'no-implicit-coercion': 'error',\n    'no-implicit-globals': 'off',\n    'no-implied-eval': 'error',\n    'no-inner-declarations': ['error', 'functions'],\n    'no-invalid-this': 'error',\n    'no-iterator': 'error',\n    'no-label-var': 'error',\n    'no-labels': [\n      'error',\n      {\n        allowLoop: false,\n        allowSwitch: false,\n      },\n    ],\n    'no-lone-blocks': 'error',\n    'no-lonely-if': 'error',\n    'no-loop-func': 'error',\n    'no-multi-assign': 'error',\n    'no-multi-str': 'error',\n    'no-native-reassign': 'error',\n    'no-negated-condition': 'error',\n    'no-negated-in-lhs': 'error',\n    'no-nested-ternary': 'error',\n    'no-new': 'error',\n    'no-new-func': 'error',\n    'no-new-object': 'error',\n    'no-new-wrappers': 'error',\n    'no-octal-escape': 'error',\n    'no-param-reassign': 'error',\n    'no-plusplus': [\n      'error',\n      {\n        allowForLoopAfterthoughts: true,\n      },\n    ],\n    'no-proto': 'error',\n    'no-restricted-syntax': [\n      'error',\n      {\n        selector: 'WithStatement',\n        message: 'With statements are not allowed',\n      },\n      {\n        selector: `BinaryExpression[operator='in']`,\n        message: 'The \"in\" operator is not allowed',\n      },\n      // Sequence expressions have potential gotchas with Prettier, and are also\n      // weird!\n      {\n        selector: 'SequenceExpression',\n        message: 'Sequence expressions are not allowed',\n      },\n    ],\n    'no-return-assign': ['error', 'except-parens'],\n    'no-script-url': 'error',\n    'no-self-compare': 'error',\n    'no-shadow': ['error', { builtinGlobals: true }],\n    'no-template-curly-in-string': 'error',\n    'no-throw-literal': 'error',\n    'no-undef-init': 'error',\n    'no-unmodified-loop-condition': 'error',\n    'no-unneeded-ternary': [\n      'error',\n      {\n        defaultAssignment: false,\n      },\n    ],\n    'no-unused-expressions': [\n      'error',\n      {\n        allowShortCircuit: true,\n        allowTernary: true,\n      },\n    ],\n    'no-unused-vars': [\n      'error',\n      {\n        vars: 'all',\n        args: 'all',\n        argsIgnorePattern: '[_]+',\n        ignoreRestSiblings: true,\n      },\n    ],\n    'no-use-before-define': [\n      'error',\n      {\n        functions: false,\n      },\n    ],\n    'no-useless-call': 'error',\n    'no-useless-computed-key': 'error',\n    'no-useless-concat': 'error',\n    'no-useless-constructor': 'error',\n    'no-useless-rename': 'error',\n    'no-useless-return': 'error',\n    'no-var': 'error',\n    'no-void': 'error',\n    'object-shorthand': 'error',\n    'one-var': [\n      'error',\n      {\n        initialized: 'never',\n      },\n    ],\n    'operator-assignment': 'error',\n    'padding-line-between-statements': [\n      'error',\n      {\n        blankLine: 'always',\n        prev: 'directive',\n        next: '*',\n      },\n      {\n        blankLine: 'any',\n        prev: 'directive',\n        next: 'directive',\n      },\n    ],\n    'prefer-const': 'error',\n    'prefer-destructuring': [\n      'error',\n      {\n        VariableDeclarator: {\n          array: false,\n          object: true,\n        },\n        AssignmentExpression: {\n          array: false,\n          object: false,\n        },\n      },\n      {\n        enforceForRenamedProperties: false,\n      },\n    ],\n    'prefer-numeric-literals': 'error',\n    'prefer-promise-reject-errors': 'error',\n    'prefer-regex-literals': 'error',\n    'prefer-rest-params': 'error',\n    'prefer-spread': 'error',\n    'prefer-template': 'error',\n    radix: 'error',\n    'require-atomic-updates': 'error',\n    'require-unicode-regexp': 'error',\n    'spaced-comment': [\n      'error',\n      'always',\n      {\n        markers: [\n          'global',\n          'globals',\n          'eslint',\n          'eslint-disable',\n          '*package',\n          '!',\n          ',',\n        ],\n        exceptions: ['=', '-'],\n      },\n    ],\n    'symbol-description': 'error',\n    yoda: ['error', 'never'],\n\n    /* import plugin rules */\n    'import-x/extensions': [\n      'error',\n      'never',\n      {\n        json: 'always',\n      },\n    ],\n    'import-x/first': 'error',\n    'import-x/newline-after-import': 'error',\n    'import-x/no-absolute-path': 'error',\n    'import-x/no-amd': 'error',\n    'import-x/no-anonymous-default-export': 'error',\n    'import-x/no-duplicates': 'error',\n    'import-x/no-dynamic-require': 'error',\n    'import-x/no-extraneous-dependencies': 'error',\n    'import-x/no-mutable-exports': 'error',\n    'import-x/no-named-as-default': 'error',\n    'import-x/no-named-as-default-member': 'error',\n    'import-x/no-named-default': 'error',\n    'import-x/no-nodejs-modules': 'error',\n    'import-x/no-self-import': 'error',\n    'import-x/no-unassigned-import': 'error',\n    'import-x/no-unresolved': [\n      'error',\n      {\n        commonjs: true,\n      },\n    ],\n    'import-x/no-useless-path-segments': [\n      'error',\n      {\n        commonjs: true,\n        noUselessIndex: true,\n      },\n    ],\n    'import-x/no-webpack-loader-syntax': 'error',\n    'import-x/order': [\n      'error',\n      {\n        // This means that there will always be a newline between the import\n        // groups as defined below.\n        'newlines-between': 'always',\n\n        groups: [\n          // \"builtin\" is Node.js modules that are built into the runtime, and\n          // \"external\" is everything else from node_modules.\n          ['builtin', 'external'],\n\n          // \"internal\" is unused, but could be used for absolute imports from\n          // the project root.\n          ['internal', 'parent', 'sibling', 'index'],\n        ],\n\n        // Alphabetically sort the imports within each group.\n        alphabetize: {\n          order: 'asc',\n          caseInsensitive: true,\n        },\n      },\n    ],\n    'import-x/unambiguous': 'error',\n\n    /* jsdoc plugin rules */\n    'jsdoc/check-access': 'error',\n    'jsdoc/check-alignment': 'error',\n    'jsdoc/check-line-alignment': 'error',\n    'jsdoc/check-param-names': 'error',\n    'jsdoc/check-property-names': 'error',\n    'jsdoc/check-tag-names': 'error',\n    'jsdoc/check-types': 'error',\n    'jsdoc/check-values': 'error',\n    'jsdoc/empty-tags': 'error',\n    'jsdoc/implements-on-classes': 'error',\n    'jsdoc/match-description': [\n      'error',\n      { tags: { param: true, returns: true } },\n    ],\n    'jsdoc/multiline-blocks': 'error',\n    'jsdoc/no-bad-blocks': 'error',\n    'jsdoc/no-defaults': 'error',\n    'jsdoc/no-multi-asterisks': 'error',\n    'jsdoc/require-asterisk-prefix': 'error',\n    'jsdoc/require-description': 'error',\n    'jsdoc/require-hyphen-before-param-description': [\n      'error',\n      'always',\n      { tags: { returns: 'never', template: 'always', throws: 'never' } },\n    ],\n    'jsdoc/require-jsdoc': [\n      'error',\n      {\n        require: {\n          ArrowFunctionExpression: true,\n          ClassDeclaration: true,\n          FunctionDeclaration: true,\n          FunctionExpression: true,\n          MethodDefinition: true,\n        },\n        contexts: [\n          'TSInterfaceDeclaration',\n          'TSTypeAliasDeclaration',\n          'TSEnumDeclaration',\n          'TSPropertySignature',\n        ],\n      },\n    ],\n    'jsdoc/require-param-name': 'error',\n    'jsdoc/require-param': ['error', { unnamedRootBase: ['options'] }],\n    'jsdoc/require-param-description': 'error',\n    'jsdoc/require-param-type': 'error',\n    'jsdoc/require-property': 'error',\n    'jsdoc/require-property-description': 'error',\n    'jsdoc/require-property-name': 'error',\n    'jsdoc/require-property-type': 'error',\n    'jsdoc/require-returns': 'error',\n    'jsdoc/require-returns-check': 'error',\n    'jsdoc/require-returns-description': 'error',\n    'jsdoc/require-returns-type': 'error',\n    'jsdoc/require-yields': 'error',\n    'jsdoc/require-yields-check': 'error',\n    'jsdoc/tag-lines': [\n      'error',\n      'any',\n      {\n        startLines: 1,\n      },\n    ],\n    'jsdoc/valid-types': 'error',\n\n    /* promise plugin rules */\n    'promise/catch-or-return': [\n      'error',\n      {\n        allowFinally: true,\n      },\n    ],\n    'promise/no-callback-in-promise': 'error',\n    'promise/no-nesting': 'error',\n    'promise/no-promise-in-callback': 'error',\n    'promise/no-return-in-finally': 'error',\n    'promise/param-names': [\n      'error',\n      {\n        resolvePattern: '^_?resolve',\n        rejectPattern: '^_?reject',\n      },\n    ],\n    'promise/valid-params': 'error',\n  },\n});\n\nexport { createConfig };\nexport default rules;\n"]}