diff --git a/eslint.config.mjs b/eslint.config.mjs index b378c67b..722f8116 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,19 +1,34 @@ // @ts-check +// @ts-expect-error - `@babel/eslint-parser` doesn't have TypeScript types. +import babel from '@babel/eslint-parser'; +import baseConfigs from '@metamask/eslint-config'; + /** * @type {import('eslint').Linter.Config[]} */ const config = [ + ...baseConfigs, // TODO: // extends: [ - // '@metamask/eslint-config', // '@metamask/eslint-config-nodejs', // '@metamask/eslint-config-jest', // ], { + name: 'main', languageOptions: { ecmaVersion: 2022, + + sourceType: 'module', + + parser: babel, + parserOptions: { + requireConfigFile: false, + babelOptions: { + plugins: ['@babel/plugin-syntax-import-attributes'], + }, + }, }, rules: { @@ -26,7 +41,7 @@ const config = [ }, ignores: ['!.eslint.config.mjs'], - } + }, ]; export default config; diff --git a/package.json b/package.json index 0142c908..02936a68 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,11 @@ "test": "jest" }, "devDependencies": { + "@babel/core": "^7.25.2", + "@babel/eslint-parser": "^7.25.1", + "@babel/plugin-syntax-import-attributes": "^7.25.6", "@eslint/js": "^9.11.0", + "@jest/globals": "^29.7.0", "@lavamoat/allow-scripts": "^3.0.4", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^13.0.0", diff --git a/packages/base/jest.config.js b/packages/base/jest.config.js deleted file mode 100644 index f2f7ef4c..00000000 --- a/packages/base/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const packageJson = require('./package.json'); - -module.exports = { - displayName: packageJson.name, -}; diff --git a/packages/base/package.json b/packages/base/package.json index f597239e..8901132d 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -10,8 +10,18 @@ "type": "git", "url": "https://github.com/MetaMask/eslint-config.git" }, + "type": "module", "license": "MIT", - "main": "src/index.js", + "main": "./src/index.mjs", + "types": "./src/index.d.mts", + "exports": { + ".": { + "import": { + "types": "./src/index.d.mts", + "default": "./src/index.mjs" + } + } + }, "files": [ "src/", "!src/**/*.test.js" @@ -22,6 +32,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "eslint": "^9.11.0", "eslint-config-prettier": "^9.1.0", @@ -46,5 +57,9 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0", + "globals": "^15.9.0" } } diff --git a/packages/base/src/index.d.mts b/packages/base/src/index.d.mts new file mode 100644 index 00000000..8704c152 --- /dev/null +++ b/packages/base/src/index.d.mts @@ -0,0 +1,6 @@ +declare module '@metamask/eslint-config' { + import { Linter } from 'eslint'; + + const config: Linter.Config[]; + export default config; +} diff --git a/packages/base/src/index.js b/packages/base/src/index.js deleted file mode 100644 index 51b202f3..00000000 --- a/packages/base/src/index.js +++ /dev/null @@ -1,400 +0,0 @@ -const environmentRules = require('./environment.json'); - -module.exports = { - env: { - // See comment under `parserOptions` below. - es2017: true, - 'shared-node-browser': true, - }, - - parserOptions: { - // The `esXXXX` option under `env` is supposed to set the correct - // `ecmaVersion` option here, but we've had issues with it being - // overridden in the past and therefore set it explicitly. - // - // For JavaScript, ES2017 is our effective minimum version due to the use - // of Esprima by transitive dependencies. - // It doesn't handle object rest spread, which is a 2018 feature. - ecmaVersion: 2017, - // We want to default to 'script' and only use 'module' explicitly. - sourceType: 'script', - }, - - plugins: ['jsdoc', 'prettier', 'promise'], - - extends: [ - 'eslint:recommended', - 'plugin:prettier/recommended', - 'plugin:import-x/recommended', - ], - - rules: { - ...environmentRules, - - /* Prettier rules */ - 'prettier/prettier': [ - 'error', - { - // All of these are defaults except singleQuote and endOfLine, but we specify them - // for explicitness - endOfLine: 'auto', - quoteProps: 'as-needed', - singleQuote: true, - tabWidth: 2, - trailingComma: 'all', - }, - { - // Allow consumers to override this prettier config. - // This is the default, but we specify it for the sake of clarity. - usePrettierrc: true, - }, - ], - - curly: ['error', 'all'], - 'no-tabs': 'error', - - /* Core rules */ - 'accessor-pairs': 'error', - 'array-callback-return': 'error', - 'block-scoped-var': 'error', - camelcase: [ - 'error', - { - properties: 'never', - allow: ['^UNSAFE_'], - }, - ], - 'consistent-return': 'error', - 'consistent-this': ['error', 'self'], - 'default-case': 'error', - 'default-param-last': 'error', - 'dot-notation': 'error', - eqeqeq: ['error', 'allow-null'], - 'func-name-matching': 'error', - 'grouped-accessor-pairs': 'error', - 'guard-for-in': 'error', - 'id-denylist': [ - // This sets this rule to 'error', the rest are the forbidden IDs. - 'error', - // These are basically all useless contractions. - 'buf', - 'cat', - 'err', - 'cb', - 'cfg', - 'hex', - 'int', - 'msg', - 'num', - 'opt', - 'sig', - ], - 'id-length': [ - 'error', - { - min: 2, - properties: 'never', - exceptionPatterns: ['_', 'a', 'b', 'i', 'j', 'k'], - }, - ], - 'lines-between-class-members': 'error', - 'new-cap': [ - 'error', - { - newIsCap: true, - capIsNew: false, - }, - ], - 'no-alert': 'error', - 'no-array-constructor': 'error', - 'no-bitwise': 'error', - 'no-buffer-constructor': 'error', - 'no-caller': 'error', - 'no-constructor-return': 'error', - 'no-div-regex': 'error', - 'no-else-return': 'error', - 'no-empty-function': 'error', - 'no-eq-null': 'error', - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-implicit-coercion': 'error', - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-inner-declarations': ['error', 'functions'], - 'no-invalid-this': 'error', - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': [ - 'error', - { - allowLoop: false, - allowSwitch: false, - }, - ], - 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', - 'no-loop-func': 'error', - 'no-multi-assign': 'error', - 'no-multi-str': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'error', - 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-object': 'error', - 'no-new-wrappers': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'error', - 'no-plusplus': [ - 'error', - { - allowForLoopAfterthoughts: true, - }, - ], - 'no-proto': 'error', - 'no-restricted-syntax': [ - 'error', - { - selector: 'WithStatement', - message: 'With statements are not allowed', - }, - { - selector: `BinaryExpression[operator='in']`, - message: 'The "in" operator is not allowed', - }, - // Sequence expressions have potential gotchas with Prettier, and are also - // weird! - { - selector: 'SequenceExpression', - message: 'Sequence expressions are not allowed', - }, - ], - 'no-return-assign': ['error', 'except-parens'], - 'no-script-url': 'error', - 'no-self-compare': 'error', - 'no-shadow': ['error', { builtinGlobals: true }], - 'no-template-curly-in-string': 'error', - 'no-throw-literal': 'error', - 'no-undef-init': 'error', - 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': [ - 'error', - { - defaultAssignment: false, - }, - ], - 'no-unused-expressions': [ - 'error', - { - allowShortCircuit: true, - allowTernary: true, - }, - ], - 'no-unused-vars': [ - 'error', - { - vars: 'all', - args: 'all', - argsIgnorePattern: '[_]+', - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': [ - 'error', - { - functions: false, - }, - ], - 'no-useless-call': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-rename': 'error', - 'no-useless-return': 'error', - 'no-var': 'error', - 'no-void': 'error', - 'object-shorthand': 'error', - 'one-var': [ - 'error', - { - initialized: 'never', - }, - ], - 'operator-assignment': 'error', - 'padding-line-between-statements': [ - 'error', - { - blankLine: 'always', - prev: 'directive', - next: '*', - }, - { - blankLine: 'any', - prev: 'directive', - next: 'directive', - }, - ], - 'prefer-const': 'error', - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: false, - object: false, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - 'prefer-numeric-literals': 'error', - 'prefer-promise-reject-errors': 'error', - 'prefer-regex-literals': 'error', - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', - 'prefer-template': 'error', - radix: 'error', - 'require-atomic-updates': 'error', - 'require-unicode-regexp': 'error', - 'spaced-comment': [ - 'error', - 'always', - { - markers: [ - 'global', - 'globals', - 'eslint', - 'eslint-disable', - '*package', - '!', - ',', - ], - exceptions: ['=', '-'], - }, - ], - 'symbol-description': 'error', - yoda: ['error', 'never'], - - /* import plugin rules */ - 'import-x/extensions': [ - 'error', - 'never', - { - json: 'always', - }, - ], - 'import-x/first': 'error', - 'import-x/newline-after-import': 'error', - 'import-x/no-absolute-path': 'error', - 'import-x/no-amd': 'error', - 'import-x/no-anonymous-default-export': 'error', - 'import-x/no-duplicates': 'error', - 'import-x/no-dynamic-require': 'error', - 'import-x/no-extraneous-dependencies': 'error', - 'import-x/no-mutable-exports': 'error', - 'import-x/no-named-as-default': 'error', - 'import-x/no-named-as-default-member': 'error', - 'import-x/no-named-default': 'error', - 'import-x/no-nodejs-modules': 'error', - 'import-x/no-self-import': 'error', - 'import-x/no-unassigned-import': 'error', - 'import-x/no-unresolved': [ - 'error', - { - commonjs: true, - }, - ], - 'import-x/no-useless-path-segments': [ - 'error', - { - commonjs: true, - noUselessIndex: true, - }, - ], - 'import-x/no-webpack-loader-syntax': 'error', - 'import-x/order': [ - 'error', - { - // This means that there will always be a newline between the import - // groups as defined below. - 'newlines-between': 'always', - - groups: [ - // "builtin" is Node.js modules that are built into the runtime, and - // "external" is everything else from node_modules. - ['builtin', 'external'], - - // "internal" is unused, but could be used for absolute imports from - // the project root. - ['internal', 'parent', 'sibling', 'index'], - ], - - // Alphabetically sort the imports within each group. - alphabetize: { - order: 'asc', - caseInsensitive: true, - }, - }, - ], - 'import-x/unambiguous': 'error', - - /* jsdoc plugin rules */ - 'jsdoc/check-access': 'error', - 'jsdoc/check-alignment': 'error', - 'jsdoc/check-line-alignment': 'error', - 'jsdoc/check-param-names': 'error', - 'jsdoc/check-property-names': 'error', - 'jsdoc/check-tag-names': 'error', - 'jsdoc/check-types': 'error', - 'jsdoc/check-values': 'error', - 'jsdoc/empty-tags': 'error', - 'jsdoc/implements-on-classes': 'error', - 'jsdoc/match-description': [ - 'error', - { tags: { param: true, returns: true } }, - ], - 'jsdoc/multiline-blocks': 'error', - 'jsdoc/no-bad-blocks': 'error', - 'jsdoc/no-defaults': 'error', - 'jsdoc/no-multi-asterisks': 'error', - 'jsdoc/require-asterisk-prefix': 'error', - 'jsdoc/require-description': 'error', - 'jsdoc/require-hyphen-before-param-description': [ - 'error', - 'always', - { tags: { returns: 'never', template: 'always', throws: 'never' } }, - ], - 'jsdoc/require-jsdoc': 'error', - 'jsdoc/require-param-name': 'error', - 'jsdoc/require-param': ['error', { unnamedRootBase: ['options'] }], - 'jsdoc/require-param-description': 'error', - 'jsdoc/require-param-type': 'error', - 'jsdoc/require-property': 'error', - 'jsdoc/require-property-description': 'error', - 'jsdoc/require-property-name': 'error', - 'jsdoc/require-property-type': 'error', - 'jsdoc/require-returns': 'error', - 'jsdoc/require-returns-check': 'error', - 'jsdoc/require-returns-description': 'error', - 'jsdoc/require-returns-type': 'error', - 'jsdoc/require-yields': 'error', - 'jsdoc/require-yields-check': 'error', - 'jsdoc/tag-lines': [ - 'error', - 'any', - { - startLines: 1, - }, - ], - 'jsdoc/valid-types': 'error', - - 'promise/no-multiple-resolved': 'error', - }, -}; diff --git a/packages/base/src/index.mjs b/packages/base/src/index.mjs new file mode 100644 index 00000000..bac3ef0b --- /dev/null +++ b/packages/base/src/index.mjs @@ -0,0 +1,413 @@ +// @ts-check + +import js from '@eslint/js'; +import importX from 'eslint-plugin-import-x'; +import jsdoc from 'eslint-plugin-jsdoc'; +import prettier from 'eslint-plugin-prettier/recommended'; +import promise from 'eslint-plugin-promise'; +import globals from 'globals'; + +import environmentRules from './environment.json' with { type: 'json' }; + +/** + * @type {import('eslint').Linter.Config[]} + */ +const rules = [ + // Recommended ESLint configuration. + js.configs.recommended, + + importX.flatConfigs.recommended, + jsdoc.configs['flat/recommended-error'], + prettier, + promise.configs['flat/recommended'], + + { + name: '@metamask/eslint-config', + languageOptions: { + // The `esXXXX` option under `env` is supposed to set the correct + // `ecmaVersion` option here, but we've had issues with it being + // overridden in the past and therefore set it explicitly. + ecmaVersion: 2022, + + // We want to default to 'script' and only use 'module' explicitly. + sourceType: 'script', + + globals: { + ...globals.es2022, + ...globals['shared-node-browser'], + }, + }, + + rules: { + ...environmentRules, + + /* Prettier rules */ + 'prettier/prettier': [ + 'error', + { + // All of these are defaults except singleQuote and endOfLine, but we specify them + // for explicitness + endOfLine: 'auto', + quoteProps: 'as-needed', + singleQuote: true, + tabWidth: 2, + trailingComma: 'all', + }, + { + // Allow consumers to override this Prettier config. + // This is the default, but we specify it for the sake of clarity. + usePrettierrc: true, + }, + ], + + curly: ['error', 'all'], + 'no-tabs': 'error', + + /* Core rules */ + 'accessor-pairs': 'error', + 'array-callback-return': 'error', + 'block-scoped-var': 'error', + camelcase: [ + 'error', + { + properties: 'never', + allow: ['^UNSAFE_'], + }, + ], + 'consistent-return': 'error', + 'consistent-this': ['error', 'self'], + 'default-case': 'error', + 'default-param-last': 'error', + 'dot-notation': 'error', + eqeqeq: ['error', 'allow-null'], + 'func-name-matching': 'error', + 'grouped-accessor-pairs': 'error', + 'guard-for-in': 'error', + 'id-denylist': [ + // This sets this rule to 'error', the rest are the forbidden IDs. + 'error', + // These are basically all useless contractions. + 'buf', + 'cat', + 'err', + 'cb', + 'cfg', + 'hex', + 'int', + 'msg', + 'num', + 'opt', + 'sig', + ], + 'id-length': [ + 'error', + { + min: 2, + properties: 'never', + exceptionPatterns: ['_', 'a', 'b', 'i', 'j', 'k'], + }, + ], + 'lines-between-class-members': 'error', + 'new-cap': [ + 'error', + { + newIsCap: true, + capIsNew: false, + }, + ], + 'no-alert': 'error', + 'no-array-constructor': 'error', + 'no-bitwise': 'error', + 'no-buffer-constructor': 'error', + 'no-caller': 'error', + 'no-constructor-return': 'error', + 'no-div-regex': 'error', + 'no-else-return': 'error', + 'no-empty-function': 'error', + 'no-eq-null': 'error', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-implicit-coercion': 'error', + 'no-implicit-globals': 'error', + 'no-implied-eval': 'error', + 'no-inner-declarations': ['error', 'functions'], + 'no-invalid-this': 'error', + 'no-iterator': 'error', + 'no-label-var': 'error', + 'no-labels': [ + 'error', + { + allowLoop: false, + allowSwitch: false, + }, + ], + 'no-lone-blocks': 'error', + 'no-lonely-if': 'error', + 'no-loop-func': 'error', + 'no-multi-assign': 'error', + 'no-multi-str': 'error', + 'no-native-reassign': 'error', + 'no-negated-condition': 'error', + 'no-negated-in-lhs': 'error', + 'no-nested-ternary': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-object': 'error', + 'no-new-wrappers': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'error', + 'no-plusplus': [ + 'error', + { + allowForLoopAfterthoughts: true, + }, + ], + 'no-proto': 'error', + 'no-restricted-syntax': [ + 'error', + { + selector: 'WithStatement', + message: 'With statements are not allowed', + }, + { + selector: `BinaryExpression[operator='in']`, + message: 'The "in" operator is not allowed', + }, + // Sequence expressions have potential gotchas with Prettier, and are also + // weird! + { + selector: 'SequenceExpression', + message: 'Sequence expressions are not allowed', + }, + ], + 'no-return-assign': ['error', 'except-parens'], + 'no-script-url': 'error', + 'no-self-compare': 'error', + 'no-shadow': ['error', { builtinGlobals: true }], + 'no-template-curly-in-string': 'error', + 'no-throw-literal': 'error', + 'no-undef-init': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': [ + 'error', + { + defaultAssignment: false, + }, + ], + 'no-unused-expressions': [ + 'error', + { + allowShortCircuit: true, + allowTernary: true, + }, + ], + 'no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'all', + argsIgnorePattern: '[_]+', + ignoreRestSiblings: true, + }, + ], + 'no-use-before-define': [ + 'error', + { + functions: false, + }, + ], + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'no-void': 'error', + 'object-shorthand': 'error', + 'one-var': [ + 'error', + { + initialized: 'never', + }, + ], + 'operator-assignment': 'error', + 'padding-line-between-statements': [ + 'error', + { + blankLine: 'always', + prev: 'directive', + next: '*', + }, + { + blankLine: 'any', + prev: 'directive', + next: 'directive', + }, + ], + 'prefer-const': 'error', + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: false, + object: false, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + 'prefer-numeric-literals': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-regex-literals': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'prefer-template': 'error', + radix: 'error', + 'require-atomic-updates': 'error', + 'require-unicode-regexp': 'error', + 'spaced-comment': [ + 'error', + 'always', + { + markers: [ + 'global', + 'globals', + 'eslint', + 'eslint-disable', + '*package', + '!', + ',', + ], + exceptions: ['=', '-'], + }, + ], + 'symbol-description': 'error', + yoda: ['error', 'never'], + + /* import plugin rules */ + 'import-x/extensions': [ + 'error', + 'never', + { + json: 'always', + }, + ], + 'import-x/first': 'error', + 'import-x/newline-after-import': 'error', + 'import-x/no-absolute-path': 'error', + 'import-x/no-amd': 'error', + 'import-x/no-anonymous-default-export': 'error', + 'import-x/no-duplicates': 'error', + 'import-x/no-dynamic-require': 'error', + 'import-x/no-extraneous-dependencies': 'error', + 'import-x/no-mutable-exports': 'error', + 'import-x/no-named-as-default': 'error', + 'import-x/no-named-as-default-member': 'error', + 'import-x/no-named-default': 'error', + 'import-x/no-nodejs-modules': 'error', + 'import-x/no-self-import': 'error', + 'import-x/no-unassigned-import': 'error', + 'import-x/no-unresolved': [ + 'error', + { + commonjs: true, + }, + ], + 'import-x/no-useless-path-segments': [ + 'error', + { + commonjs: true, + noUselessIndex: true, + }, + ], + 'import-x/no-webpack-loader-syntax': 'error', + 'import-x/order': [ + 'error', + { + // This means that there will always be a newline between the import + // groups as defined below. + 'newlines-between': 'always', + + groups: [ + // "builtin" is Node.js modules that are built into the runtime, and + // "external" is everything else from node_modules. + ['builtin', 'external'], + + // "internal" is unused, but could be used for absolute imports from + // the project root. + ['internal', 'parent', 'sibling', 'index'], + ], + + // Alphabetically sort the imports within each group. + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + }, + ], + 'import-x/unambiguous': 'error', + + /* jsdoc plugin rules */ + 'jsdoc/check-access': 'error', + 'jsdoc/check-alignment': 'error', + 'jsdoc/check-line-alignment': 'error', + 'jsdoc/check-param-names': 'error', + 'jsdoc/check-property-names': 'error', + 'jsdoc/check-tag-names': 'error', + 'jsdoc/check-types': 'error', + 'jsdoc/check-values': 'error', + 'jsdoc/empty-tags': 'error', + 'jsdoc/implements-on-classes': 'error', + 'jsdoc/match-description': [ + 'error', + { tags: { param: true, returns: true } }, + ], + 'jsdoc/multiline-blocks': 'error', + 'jsdoc/no-bad-blocks': 'error', + 'jsdoc/no-defaults': 'error', + 'jsdoc/no-multi-asterisks': 'error', + 'jsdoc/require-asterisk-prefix': 'error', + 'jsdoc/require-description': 'error', + 'jsdoc/require-hyphen-before-param-description': [ + 'error', + 'always', + { tags: { returns: 'never', template: 'always', throws: 'never' } }, + ], + 'jsdoc/require-jsdoc': 'error', + 'jsdoc/require-param-name': 'error', + 'jsdoc/require-param': ['error', { unnamedRootBase: ['options'] }], + 'jsdoc/require-param-description': 'error', + 'jsdoc/require-param-type': 'error', + 'jsdoc/require-property': 'error', + 'jsdoc/require-property-description': 'error', + 'jsdoc/require-property-name': 'error', + 'jsdoc/require-property-type': 'error', + 'jsdoc/require-returns': 'error', + 'jsdoc/require-returns-check': 'error', + 'jsdoc/require-returns-description': 'error', + 'jsdoc/require-returns-type': 'error', + 'jsdoc/require-yields': 'error', + 'jsdoc/require-yields-check': 'error', + 'jsdoc/tag-lines': [ + 'error', + 'any', + { + startLines: 1, + }, + ], + 'jsdoc/valid-types': 'error', + + // 'promise/no-multiple-resolved': 'error', + }, + }, +]; + +export default rules; diff --git a/packages/base/src/index.test.js b/packages/base/src/index.test.js deleted file mode 100644 index 3ac8871d..00000000 --- a/packages/base/src/index.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const { ESLint } = require('eslint'); - -const config = require('.'); - -describe('index', () => { - it('is a valid ESLint config', async () => { - const api = new ESLint({ - baseConfig: config, - useEslintrc: false, - }); - - const result = await api.lintText(`console.log('Hello, world!');\n`); - - expect(result[0].messages).toStrictEqual([]); - expect(result[0].warningCount).toBe(0); - expect(result[0].errorCount).toBe(0); - }); -}); diff --git a/packages/browser/package.json b/packages/browser/package.json index 7945836a..b8b9ff4f 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -22,6 +22,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "eslint": "^9.11.0", "eslint-config-prettier": "^9.1.0", @@ -40,5 +41,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json index f03bdd14..bb4a850f 100644 --- a/packages/commonjs/package.json +++ b/packages/commonjs/package.json @@ -22,6 +22,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "eslint": "^9.11.0", "eslint-config-prettier": "^9.1.0", @@ -40,5 +41,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/packages/jest/package.json b/packages/jest/package.json index da39c0c4..037e1c77 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -22,6 +22,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^13.0.0", "eslint": "^9.11.0", @@ -43,5 +44,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/packages/mocha/package.json b/packages/mocha/package.json index f7a6c00f..00e3c094 100644 --- a/packages/mocha/package.json +++ b/packages/mocha/package.json @@ -22,6 +22,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^13.0.0", "eslint": "^9.11.0", @@ -43,5 +44,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index a2a2956f..ba3b9dfc 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -22,6 +22,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^13.0.0", "eslint": "^9.11.0", @@ -43,5 +44,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/packages/typescript/package.json b/packages/typescript/package.json index ceacc73c..a6126817 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -23,6 +23,7 @@ "test": "eslint ." }, "devDependencies": { + "@jest/globals": "^29.7.0", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^13.0.0", "@typescript-eslint/eslint-plugin": "^8.6.0", @@ -48,5 +49,8 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" + }, + "dependencies": { + "@eslint/js": "^9.11.0" } } diff --git a/yarn.lock b/yarn.lock index c08dd872..235327b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" + dependencies: + "@babel/highlight": ^7.24.7 + picocolors: ^1.0.0 + checksum: 830e62cd38775fdf84d612544251ce773d544a8e63df667728cc9e0126eeef14c6ebda79be0f0bc307e8318316b7f58c27ce86702e0a1f5c321d842eb38ffda4 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.23.5": version: 7.24.1 resolution: "@babel/compat-data@npm:7.24.1" @@ -39,6 +49,13 @@ __metadata: languageName: node linkType: hard +"@babel/compat-data@npm:^7.25.2": + version: 7.25.4 + resolution: "@babel/compat-data@npm:7.25.4" + checksum: b12a91d27c3731a4b0bdc9312a50b1911f41f7f728aaf0d4b32486e2257fd2cb2d3ea1a295e98449600c48f2c7883a3196ca77cda1cef7d97a10c2e83d037974 + languageName: node + linkType: hard + "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.23.9": version: 7.24.3 resolution: "@babel/core@npm:7.24.3" @@ -62,6 +79,43 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/core@npm:7.25.2" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.24.7 + "@babel/generator": ^7.25.0 + "@babel/helper-compilation-targets": ^7.25.2 + "@babel/helper-module-transforms": ^7.25.2 + "@babel/helpers": ^7.25.0 + "@babel/parser": ^7.25.0 + "@babel/template": ^7.25.0 + "@babel/traverse": ^7.25.2 + "@babel/types": ^7.25.2 + convert-source-map: ^2.0.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 9a1ef604a7eb62195f70f9370cec45472a08114e3934e3eaaedee8fd754edf0730e62347c7b4b5e67d743ce57b5bb8cf3b92459482ca94d06e06246ef021390a + languageName: node + linkType: hard + +"@babel/eslint-parser@npm:^7.25.1": + version: 7.25.1 + resolution: "@babel/eslint-parser@npm:7.25.1" + dependencies: + "@nicolo-ribaudo/eslint-scope-5-internals": 5.1.1-v1 + eslint-visitor-keys: ^2.1.0 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.11.0 + eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 + checksum: 73207b7e84a58bd6560d29f11cf5c6f9d64a01b9299d4d0a145423a028ea4c402be2fd09228647fdbec14b65a07d4138e751468fd33d9a9363c9698582fa80b5 + languageName: node + linkType: hard + "@babel/generator@npm:^7.24.1, @babel/generator@npm:^7.7.2": version: 7.24.1 resolution: "@babel/generator@npm:7.24.1" @@ -74,6 +128,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/generator@npm:7.25.6" + dependencies: + "@babel/types": ^7.25.6 + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.25 + jsesc: ^2.5.1 + checksum: b55975cd664f5602304d868bb34f4ee3bed6f5c7ce8132cd92ff27a46a53a119def28a182d91992e86f75db904f63094a81247703c4dc96e4db0c03fd04bcd68 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.23.6": version: 7.23.6 resolution: "@babel/helper-compilation-targets@npm:7.23.6" @@ -87,6 +153,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/helper-compilation-targets@npm:7.25.2" + dependencies: + "@babel/compat-data": ^7.25.2 + "@babel/helper-validator-option": ^7.24.8 + browserslist: ^4.23.1 + lru-cache: ^5.1.1 + semver: ^6.3.1 + checksum: aed33c5496cb9db4b5e2d44e26bf8bc474074cc7f7bb5ebe1d4a20fdeb362cb3ba9e1596ca18c7484bcd6e5c3a155ab975e420d520c0ae60df81f9de04d0fd16 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-environment-visitor@npm:7.22.20" @@ -122,6 +201,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" + dependencies: + "@babel/traverse": ^7.24.7 + "@babel/types": ^7.24.7 + checksum: 8ac15d96d262b8940bc469052a048e06430bba1296369be695fabdf6799f201dd0b00151762b56012a218464e706bc033f27c07f6cec20c6f8f5fd6543c67054 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.23.3": version: 7.23.3 resolution: "@babel/helper-module-transforms@npm:7.23.3" @@ -137,6 +226,20 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/helper-module-transforms@npm:7.25.2" + dependencies: + "@babel/helper-module-imports": ^7.24.7 + "@babel/helper-simple-access": ^7.24.7 + "@babel/helper-validator-identifier": ^7.24.7 + "@babel/traverse": ^7.25.2 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 282d4e3308df6746289e46e9c39a0870819630af5f84d632559171e4fae6045684d771a65f62df3d569e88ccf81dc2def78b8338a449ae3a94bb421aa14fc367 + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.22.5 resolution: "@babel/helper-plugin-utils@npm:7.22.5" @@ -144,6 +247,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-plugin-utils@npm:7.24.8" + checksum: 73b1a83ba8bcee21dc94de2eb7323207391715e4369fd55844bb15cf13e3df6f3d13a40786d990e6370bf0f571d94fc31f70dec96c1d1002058258c35ca3767a + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-simple-access@npm:7.22.5" @@ -153,6 +263,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" + dependencies: + "@babel/traverse": ^7.24.7 + "@babel/types": ^7.24.7 + checksum: ddbf55f9dea1900213f2a1a8500fabfd21c5a20f44dcfa957e4b0d8638c730f88751c77f678644f754f1a1dc73f4eb8b766c300deb45a9daad000e4247957819 + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" @@ -169,6 +289,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 39b03c5119216883878655b149148dc4d2e284791e969b19467a9411fccaa33f7a713add98f4db5ed519535f70ad273cdadfd2eb54d47ebbdeac5083351328ce + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-validator-identifier@npm:7.22.20" @@ -176,6 +303,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 6799ab117cefc0ecd35cd0b40ead320c621a298ecac88686a14cffceaac89d80cdb3c178f969861bf5fa5e4f766648f9161ea0752ecfe080d8e89e3147270257 + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.23.5": version: 7.23.5 resolution: "@babel/helper-validator-option@npm:7.23.5" @@ -183,6 +317,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c + languageName: node + linkType: hard + "@babel/helpers@npm:^7.24.1": version: 7.24.1 resolution: "@babel/helpers@npm:7.24.1" @@ -194,6 +335,16 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.25.0": + version: 7.25.6 + resolution: "@babel/helpers@npm:7.25.6" + dependencies: + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.6 + checksum: 5a548999db82049a5f7ac6de57576b4ed0d386ce07d058151698836ed411eae6230db12535487caeebb68a2ffc964491e8aead62364a5132ab0ae20e8b68e19f + languageName: node + linkType: hard + "@babel/highlight@npm:^7.24.2": version: 7.24.2 resolution: "@babel/highlight@npm:7.24.2" @@ -206,6 +357,18 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" + dependencies: + "@babel/helper-validator-identifier": ^7.24.7 + chalk: ^2.4.2 + js-tokens: ^4.0.0 + picocolors: ^1.0.0 + checksum: 5cd3a89f143671c4ac129960024ba678b669e6fc673ce078030f5175002d1d3d52bc10b22c5b916a6faf644b5028e9a4bd2bb264d053d9b05b6a98690f1d46f1 + languageName: node + linkType: hard + "@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.1": version: 7.24.1 resolution: "@babel/parser@npm:7.24.1" @@ -215,6 +378,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": ^7.25.6 + bin: + parser: ./bin/babel-parser.js + checksum: 85b237ded09ee43cc984493c35f3b1ff8a83e8dbbb8026b8132e692db6567acc5a1659ec928e4baa25499ddd840d7dae9dee3062be7108fe23ec5f94a8066b1e + languageName: node + linkType: hard + "@babel/plugin-syntax-async-generators@npm:^7.8.4": version: 7.8.4 resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" @@ -248,6 +422,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-import-attributes@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.25.6" + dependencies: + "@babel/helper-plugin-utils": ^7.24.8 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3b0928e73e42346e8a65760a3ff853c87ad693cdf11bb335a23e895e0b5b1f0601118521b3aff2a6946488a580a63afb6a5b5686153a7678b4dff0e4e4604dd7 + languageName: node + linkType: hard + "@babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" @@ -380,6 +565,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/template@npm:7.25.0" + dependencies: + "@babel/code-frame": ^7.24.7 + "@babel/parser": ^7.25.0 + "@babel/types": ^7.25.0 + checksum: 3f2db568718756d0daf2a16927b78f00c425046b654cd30b450006f2e84bdccaf0cbe6dc04994aa1f5f6a4398da2f11f3640a4d3ee31722e43539c4c919c817b + languageName: node + linkType: hard + "@babel/traverse@npm:^7.24.1": version: 7.24.1 resolution: "@babel/traverse@npm:7.24.1" @@ -398,6 +594,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.2": + version: 7.25.6 + resolution: "@babel/traverse@npm:7.25.6" + dependencies: + "@babel/code-frame": ^7.24.7 + "@babel/generator": ^7.25.6 + "@babel/parser": ^7.25.6 + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.6 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: 11ee47269aa4356f2d6633a05b9af73405b5ed72c09378daf644289b686ef852035a6ac9aa410f601991993c6bbf72006795b5478283b78eb1ca77874ada7737 + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": version: 7.24.0 resolution: "@babel/types@npm:7.24.0" @@ -409,6 +620,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" + dependencies: + "@babel/helper-string-parser": ^7.24.8 + "@babel/helper-validator-identifier": ^7.24.7 + to-fast-properties: ^2.0.0 + checksum: 9b2f84ff3f874ad05b0b9bf06862c56f478b65781801f82296b4cc01bee39e79c20a7c0a06959fed0ee582c8267e1cb21638318655c5e070b0287242a844d1c9 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -910,6 +1132,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-browser@workspace:packages/browser" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 eslint: ^9.11.0 eslint-config-prettier: ^9.1.0 @@ -927,6 +1151,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-commonjs@workspace:packages/commonjs" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 eslint: ^9.11.0 eslint-config-prettier: ^9.1.0 @@ -944,6 +1170,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-jest@workspace:packages/jest" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^13.0.0 eslint: ^9.11.0 @@ -964,6 +1192,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-mocha@workspace:packages/mocha" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^13.0.0 eslint: ^9.11.0 @@ -984,6 +1214,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-nodejs@workspace:packages/nodejs" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^13.0.0 eslint: ^9.11.0 @@ -1004,6 +1236,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config-typescript@workspace:packages/typescript" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^13.0.0 "@typescript-eslint/eslint-plugin": ^8.6.0 @@ -1028,6 +1262,8 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/eslint-config@workspace:packages/base" dependencies: + "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@metamask/auto-changelog": ^3.4.4 eslint: ^9.11.0 eslint-config-prettier: ^9.1.0 @@ -1035,6 +1271,7 @@ __metadata: eslint-plugin-jsdoc: ^50.2.4 eslint-plugin-prettier: ^5.2.1 eslint-plugin-promise: ^7.1.0 + globals: ^15.9.0 prettier: ^3.3.3 peerDependencies: eslint: ^9.11.0 @@ -1071,6 +1308,15 @@ __metadata: languageName: node linkType: hard +"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": + version: 5.1.1-v1 + resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" + dependencies: + eslint-scope: 5.1.1 + checksum: f2e3b2d6a6e2d9f163ca22105910c9f850dc4897af0aea3ef0a5886b63d8e1ba6505b71c99cb78a3bba24a09557d601eb21c8dede3f3213753fcfef364eb0e57 + languageName: node + linkType: hard + "@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": version: 1.1.0 resolution: "@noble/curves@npm:1.1.0" @@ -1862,6 +2108,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.23.1": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" + dependencies: + caniuse-lite: ^1.0.30001646 + electron-to-chromium: ^1.5.4 + node-releases: ^2.0.18 + update-browserslist-db: ^1.1.0 + bin: + browserslist: cli.js + checksum: 7906064f9970aeb941310b2fcb8b4ace4a1b50aa657c986677c6f1553a8cabcc94ee9c5922f715baffbedaa0e6cf0831b6fed7b059dde6873a4bfadcbe069c7e + languageName: node + linkType: hard + "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -1961,6 +2221,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001662 + resolution: "caniuse-lite@npm:1.0.30001662" + checksum: 7a6a0c0d9f7c4a1c51de02838eb47f41f36fff57a77b846c8faed35ba9afba17b9399bc00bd637e5c1663cbc132534085d91151de48edca2ad8932a5d87e23af + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -2290,6 +2557,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.4": + version: 1.5.27 + resolution: "electron-to-chromium@npm:1.5.27" + checksum: 1a32103306b92732979db40f299e013b94b284a80745c26390ceaee2bf76ef71a4167b1ababc17dc3d24cf4c27d5aa95dcf7c256c55c329164f726553dc9ea9a + languageName: node + linkType: hard + "emittery@npm:^0.13.1": version: 0.13.1 resolution: "emittery@npm:0.13.1" @@ -2367,6 +2641,13 @@ __metadata: languageName: node linkType: hard +"escalade@npm:^3.1.2": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 47b029c83de01b0d17ad99ed766347b974b0d628e848de404018f3abee728e987da0d2d370ad4574aa3d5b5bfc368754fd085d69a30f8e75903486ec4b5b709e + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -2553,6 +2834,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" + dependencies: + esrecurse: ^4.3.0 + estraverse: ^4.1.1 + checksum: 47e4b6a3f0cc29c7feedee6c67b225a2da7e155802c6ea13bbef4ac6b9e10c66cd2dcb987867ef176292bf4e64eccc680a49e35e9e9c669f4a02bac17e86abdb + languageName: node + linkType: hard + "eslint-scope@npm:^8.0.2": version: 8.0.2 resolution: "eslint-scope@npm:8.0.2" @@ -2574,7 +2865,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^2.0.0": +"eslint-visitor-keys@npm:^2.0.0, eslint-visitor-keys@npm:^2.1.0": version: 2.1.0 resolution: "eslint-visitor-keys@npm:2.1.0" checksum: e3081d7dd2611a35f0388bbdc2f5da60b3a3c5b8b6e928daffff7391146b434d691577aa95064c8b7faad0b8a680266bcda0a42439c18c717b80e6718d7e267d @@ -2683,6 +2974,13 @@ __metadata: languageName: node linkType: hard +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 + languageName: node + linkType: hard + "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" @@ -3078,7 +3376,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^15.0.0, globals@npm:^15.8.0": +"globals@npm:^15.0.0, globals@npm:^15.8.0, globals@npm:^15.9.0": version: 15.9.0 resolution: "globals@npm:15.9.0" checksum: 32c4470ffcc26db3ddbc579ddf968b74c26462d1a268039980c2fa2e107090fd442a7a7445d953dc4ee874f68846e713066c5a8e63d146fd9349cd1fc5a6f63d @@ -4423,6 +4721,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: ef55a3d853e1269a6d6279b7692cd6ff3e40bc74947945101138745bfdc9a5edabfe72cb19a31a8e45752e1910c4c65c77d931866af6357f242b172b7283f5b3 + languageName: node + linkType: hard + "nopt@npm:^6.0.0": version: 6.0.0 resolution: "nopt@npm:6.0.0" @@ -4692,6 +4997,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.1": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: a64d653d3a188119ff45781dfcdaeedd7625583f45280aea33fcb032c7a0d3959f2368f9b192ad5e8aade75b74dbd954ffe3106c158509a45e4c18ab379a2acd + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -4961,7 +5273,11 @@ __metadata: version: 0.0.0-use.local resolution: "root@workspace:." dependencies: + "@babel/core": ^7.25.2 + "@babel/eslint-parser": ^7.25.1 + "@babel/plugin-syntax-import-attributes": ^7.25.6 "@eslint/js": ^9.11.0 + "@jest/globals": ^29.7.0 "@lavamoat/allow-scripts": ^3.0.4 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^13.0.0 @@ -5573,6 +5889,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: ^3.1.2 + picocolors: ^1.0.1 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 7b74694d96f0c360f01b702e72353dc5a49df4fe6663d3ee4e5c628f061576cddf56af35a3a886238c01dd3d8f231b7a86a8ceaa31e7a9220ae31c1c1238e562 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1"