From b0462c435be9f84336d6d852b6a997ff7d1e7ee8 Mon Sep 17 00:00:00 2001 From: jimmy-guzman Date: Wed, 30 Oct 2024 22:27:44 -0500 Subject: [PATCH] =?UTF-8?q?test:=20=E2=9C=85=20reduce=20the=20amount=20of?= =?UTF-8?q?=20snapshots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .lefthook.json | 5 + package.json | 13 +- src/__snapshots__/factory.spec.ts.snap | 9178 -------- src/__snapshots__/index.spec.ts.snap | 9178 -------- .../__snapshots__/imports.spec.ts.snap | 8863 ------- src/configs/__snapshots__/react.spec.ts.snap | 19165 ---------------- .../__snapshots__/testing.spec.ts.snap | 3654 --- src/configs/imports.spec.ts | 3 - src/configs/react.spec.ts | 12 +- src/configs/testing.spec.ts | 3 - src/factory.spec.ts | 4 - src/index.spec.ts | 2 +- 12 files changed, 16 insertions(+), 50064 deletions(-) delete mode 100644 src/__snapshots__/factory.spec.ts.snap delete mode 100644 src/__snapshots__/index.spec.ts.snap delete mode 100644 src/configs/__snapshots__/imports.spec.ts.snap delete mode 100644 src/configs/__snapshots__/react.spec.ts.snap delete mode 100644 src/configs/__snapshots__/testing.spec.ts.snap diff --git a/.lefthook.json b/.lefthook.json index b6f90ed..1e1187e 100644 --- a/.lefthook.json +++ b/.lefthook.json @@ -12,6 +12,11 @@ "glob": "*.{md,json,yml,ts}", "run": "pnpm exec prettier --write {staged_files}", "stage_fixed": true + }, + "sort-package-json": { + "glob": "{,**/}package.json", + "run": "pnpm dlx sort-package-json {staged_files}", + "stage_fixed": true } } }, diff --git a/package.json b/package.json index 98eca98..14ba2bd 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "dist" ], "scripts": { - "typegen": "tsx scripts/typegen.ts", "build": "pnpm typegen && pkgroll --minify", "coverage": "vitest run --coverage", "dev": "pkgroll --watch", @@ -44,7 +43,8 @@ "prepack": "pnpm build && clean-pkg-json", "prepare": "is-ci || lefthook install", "test": "vitest", - "typecheck": "tsc" + "typecheck": "tsc", + "typegen": "tsx scripts/typegen.ts" }, "prettier": "@jimmy.codes/prettier-config", "dependencies": { @@ -52,8 +52,8 @@ "@tanstack/eslint-plugin-query": "^5.59.7", "@types/eslint": "8.56.10", "@types/eslint__js": "8.42.3", - "@typescript-eslint/utils": "^8.12.2", "@typescript-eslint/parser": "^8.12.2", + "@typescript-eslint/utils": "^8.12.2", "astro-eslint-parser": "^1.0.3", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", @@ -115,13 +115,6 @@ "publishConfig": { "access": "public" }, - "pnpm": { - "peerDependencyRules": { - "ignoreMissing": [ - "eslint-plugin-import" - ] - } - }, "gitzy": { "useCommitlintConfig": true } diff --git a/src/__snapshots__/factory.spec.ts.snap b/src/__snapshots__/factory.spec.ts.snap deleted file mode 100644 index 36de544..0000000 --- a/src/__snapshots__/factory.spec.ts.snap +++ /dev/null @@ -1,9178 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`jimmyDotCodes > should create default configuration 1`] = ` -[ - { - "name": "jimmy.codes/base", - "rules": { - "arrow-body-style": [ - "error", - "always", - ], - "constructor-super": "error", - "curly": [ - "error", - "multi-or-nest", - "consistent", - ], - "for-direction": "error", - "getter-return": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-console": "warn", - "no-const-assign": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-extra-semi": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-import-assign": "error", - "no-inner-declarations": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-mixed-spaces-and-tabs": "error", - "no-new-symbol": "error", - "no-nonoctal-decimal-escape": "error", - "no-obj-calls": "error", - "no-octal": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-setter-return": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-this-before-super": "error", - "no-undef": "error", - "no-unexpected-multiline": "error", - "no-unreachable": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-labels": "error", - "no-unused-vars": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-escape": "error", - "no-useless-rename": "error", - "no-with": "error", - "object-shorthand": "error", - "prefer-arrow-callback": "error", - "require-yield": "error", - "use-isnan": "error", - "valid-typeof": "error", - }, - }, - { - "languageOptions": { - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - }, - }, - "name": "jimmy.codes/imports", - "plugins": { - "import-x": { - "configs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "flatConfigs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "name": "import-x/errors", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ".mjs", - ".cjs", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "languageOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "name": "import-x/recommended", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "name": "import-x/stage-0", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "name": "import-x/warnings", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - "node-import": { - "rules": { - "prefer-node-protocol": { - "create": [Function], - "meta": { - "docs": { - "description": "Prefer using the \`node:\` protocol when importing Node.js builtin modules.", - "recommended": true, - "url": "https://github.com/kytta/eslint-plugin-node-import/blob/main/docs/rules/prefer-node-protocol", - }, - "fixable": "code", - "messages": { - "prefer-node-protocol": "Consider using \`node:{{ moduleName }}\` over \`{{ moduleName }}\`.", - }, - "schema": [], - "type": "problem", - }, - }, - }, - }, - "simple-import-sort": { - "meta": { - "name": "eslint-plugin-simple-import-sort", - "version": "12.1.1", - }, - "rules": { - "exports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort exports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these exports!", - }, - "schema": [], - "type": "layout", - }, - }, - "imports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort imports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these imports!", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "groups": { - "items": { - "items": { - "type": "string", - }, - "type": "array", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/first": "error", - "import-x/named": "error", - "import-x/namespace": "off", - "import-x/newline-after-import": "error", - "import-x/no-absolute-path": "error", - "import-x/no-duplicates": "warn", - "import-x/no-empty-named-blocks": "error", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-self-import": "error", - "import-x/no-unresolved": "error", - "import-x/no-useless-path-segments": "error", - "node-import/prefer-node-protocol": "error", - "simple-import-sort/exports": "error", - "simple-import-sort/imports": "error", - }, - "settings": { - "import-x/parsers": { - "espree": [ - ".js", - ".cjs", - ".mjs", - ".jsx", - ], - }, - }, - }, - { - "name": "jimmy.codes/disabled", - "rules": { - "@babel/object-curly-spacing": "off", - "@babel/semi": "off", - "@typescript-eslint/block-spacing": "off", - "@typescript-eslint/brace-style": "off", - "@typescript-eslint/comma-dangle": "off", - "@typescript-eslint/comma-spacing": "off", - "@typescript-eslint/func-call-spacing": "off", - "@typescript-eslint/indent": "off", - "@typescript-eslint/key-spacing": "off", - "@typescript-eslint/keyword-spacing": "off", - "@typescript-eslint/lines-around-comment": 0, - "@typescript-eslint/member-delimiter-style": "off", - "@typescript-eslint/no-extra-parens": "off", - "@typescript-eslint/no-extra-semi": "off", - "@typescript-eslint/object-curly-spacing": "off", - "@typescript-eslint/quotes": 0, - "@typescript-eslint/semi": "off", - "@typescript-eslint/space-before-blocks": "off", - "@typescript-eslint/space-before-function-paren": "off", - "@typescript-eslint/space-infix-ops": "off", - "@typescript-eslint/type-annotation-spacing": "off", - "array-bracket-newline": "off", - "array-bracket-spacing": "off", - "array-element-newline": "off", - "arrow-parens": "off", - "arrow-spacing": "off", - "babel/object-curly-spacing": "off", - "babel/quotes": 0, - "babel/semi": "off", - "block-spacing": "off", - "brace-style": "off", - "comma-dangle": "off", - "comma-spacing": "off", - "comma-style": "off", - "computed-property-spacing": "off", - "curly": 0, - "dot-location": "off", - "eol-last": "off", - "flowtype/boolean-style": "off", - "flowtype/delimiter-dangle": "off", - "flowtype/generic-spacing": "off", - "flowtype/object-type-curly-spacing": "off", - "flowtype/object-type-delimiter": "off", - "flowtype/quotes": "off", - "flowtype/semi": "off", - "flowtype/space-after-type-colon": "off", - "flowtype/space-before-generic-bracket": "off", - "flowtype/space-before-type-colon": "off", - "flowtype/union-intersection-spacing": "off", - "func-call-spacing": "off", - "function-call-argument-newline": "off", - "function-paren-newline": "off", - "generator-star": "off", - "generator-star-spacing": "off", - "implicit-arrow-linebreak": "off", - "indent": "off", - "indent-legacy": "off", - "jsx-quotes": "off", - "key-spacing": "off", - "keyword-spacing": "off", - "linebreak-style": "off", - "lines-around-comment": 0, - "max-len": 0, - "max-statements-per-line": "off", - "multiline-ternary": "off", - "new-parens": "off", - "newline-per-chained-call": "off", - "no-arrow-condition": "off", - "no-comma-dangle": "off", - "no-confusing-arrow": 0, - "no-extra-parens": "off", - "no-extra-semi": "off", - "no-floating-decimal": "off", - "no-mixed-operators": 0, - "no-mixed-spaces-and-tabs": "off", - "no-multi-spaces": "off", - "no-multiple-empty-lines": "off", - "no-reserved-keys": "off", - "no-space-before-semi": "off", - "no-spaced-func": "off", - "no-tabs": 0, - "no-trailing-spaces": "off", - "no-unexpected-multiline": 0, - "no-whitespace-before-property": "off", - "no-wrap-func": "off", - "nonblock-statement-body-position": "off", - "object-curly-newline": "off", - "object-curly-spacing": "off", - "object-property-newline": "off", - "one-var-declaration-per-line": "off", - "operator-linebreak": "off", - "padded-blocks": "off", - "quote-props": "off", - "quotes": 0, - "react/jsx-child-element-spacing": "off", - "react/jsx-closing-bracket-location": "off", - "react/jsx-closing-tag-location": "off", - "react/jsx-curly-newline": "off", - "react/jsx-curly-spacing": "off", - "react/jsx-equals-spacing": "off", - "react/jsx-first-prop-new-line": "off", - "react/jsx-indent": "off", - "react/jsx-indent-props": "off", - "react/jsx-max-props-per-line": "off", - "react/jsx-newline": "off", - "react/jsx-one-expression-per-line": "off", - "react/jsx-props-no-multi-spaces": "off", - "react/jsx-space-before-closing": "off", - "react/jsx-tag-spacing": "off", - "react/jsx-wrap-multilines": "off", - "rest-spread-spacing": "off", - "semi": "off", - "semi-spacing": "off", - "semi-style": "off", - "space-after-function-name": "off", - "space-after-keywords": "off", - "space-before-blocks": "off", - "space-before-function-paren": "off", - "space-before-function-parentheses": "off", - "space-before-keywords": "off", - "space-in-brackets": "off", - "space-in-parens": "off", - "space-infix-ops": "off", - "space-return-throw-case": "off", - "space-unary-ops": "off", - "space-unary-word-ops": "off", - "standard/array-bracket-even-spacing": "off", - "standard/computed-property-even-spacing": "off", - "standard/object-curly-even-spacing": "off", - "switch-colon-spacing": "off", - "template-curly-spacing": "off", - "template-tag-spacing": "off", - "unicorn/empty-brace-spaces": "off", - "unicorn/no-nested-ternary": "off", - "unicorn/number-literal-case": "off", - "unicorn/template-indent": 0, - "vue/array-bracket-newline": "off", - "vue/array-bracket-spacing": "off", - "vue/array-element-newline": "off", - "vue/arrow-spacing": "off", - "vue/block-spacing": "off", - "vue/block-tag-newline": "off", - "vue/brace-style": "off", - "vue/comma-dangle": "off", - "vue/comma-spacing": "off", - "vue/comma-style": "off", - "vue/dot-location": "off", - "vue/func-call-spacing": "off", - "vue/html-closing-bracket-newline": "off", - "vue/html-closing-bracket-spacing": "off", - "vue/html-end-tags": "off", - "vue/html-indent": "off", - "vue/html-quotes": "off", - "vue/html-self-closing": 0, - "vue/key-spacing": "off", - "vue/keyword-spacing": "off", - "vue/max-attributes-per-line": "off", - "vue/max-len": 0, - "vue/multiline-html-element-content-newline": "off", - "vue/multiline-ternary": "off", - "vue/mustache-interpolation-spacing": "off", - "vue/no-extra-parens": "off", - "vue/no-multi-spaces": "off", - "vue/no-spaces-around-equal-signs-in-attribute": "off", - "vue/object-curly-newline": "off", - "vue/object-curly-spacing": "off", - "vue/object-property-newline": "off", - "vue/operator-linebreak": "off", - "vue/quote-props": "off", - "vue/script-indent": "off", - "vue/singleline-html-element-content-newline": "off", - "vue/space-in-parens": "off", - "vue/space-infix-ops": "off", - "vue/space-unary-ops": "off", - "vue/template-curly-spacing": "off", - "wrap-iife": "off", - "wrap-regex": "off", - "yield-star-spacing": "off", - }, - }, - { - "files": [ - "**/*.cjs", - ], - "languageOptions": { - "globals": { - "exports": true, - "global": false, - "module": false, - "require": false, - }, - }, - "name": "jimmy.codes/commonjs", - }, - { - "ignores": [ - "**/node_modules", - "**/dist", - "**/package-lock.json", - "**/yarn.lock", - "**/pnpm-lock.yaml", - "**/bun.lockb", - "**/output", - "**/coverage", - "**/temp", - "**/.temp", - "**/tmp", - "**/.tmp", - "**/.history", - "**/.vitepress/cache", - "**/.nuxt", - "**/.next", - "**/.vercel", - "**/.changeset", - "**/.idea", - "**/.cache", - "**/.output", - "**/.vite-inspect", - "**/.yarn", - "**/storybook-static", - "**/.eslint-config-inspector", - "**/playwright-report", - "**/.astro", - "**/CHANGELOG*.md", - "**/*.min.*", - "**/LICENSE*", - "**/__snapshots__", - "**/auto-import?(s).d.ts", - "**/components.d.ts", - "**/vite.config.ts.*.mjs", - "!.storybook", - ], - }, -] -`; diff --git a/src/__snapshots__/index.spec.ts.snap b/src/__snapshots__/index.spec.ts.snap deleted file mode 100644 index 250280d..0000000 --- a/src/__snapshots__/index.spec.ts.snap +++ /dev/null @@ -1,9178 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`should create default configuration 1`] = ` -[ - { - "name": "jimmy.codes/base", - "rules": { - "arrow-body-style": [ - "error", - "always", - ], - "constructor-super": "error", - "curly": [ - "error", - "multi-or-nest", - "consistent", - ], - "for-direction": "error", - "getter-return": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-console": "warn", - "no-const-assign": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-extra-semi": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-import-assign": "error", - "no-inner-declarations": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-mixed-spaces-and-tabs": "error", - "no-new-symbol": "error", - "no-nonoctal-decimal-escape": "error", - "no-obj-calls": "error", - "no-octal": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-setter-return": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-this-before-super": "error", - "no-undef": "error", - "no-unexpected-multiline": "error", - "no-unreachable": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-labels": "error", - "no-unused-vars": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-escape": "error", - "no-useless-rename": "error", - "no-with": "error", - "object-shorthand": "error", - "prefer-arrow-callback": "error", - "require-yield": "error", - "use-isnan": "error", - "valid-typeof": "error", - }, - }, - { - "languageOptions": { - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - }, - }, - "name": "jimmy.codes/imports", - "plugins": { - "import-x": { - "configs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "flatConfigs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "name": "import-x/errors", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ".mjs", - ".cjs", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "languageOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "name": "import-x/recommended", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "name": "import-x/stage-0", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "name": "import-x/warnings", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - "node-import": { - "rules": { - "prefer-node-protocol": { - "create": [Function], - "meta": { - "docs": { - "description": "Prefer using the \`node:\` protocol when importing Node.js builtin modules.", - "recommended": true, - "url": "https://github.com/kytta/eslint-plugin-node-import/blob/main/docs/rules/prefer-node-protocol", - }, - "fixable": "code", - "messages": { - "prefer-node-protocol": "Consider using \`node:{{ moduleName }}\` over \`{{ moduleName }}\`.", - }, - "schema": [], - "type": "problem", - }, - }, - }, - }, - "simple-import-sort": { - "meta": { - "name": "eslint-plugin-simple-import-sort", - "version": "12.1.1", - }, - "rules": { - "exports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort exports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these exports!", - }, - "schema": [], - "type": "layout", - }, - }, - "imports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort imports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these imports!", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "groups": { - "items": { - "items": { - "type": "string", - }, - "type": "array", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/first": "error", - "import-x/named": "error", - "import-x/namespace": "off", - "import-x/newline-after-import": "error", - "import-x/no-absolute-path": "error", - "import-x/no-duplicates": "warn", - "import-x/no-empty-named-blocks": "error", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-self-import": "error", - "import-x/no-unresolved": "error", - "import-x/no-useless-path-segments": "error", - "node-import/prefer-node-protocol": "error", - "simple-import-sort/exports": "error", - "simple-import-sort/imports": "error", - }, - "settings": { - "import-x/parsers": { - "espree": [ - ".js", - ".cjs", - ".mjs", - ".jsx", - ], - }, - }, - }, - { - "name": "jimmy.codes/disabled", - "rules": { - "@babel/object-curly-spacing": "off", - "@babel/semi": "off", - "@typescript-eslint/block-spacing": "off", - "@typescript-eslint/brace-style": "off", - "@typescript-eslint/comma-dangle": "off", - "@typescript-eslint/comma-spacing": "off", - "@typescript-eslint/func-call-spacing": "off", - "@typescript-eslint/indent": "off", - "@typescript-eslint/key-spacing": "off", - "@typescript-eslint/keyword-spacing": "off", - "@typescript-eslint/lines-around-comment": 0, - "@typescript-eslint/member-delimiter-style": "off", - "@typescript-eslint/no-extra-parens": "off", - "@typescript-eslint/no-extra-semi": "off", - "@typescript-eslint/object-curly-spacing": "off", - "@typescript-eslint/quotes": 0, - "@typescript-eslint/semi": "off", - "@typescript-eslint/space-before-blocks": "off", - "@typescript-eslint/space-before-function-paren": "off", - "@typescript-eslint/space-infix-ops": "off", - "@typescript-eslint/type-annotation-spacing": "off", - "array-bracket-newline": "off", - "array-bracket-spacing": "off", - "array-element-newline": "off", - "arrow-parens": "off", - "arrow-spacing": "off", - "babel/object-curly-spacing": "off", - "babel/quotes": 0, - "babel/semi": "off", - "block-spacing": "off", - "brace-style": "off", - "comma-dangle": "off", - "comma-spacing": "off", - "comma-style": "off", - "computed-property-spacing": "off", - "curly": 0, - "dot-location": "off", - "eol-last": "off", - "flowtype/boolean-style": "off", - "flowtype/delimiter-dangle": "off", - "flowtype/generic-spacing": "off", - "flowtype/object-type-curly-spacing": "off", - "flowtype/object-type-delimiter": "off", - "flowtype/quotes": "off", - "flowtype/semi": "off", - "flowtype/space-after-type-colon": "off", - "flowtype/space-before-generic-bracket": "off", - "flowtype/space-before-type-colon": "off", - "flowtype/union-intersection-spacing": "off", - "func-call-spacing": "off", - "function-call-argument-newline": "off", - "function-paren-newline": "off", - "generator-star": "off", - "generator-star-spacing": "off", - "implicit-arrow-linebreak": "off", - "indent": "off", - "indent-legacy": "off", - "jsx-quotes": "off", - "key-spacing": "off", - "keyword-spacing": "off", - "linebreak-style": "off", - "lines-around-comment": 0, - "max-len": 0, - "max-statements-per-line": "off", - "multiline-ternary": "off", - "new-parens": "off", - "newline-per-chained-call": "off", - "no-arrow-condition": "off", - "no-comma-dangle": "off", - "no-confusing-arrow": 0, - "no-extra-parens": "off", - "no-extra-semi": "off", - "no-floating-decimal": "off", - "no-mixed-operators": 0, - "no-mixed-spaces-and-tabs": "off", - "no-multi-spaces": "off", - "no-multiple-empty-lines": "off", - "no-reserved-keys": "off", - "no-space-before-semi": "off", - "no-spaced-func": "off", - "no-tabs": 0, - "no-trailing-spaces": "off", - "no-unexpected-multiline": 0, - "no-whitespace-before-property": "off", - "no-wrap-func": "off", - "nonblock-statement-body-position": "off", - "object-curly-newline": "off", - "object-curly-spacing": "off", - "object-property-newline": "off", - "one-var-declaration-per-line": "off", - "operator-linebreak": "off", - "padded-blocks": "off", - "quote-props": "off", - "quotes": 0, - "react/jsx-child-element-spacing": "off", - "react/jsx-closing-bracket-location": "off", - "react/jsx-closing-tag-location": "off", - "react/jsx-curly-newline": "off", - "react/jsx-curly-spacing": "off", - "react/jsx-equals-spacing": "off", - "react/jsx-first-prop-new-line": "off", - "react/jsx-indent": "off", - "react/jsx-indent-props": "off", - "react/jsx-max-props-per-line": "off", - "react/jsx-newline": "off", - "react/jsx-one-expression-per-line": "off", - "react/jsx-props-no-multi-spaces": "off", - "react/jsx-space-before-closing": "off", - "react/jsx-tag-spacing": "off", - "react/jsx-wrap-multilines": "off", - "rest-spread-spacing": "off", - "semi": "off", - "semi-spacing": "off", - "semi-style": "off", - "space-after-function-name": "off", - "space-after-keywords": "off", - "space-before-blocks": "off", - "space-before-function-paren": "off", - "space-before-function-parentheses": "off", - "space-before-keywords": "off", - "space-in-brackets": "off", - "space-in-parens": "off", - "space-infix-ops": "off", - "space-return-throw-case": "off", - "space-unary-ops": "off", - "space-unary-word-ops": "off", - "standard/array-bracket-even-spacing": "off", - "standard/computed-property-even-spacing": "off", - "standard/object-curly-even-spacing": "off", - "switch-colon-spacing": "off", - "template-curly-spacing": "off", - "template-tag-spacing": "off", - "unicorn/empty-brace-spaces": "off", - "unicorn/no-nested-ternary": "off", - "unicorn/number-literal-case": "off", - "unicorn/template-indent": 0, - "vue/array-bracket-newline": "off", - "vue/array-bracket-spacing": "off", - "vue/array-element-newline": "off", - "vue/arrow-spacing": "off", - "vue/block-spacing": "off", - "vue/block-tag-newline": "off", - "vue/brace-style": "off", - "vue/comma-dangle": "off", - "vue/comma-spacing": "off", - "vue/comma-style": "off", - "vue/dot-location": "off", - "vue/func-call-spacing": "off", - "vue/html-closing-bracket-newline": "off", - "vue/html-closing-bracket-spacing": "off", - "vue/html-end-tags": "off", - "vue/html-indent": "off", - "vue/html-quotes": "off", - "vue/html-self-closing": 0, - "vue/key-spacing": "off", - "vue/keyword-spacing": "off", - "vue/max-attributes-per-line": "off", - "vue/max-len": 0, - "vue/multiline-html-element-content-newline": "off", - "vue/multiline-ternary": "off", - "vue/mustache-interpolation-spacing": "off", - "vue/no-extra-parens": "off", - "vue/no-multi-spaces": "off", - "vue/no-spaces-around-equal-signs-in-attribute": "off", - "vue/object-curly-newline": "off", - "vue/object-curly-spacing": "off", - "vue/object-property-newline": "off", - "vue/operator-linebreak": "off", - "vue/quote-props": "off", - "vue/script-indent": "off", - "vue/singleline-html-element-content-newline": "off", - "vue/space-in-parens": "off", - "vue/space-infix-ops": "off", - "vue/space-unary-ops": "off", - "vue/template-curly-spacing": "off", - "wrap-iife": "off", - "wrap-regex": "off", - "yield-star-spacing": "off", - }, - }, - { - "files": [ - "**/*.cjs", - ], - "languageOptions": { - "globals": { - "exports": true, - "global": false, - "module": false, - "require": false, - }, - }, - "name": "jimmy.codes/commonjs", - }, - { - "ignores": [ - "**/node_modules", - "**/dist", - "**/package-lock.json", - "**/yarn.lock", - "**/pnpm-lock.yaml", - "**/bun.lockb", - "**/output", - "**/coverage", - "**/temp", - "**/.temp", - "**/tmp", - "**/.tmp", - "**/.history", - "**/.vitepress/cache", - "**/.nuxt", - "**/.next", - "**/.vercel", - "**/.changeset", - "**/.idea", - "**/.cache", - "**/.output", - "**/.vite-inspect", - "**/.yarn", - "**/storybook-static", - "**/.eslint-config-inspector", - "**/playwright-report", - "**/.astro", - "**/CHANGELOG*.md", - "**/*.min.*", - "**/LICENSE*", - "**/__snapshots__", - "**/auto-import?(s).d.ts", - "**/components.d.ts", - "**/vite.config.ts.*.mjs", - "!.storybook", - ], - }, -] -`; diff --git a/src/configs/__snapshots__/imports.spec.ts.snap b/src/configs/__snapshots__/imports.spec.ts.snap deleted file mode 100644 index ea5eea1..0000000 --- a/src/configs/__snapshots__/imports.spec.ts.snap +++ /dev/null @@ -1,8863 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`importsConfig > should create default config 1`] = ` -[ - { - "languageOptions": { - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - }, - }, - "name": "jimmy.codes/imports", - "plugins": { - "import-x": { - "configs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "plugins": [ - "import-x", - ], - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "plugins": [ - "import-x", - ], - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "flatConfigs": { - "electron": { - "settings": { - "import-x/core-modules": [ - "electron", - ], - }, - }, - "errors": { - "name": "import-x/errors", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": 2, - "import-x/export": 2, - "import-x/named": 2, - "import-x/namespace": 2, - "import-x/no-unresolved": 2, - }, - }, - "react": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "settings": { - "import-x/extensions": [ - ".js", - ".jsx", - ".mjs", - ".cjs", - ], - }, - }, - "react-native": { - "settings": { - "import-x/resolver": { - "node": { - "extensions": [ - ".js", - ".web.js", - ".ios.js", - ".android.js", - ], - }, - }, - }, - }, - "recommended": { - "languageOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - }, - "name": "import-x/recommended", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/named": "error", - "import-x/namespace": "error", - "import-x/no-duplicates": "warn", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-unresolved": "error", - }, - }, - "stage-0": { - "name": "import-x/stage-0", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-deprecated": 1, - }, - }, - "typescript": { - "rules": { - "import-x/named": "off", - }, - "settings": { - "import-x/extensions": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ".js", - ".jsx", - ".cjs", - ".mjs", - ], - "import-x/external-module-folders": [ - "node_modules", - "node_modules/@types", - ], - "import-x/parsers": { - "@typescript-eslint/parser": [ - ".ts", - ".tsx", - ".cts", - ".mts", - ], - }, - "import-x/resolver": { - "typescript": true, - }, - }, - }, - "warnings": { - "name": "import-x/warnings", - "plugins": { - "import-x": { - "meta": { - "name": "eslint-plugin-import-x", - "version": "4.4.0", - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - }, - "rules": { - "import-x/no-duplicates": 1, - "import-x/no-named-as-default": 1, - "import-x/no-named-as-default-member": 1, - "import-x/no-rename-default": 1, - }, - }, - }, - "rules": { - "consistent-type-specifier-style": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce or ban the use of inline type-only markers for named imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/consistent-type-specifier-style.md", - }, - "fixable": "code", - "messages": { - "inline": "Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.", - "topLevel": "Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.", - }, - "schema": [ - { - "default": "prefer-inline", - "enum": [ - "prefer-inline", - "prefer-top-level", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure a default export is present, given a default import.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/default.md", - }, - "messages": { - "noDefaultExport": "No default export found in imported module "{{module}}".", - }, - "schema": [], - "type": "problem", - }, - }, - "dynamic-import-chunkname": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/dynamic-import-chunkname.md", - }, - "hasSuggestions": true, - "messages": { - "blockComment": "dynamic imports require a /* foo */ style comment, not a // foo comment", - "chunknameFormat": "dynamic imports require a leading comment in the form /* {{format}} */", - "leadingComment": "dynamic imports require a leading comment with the webpack chunkname", - "paddedSpaces": "dynamic imports require a block comment padded with spaces - /* foo */", - "webpackComment": "dynamic imports require a "webpack" comment with valid syntax", - "webpackEagerModeNoChunkName": "dynamic imports using eager mode do not need a webpackChunkName", - "webpackRemoveChunkName": "Remove webpackChunkName", - "webpackRemoveEagerMode": "Remove webpackMode", - }, - "schema": [ - { - "properties": { - "allowEmpty": { - "type": "boolean", - }, - "importFunctions": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "webpackChunknameFormat": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid any invalid exports, i.e. re-export of the same name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/export.md", - }, - "messages": { - "multiDefault": "Multiple default exports.", - "multiNamed": "Multiple exports of name '{{name}}'.", - "noNamed": "No named exports found in module '{{module}}'.", - }, - "schema": [], - "type": "problem", - }, - }, - "exports-last": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all exports appear after other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/exports-last.md", - }, - "messages": { - "end": "Export statements should appear at the end of the file", - }, - "schema": [], - "type": "suggestion", - }, - }, - "extensions": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure consistent use of file extension within the import path.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/extensions.md", - }, - "messages": { - "missing": "Missing file extension {{extension}}for "{{importPath}}"", - "unexpected": "Unexpected use of file extension "{{extension}}" for "{{importPath}}"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "properties": { - "checkTypeImports": { - "type": "boolean", - }, - "ignorePackages": { - "type": "boolean", - }, - "pattern": { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - { - "patternProperties": { - ".*": { - "enum": [ - "always", - "ignorePackages", - "never", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Ensure all imports appear before other statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "group-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer named exports to be grouped together in a single export declaration.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/group-exports.md", - }, - "messages": { - "AssignmentExpression": "Multiple CommonJS exports; consolidate all exports into a single assignment to \`module.exports\`", - "ExportNamedDeclaration": "Multiple named export declarations; consolidate all named exports into a single export declaration", - }, - "schema": [], - "type": "suggestion", - }, - }, - "imports-first": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "category": "Style guide", - "description": "Replaced by \`import-x/first\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/imports-first.md", - }, - "fixable": "code", - "messages": { - "absolute": "Absolute imports should come before relative imports.", - "order": "Import in body of module; reorder to top.", - }, - "schema": [ - { - "enum": [ - "absolute-first", - "disable-absolute-first", - ], - "type": "string", - }, - ], - "type": "suggestion", - }, - }, - "max-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce the maximum number of dependencies a module can have.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/max-dependencies.md", - }, - "messages": { - "max": "Maximum number of dependencies ({{max}}) exceeded.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreTypeImports": { - "type": "boolean", - }, - "max": { - "type": "number", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "named": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure named imports correspond to a named export in the remote file.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/named.md", - }, - "messages": { - "notFound": "{{name}} not found in '{{path}}'", - "notFoundDeep": "{{name}} not found via {{deepPath}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "namespace": { - "create": [Function], - "defaultOptions": [ - { - "allowComputed": false, - }, - ], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imported namespaces contain dereferenced properties as they are dereferenced.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/namespace.md", - }, - "messages": { - "computedReference": "Unable to validate computed reference to imported namespace '{{namespace}}'.", - "namespaceMember": "Assignment to member of namespace '{{namespace}}'.", - "noNamesFound": "No exported names found in module '{{module}}'.", - "notFoundInNamespace": "'{{name}}' not found in {{depth}}imported namespace '{{namepath}}'.", - "topLevelNames": "Only destructure top-level names.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowComputed": { - "default": false, - "description": "If \`false\`, will report computed (and thus, un-lintable) references to namespace members.", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "newline-after-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a newline after import statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/newline-after-import.md", - }, - "fixable": "whitespace", - "messages": { - "newline": "Expected {{count}} empty line{{lineSuffix}} after {{type}} statement not followed by another {{type}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerComments": { - "type": "boolean", - }, - "count": { - "minimum": 1, - "type": "integer", - }, - "exactCount": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "no-absolute-path": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid import of modules using absolute paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-absolute-path.md", - }, - "fixable": "code", - "messages": { - "absolute": "Do not import modules using an absolute path", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-amd": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid AMD \`require\` and \`define\` calls.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-amd.md", - }, - "messages": { - "amd": "Expected imports instead of AMD {{type}}().", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-anonymous-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid anonymous values as default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-anonymous-default-export.md", - }, - "messages": { - "anonymous": "Unexpected default export of anonymous {{type}}", - "assign": "Assign {{type}} to a variable before exporting as module default", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAnonymousClass": { - "description": "If \`false\`, will report default export of an anonymous class", - "type": "boolean", - }, - "allowAnonymousFunction": { - "description": "If \`false\`, will report default export of an anonymous function", - "type": "boolean", - }, - "allowArray": { - "description": "If \`false\`, will report default export of an array", - "type": "boolean", - }, - "allowArrowFunction": { - "description": "If \`false\`, will report default export of an arrow function", - "type": "boolean", - }, - "allowCallExpression": { - "description": "If \`false\`, will report default export of a function call", - "type": "boolean", - }, - "allowLiteral": { - "description": "If \`false\`, will report default export of a literal", - "type": "boolean", - }, - "allowNew": { - "description": "If \`false\`, will report default export of a class instantiation", - "type": "boolean", - }, - "allowObject": { - "description": "If \`false\`, will report default export of an object expression", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-commonjs": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid CommonJS \`require\` calls and \`module.exports\` or \`exports.*\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-commonjs.md", - }, - "messages": { - "export": "Expected "export" or "export default"", - "import": "Expected "import" instead of "require()"", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "allow-primitive-modules", - ], - "type": "string", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalProperties": false, - "properties": { - "allowConditionalRequire": { - "type": "boolean", - }, - "allowPrimitiveModules": { - "type": "boolean", - }, - "allowRequire": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "no-cycle": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing a module with a dependency path back to itself.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-cycle.md", - }, - "messages": { - "cycle": "Dependency cycle {{source}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowUnsafeDynamicCyclicDependency": { - "default": false, - "description": "Allow cyclic dependency if there is at least one dynamic import in the chain", - "type": "boolean", - }, - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "ignoreExternal": { - "default": false, - "description": "ignore external modules", - "type": "boolean", - }, - "maxDepth": { - "anyOf": [ - { - "description": "maximum dependency depth to traverse", - "minimum": 1, - "type": "integer", - }, - { - "enum": [ - "∞", - ], - "type": "string", - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-default-export.md", - }, - "messages": { - "noAliasDefault": "Do not alias \`{{local}}\` as \`default\`. Just export \`{{local}}\` itself instead.", - "preferNamed": "Prefer named exports.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-deprecated": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid imported names marked with \`@deprecated\` documentation tag.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "Deprecated{{description}}", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-duplicates": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid repeated import of the same module in multiple places.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-duplicates.md", - }, - "fixable": "code", - "messages": { - "duplicate": "'{{module}}' imported multiple times.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "considerQueryString": { - "type": "boolean", - }, - "prefer-inline": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-dynamic-require": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid \`require()\` calls with expressions.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-dynamic-require.md", - }, - "messages": { - "import": "Calls to import() should use string literals", - "require": "Calls to require() should use string literals", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "esmodule": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-empty-named-blocks": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid empty named import blocks.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-empty-named-blocks.md", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "emptyImport": "Remove empty import block", - "emptyNamed": "Unexpected empty named import block", - "unused": "Remove unused import", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-extraneous-dependencies": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of extraneous packages.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-extraneous-dependencies.md", - }, - "messages": { - "devDep": "'{{packageName}}' should be listed in the project's dependencies, not devDependencies.", - "missing": "'{{packageName}}' should be listed in the project's dependencies. Run 'npm i -S {{packageName}}' to add it", - "optDep": "'{{packageName}}' should be listed in the project's dependencies, not optionalDependencies.", - "pkgNotFound": "The package.json file could not be found.", - "pkgUnparsable": "The package.json file could not be parsed: {{error}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "bundledDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "includeInternal": { - "type": [ - "boolean", - ], - }, - "includeTypes": { - "type": [ - "boolean", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "packageDir": { - "type": [ - "string", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "whitelist": { - "type": [ - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-import-module-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid import statements with CommonJS module.exports.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-import-module-exports.md", - }, - "fixable": "code", - "messages": { - "notAllowed": "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "exceptions": { - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-internal-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing the submodules of other modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-internal-modules.md", - }, - "messages": { - "noAllowed": "Reaching to "{{importPath}}" is not allowed.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "suggestion", - }, - }, - "no-mutable-exports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid the use of mutable exports with \`var\` or \`let\`.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-mutable-exports.md", - }, - "messages": { - "noMutable": "Exporting mutable '{{kind}}' binding, use 'const' instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-as-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as identifier of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default.md", - }, - "messages": { - "default": "Using exported name '{{name}}' as identifier for default export.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-named-as-default-member": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid use of exported name as property of default export.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-as-default-member.md", - }, - "messages": { - "member": "Caution: \`{{objectName}}\` also has a named export \`{{propName}}\`. Check if you meant to write \`import {{{propName}}} from '{{sourcePath}}'\` instead.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named default exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-default.md", - }, - "messages": { - "default": "Use default import syntax to import '{{importName}}'.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-named-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid named exports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-named-export.md", - }, - "messages": { - "noAllowed": "Named exports are not allowed.", - }, - "schema": [], - "type": "suggestion", - }, - }, - "no-namespace": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid namespace (a.k.a. "wildcard" \`*\`) imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-namespace.md", - }, - "fixable": "code", - "messages": { - "noNamespace": "Unexpected namespace import.", - }, - "schema": [ - { - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-nodejs-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid Node.js builtin modules.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-nodejs-modules.md", - }, - "messages": { - "builtin": "Do not import Node.js builtin module "{{moduleName}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-packages": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing packages through relative paths.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-packages.md", - }, - "fixable": "code", - "messages": { - "noAllowed": "Relative import from another package is not allowed. Use \`{{properImport}}\` instead of \`{{importPath}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-relative-parent-imports": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid importing modules from parent directories.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-relative-parent-imports.md", - }, - "messages": { - "noAllowed": "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move \`{{filename}}\` to same directory as \`{{depPath}}\` or consider making \`{{depPath}}\` a package.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-rename-default": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid importing a default export by a different name.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-rename-default.md", - }, - "messages": { - "renameDefault": "Caution: \`{{importBasename}}\` has a default export \`{{defaultExportName}}\`. This {{requiresOrImports}} \`{{defaultExportName}}\` as \`{{importName}}\`. Check if you meant to write \`{{suggestion}}\` instead.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "default": false, - "type": "boolean", - }, - "preventRenamingBindings": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-restricted-paths": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Enforce which files can be imported in a given folder.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-restricted-paths.md", - }, - "messages": { - "glob": "Restricted path exceptions must be glob patterns when \`from\` contains glob patterns", - "mixedGlob": "Restricted path \`from\` must contain either only glob patterns or none", - "path": "Restricted path exceptions must be descendants of the configured \`from\` path for that zone.", - "zone": "Unexpected path "{{importPath}}" imported in restricted zone.{{extra}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "basePath": { - "type": "string", - }, - "zones": { - "items": { - "additionalProperties": false, - "properties": { - "except": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "from": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - "message": { - "type": "string", - }, - "target": { - "anyOf": [ - { - "type": "string", - }, - { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-self-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid a module from importing itself.", - "recommended": true, - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-self-import.md", - }, - "messages": { - "self": "Module imports itself.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unassigned-import": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Forbid unassigned imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unassigned-import.md", - }, - "messages": { - "unassigned": "Imported module should be assigned", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "items": { - "type": "string", - }, - "type": "array", - }, - "devDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "optionalDependencies": { - "type": [ - "boolean", - "array", - ], - }, - "peerDependencies": { - "type": [ - "boolean", - "array", - ], - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-unresolved": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Ensure imports point to a file/module that can be resolved.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unresolved.md", - }, - "messages": { - "casingMismatch": "Casing of {{module}} does not match the underlying filesystem.", - "unresolved": "Unable to resolve path to module '{{module}}'.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "amd": { - "type": "boolean", - }, - "caseSensitive": { - "default": true, - "type": "boolean", - }, - "caseSensitiveStrict": { - "type": "boolean", - }, - "commonjs": { - "type": "boolean", - }, - "esmodule": { - "type": "boolean", - }, - "ignore": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - "no-unused-modules": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Helpful warnings", - "description": "Forbid modules without exports, or exports without matching import in another module.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-unused-modules.md", - }, - "messages": { - "notFound": "No exports found", - "unused": "exported declaration '{{value}}' not used within other modules", - }, - "schema": [ - { - "anyOf": [ - { - "properties": { - "src": { - "minItems": 1, - "type": "array", - }, - "unusedExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "unusedExports", - ], - "type": "object", - }, - { - "properties": { - "missingExports": { - "enum": [ - true, - ], - "type": "boolean", - }, - }, - "required": [ - "missingExports", - ], - "type": "object", - }, - ], - "properties": { - "ignoreExports": { - "description": "files/paths for which unused exports will not be reported (e.g module entry points)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreUnusedTypeExports": { - "description": "ignore type exports without any usage", - "type": "boolean", - }, - "missingExports": { - "description": "report modules without any exports", - "type": "boolean", - }, - "src": { - "description": "files/paths to be analyzed (only for unused exports)", - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "unusedExports": { - "description": "report exports without any usage", - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-useless-path-segments": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid unnecessary path segments in import and require statements.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-useless-path-segments.md", - }, - "fixable": "code", - "messages": { - "useless": "Useless path segments for "{{importPath}}", should be "{{proposedPath}}"", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "commonjs": { - "type": "boolean", - }, - "noUselessIndex": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-webpack-loader-syntax": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Static analysis", - "description": "Forbid webpack loader syntax in imports.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/no-webpack-loader-syntax.md", - }, - "messages": { - "unexpected": "Unexpected '!' in '{{name}}'. Do not use import syntax to configure webpack loaders.", - }, - "schema": [], - "type": "problem", - }, - }, - "order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Enforce a convention in module import order.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/order.md", - }, - "fixable": "code", - "messages": { - "error": "{{error}}", - "noLineBetweenGroups": "There should be no empty line between import groups", - "noLineWithinGroup": "There should be no empty line within import group", - "oneLineBetweenGroups": "There should be at least one empty line between import groups", - "order": "{{secondImport}} should occur {{order}} {{firstImport}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "alphabetize": { - "additionalProperties": false, - "properties": { - "caseInsensitive": { - "default": false, - "type": "boolean", - }, - "order": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - "orderImportKind": { - "default": "ignore", - "enum": [ - "ignore", - "asc", - "desc", - ], - "type": "string", - }, - }, - "type": "object", - }, - "distinctGroup": { - "default": true, - "type": "boolean", - }, - "groups": { - "type": "array", - }, - "newlines-between": { - "enum": [ - "ignore", - "always", - "always-and-inside-groups", - "never", - ], - "type": "string", - }, - "pathGroups": { - "items": { - "additionalProperties": false, - "properties": { - "group": { - "enum": [ - "builtin", - "external", - "internal", - "unknown", - "parent", - "sibling", - "index", - "object", - "type", - ], - "type": "string", - }, - "pattern": { - "type": "string", - }, - "patternOptions": { - "type": "object", - }, - "position": { - "enum": [ - "after", - "before", - ], - "type": "string", - }, - }, - "required": [ - "pattern", - "group", - ], - "type": "object", - }, - "type": "array", - }, - "pathGroupsExcludedImportTypes": { - "type": "array", - }, - "warnOnUnassignedImports": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "prefer-default-export": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Style guide", - "description": "Prefer a default export if module exports a single name or multiple names.", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/prefer-default-export.md", - }, - "messages": { - "any": "Prefer default export to be present on every file that has export.", - "single": "Prefer default export on a file with single export.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "target": { - "default": "single", - "enum": [ - "single", - "any", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "unambiguous": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "category": "Module systems", - "description": "Forbid potentially ambiguous parse goal (\`script\` vs. \`module\`).", - "url": "https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.0/docs/rules/unambiguous.md", - }, - "messages": { - "module": "This module could be parsed as a valid script.", - }, - "schema": [], - "type": "suggestion", - }, - }, - }, - }, - "node-import": { - "rules": { - "prefer-node-protocol": { - "create": [Function], - "meta": { - "docs": { - "description": "Prefer using the \`node:\` protocol when importing Node.js builtin modules.", - "recommended": true, - "url": "https://github.com/kytta/eslint-plugin-node-import/blob/main/docs/rules/prefer-node-protocol", - }, - "fixable": "code", - "messages": { - "prefer-node-protocol": "Consider using \`node:{{ moduleName }}\` over \`{{ moduleName }}\`.", - }, - "schema": [], - "type": "problem", - }, - }, - }, - }, - "simple-import-sort": { - "meta": { - "name": "eslint-plugin-simple-import-sort", - "version": "12.1.1", - }, - "rules": { - "exports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort exports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these exports!", - }, - "schema": [], - "type": "layout", - }, - }, - "imports": { - "create": [Function], - "meta": { - "docs": { - "description": "Automatically sort imports.", - "url": "https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order", - }, - "fixable": "code", - "messages": { - "sort": "Run autofix to sort these imports!", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "groups": { - "items": { - "items": { - "type": "string", - }, - "type": "array", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - }, - }, - }, - "rules": { - "import-x/default": "error", - "import-x/export": "error", - "import-x/first": "error", - "import-x/named": "error", - "import-x/namespace": "off", - "import-x/newline-after-import": "error", - "import-x/no-absolute-path": "error", - "import-x/no-duplicates": "warn", - "import-x/no-empty-named-blocks": "error", - "import-x/no-named-as-default": "warn", - "import-x/no-named-as-default-member": "warn", - "import-x/no-self-import": "error", - "import-x/no-unresolved": "error", - "import-x/no-useless-path-segments": "error", - "node-import/prefer-node-protocol": "error", - "simple-import-sort/exports": "error", - "simple-import-sort/imports": "error", - }, - "settings": { - "import-x/parsers": { - "espree": [ - ".js", - ".cjs", - ".mjs", - ".jsx", - ], - }, - }, - }, -] -`; diff --git a/src/configs/__snapshots__/react.spec.ts.snap b/src/configs/__snapshots__/react.spec.ts.snap deleted file mode 100644 index 9e023db..0000000 --- a/src/configs/__snapshots__/react.spec.ts.snap +++ /dev/null @@ -1,19165 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`reactConfig > should create config w/ @tanstack/query rules 1`] = ` -[ - { - "files": [ - "**/*.?([cm])jsx", - "**/*.?([cm])tsx", - ], - "languageOptions": { - "globals": { - "AI": false, - "AITextSession": false, - "AbortController": false, - "AbortSignal": false, - "AbsoluteOrientationSensor": false, - "AbstractRange": false, - "Accelerometer": false, - "AnalyserNode": false, - "Animation": false, - "AnimationEffect": false, - "AnimationEvent": false, - "AnimationPlaybackEvent": false, - "AnimationTimeline": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioData": false, - "AudioDecoder": false, - "AudioDestinationNode": false, - "AudioEncoder": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioParamMap": false, - "AudioProcessingEvent": false, - "AudioScheduledSourceNode": false, - "AudioSinkInfo": false, - "AudioWorklet": false, - "AudioWorkletGlobalScope": false, - "AudioWorkletNode": false, - "AudioWorkletProcessor": false, - "AuthenticatorAssertionResponse": false, - "AuthenticatorAttestationResponse": false, - "AuthenticatorResponse": false, - "BackgroundFetchManager": false, - "BackgroundFetchRecord": false, - "BackgroundFetchRegistration": false, - "BarProp": false, - "BarcodeDetector": false, - "BaseAudioContext": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "BlobEvent": false, - "Bluetooth": false, - "BluetoothCharacteristicProperties": false, - "BluetoothDevice": false, - "BluetoothRemoteGATTCharacteristic": false, - "BluetoothRemoteGATTDescriptor": false, - "BluetoothRemoteGATTServer": false, - "BluetoothRemoteGATTService": false, - "BluetoothUUID": false, - "BroadcastChannel": false, - "BrowserCaptureMediaStreamTrack": false, - "ByteLengthQueuingStrategy": false, - "CDATASection": false, - "CSS": false, - "CSSAnimation": false, - "CSSConditionRule": false, - "CSSContainerRule": false, - "CSSCounterStyleRule": false, - "CSSFontFaceRule": false, - "CSSFontFeatureValuesRule": false, - "CSSFontPaletteValuesRule": false, - "CSSGroupingRule": false, - "CSSImageValue": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSKeywordValue": false, - "CSSLayerBlockRule": false, - "CSSLayerStatementRule": false, - "CSSMathClamp": false, - "CSSMathInvert": false, - "CSSMathMax": false, - "CSSMathMin": false, - "CSSMathNegate": false, - "CSSMathProduct": false, - "CSSMathSum": false, - "CSSMathValue": false, - "CSSMatrixComponent": false, - "CSSMediaRule": false, - "CSSNamespaceRule": false, - "CSSNumericArray": false, - "CSSNumericValue": false, - "CSSPageDescriptors": false, - "CSSPageRule": false, - "CSSPerspective": false, - "CSSPositionTryDescriptors": false, - "CSSPositionTryRule": false, - "CSSPositionValue": false, - "CSSPropertyRule": false, - "CSSRotate": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSScale": false, - "CSSScopeRule": false, - "CSSSkew": false, - "CSSSkewX": false, - "CSSSkewY": false, - "CSSStartingStyleRule": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSStyleValue": false, - "CSSSupportsRule": false, - "CSSTransformComponent": false, - "CSSTransformValue": false, - "CSSTransition": false, - "CSSTranslate": false, - "CSSUnitValue": false, - "CSSUnparsedValue": false, - "CSSVariableReferenceValue": false, - "CSSViewTransitionRule": false, - "Cache": false, - "CacheStorage": false, - "CanvasCaptureMediaStream": false, - "CanvasCaptureMediaStreamTrack": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "CaptureController": false, - "CaretPosition": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "ChapterInformation": false, - "CharacterBoundsUpdateEvent": false, - "CharacterData": false, - "Clipboard": false, - "ClipboardEvent": false, - "ClipboardItem": false, - "CloseEvent": false, - "CloseWatcher": false, - "Comment": false, - "CompositionEvent": false, - "CompressionStream": false, - "ConstantSourceNode": false, - "ContentVisibilityAutoStateChangeEvent": false, - "ConvolverNode": false, - "CookieChangeEvent": false, - "CookieDeprecationLabel": false, - "CookieStore": false, - "CookieStoreManager": false, - "CountQueuingStrategy": false, - "Credential": false, - "CredentialsContainer": false, - "CropTarget": false, - "Crypto": false, - "CryptoKey": false, - "CustomElementRegistry": false, - "CustomEvent": false, - "CustomStateSet": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMMatrix": false, - "DOMMatrixReadOnly": false, - "DOMParser": false, - "DOMPoint": false, - "DOMPointReadOnly": false, - "DOMQuad": false, - "DOMRect": false, - "DOMRectList": false, - "DOMRectReadOnly": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "DecompressionStream": false, - "DelayNode": false, - "DelegatedInkTrailPresenter": false, - "DeviceMotionEvent": false, - "DeviceMotionEventAcceleration": false, - "DeviceMotionEventRotationRate": false, - "DeviceOrientationEvent": false, - "Document": false, - "DocumentFragment": false, - "DocumentPictureInPicture": false, - "DocumentPictureInPictureEvent": false, - "DocumentTimeline": false, - "DocumentType": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "EditContext": false, - "Element": false, - "ElementInternals": false, - "EncodedAudioChunk": false, - "EncodedVideoChunk": false, - "ErrorEvent": false, - "Event": false, - "EventCounts": false, - "EventSource": false, - "EventTarget": false, - "External": false, - "EyeDropper": false, - "FeaturePolicy": false, - "FederatedCredential": false, - "Fence": false, - "FencedFrameConfig": false, - "FetchLaterResult": false, - "File": false, - "FileList": false, - "FileReader": false, - "FileSystem": false, - "FileSystemDirectoryEntry": false, - "FileSystemDirectoryHandle": false, - "FileSystemDirectoryReader": false, - "FileSystemEntry": false, - "FileSystemFileEntry": false, - "FileSystemFileHandle": false, - "FileSystemHandle": false, - "FileSystemWritableFileStream": false, - "Float16Array": false, - "FocusEvent": false, - "FontData": false, - "FontFace": false, - "FontFaceSet": false, - "FontFaceSetLoadEvent": false, - "FormData": false, - "FormDataEvent": false, - "FragmentDirective": false, - "GPU": false, - "GPUAdapter": false, - "GPUAdapterInfo": false, - "GPUBindGroup": false, - "GPUBindGroupLayout": false, - "GPUBuffer": false, - "GPUBufferUsage": false, - "GPUCanvasContext": false, - "GPUColorWrite": false, - "GPUCommandBuffer": false, - "GPUCommandEncoder": false, - "GPUCompilationInfo": false, - "GPUCompilationMessage": false, - "GPUComputePassEncoder": false, - "GPUComputePipeline": false, - "GPUDevice": false, - "GPUDeviceLostInfo": false, - "GPUError": false, - "GPUExternalTexture": false, - "GPUInternalError": false, - "GPUMapMode": false, - "GPUOutOfMemoryError": false, - "GPUPipelineError": false, - "GPUPipelineLayout": false, - "GPUQuerySet": false, - "GPUQueue": false, - "GPURenderBundle": false, - "GPURenderBundleEncoder": false, - "GPURenderPassEncoder": false, - "GPURenderPipeline": false, - "GPUSampler": false, - "GPUShaderModule": false, - "GPUShaderStage": false, - "GPUSupportedFeatures": false, - "GPUSupportedLimits": false, - "GPUTexture": false, - "GPUTextureUsage": false, - "GPUTextureView": false, - "GPUUncapturedErrorEvent": false, - "GPUValidationError": false, - "GainNode": false, - "Gamepad": false, - "GamepadAxisMoveEvent": false, - "GamepadButton": false, - "GamepadButtonEvent": false, - "GamepadEvent": false, - "GamepadHapticActuator": false, - "GamepadPose": false, - "Geolocation": false, - "GeolocationCoordinates": false, - "GeolocationPosition": false, - "GeolocationPositionError": false, - "GravitySensor": false, - "Gyroscope": false, - "HID": false, - "HIDConnectionEvent": false, - "HIDDevice": false, - "HIDInputReportEvent": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBRElement": false, - "HTMLBaseElement": false, - "HTMLBodyElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLDListElement": false, - "HTMLDataElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFencedFrameElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHRElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLLIElement": false, - "HTMLLabelElement": false, - "HTMLLegendElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLOListElement": false, - "HTMLObjectElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLSlotElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTimeElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "HashChangeEvent": false, - "Headers": false, - "Highlight": false, - "HighlightRegistry": false, - "History": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "IIRFilterNode": false, - "IdentityCredential": false, - "IdentityCredentialError": false, - "IdentityProvider": false, - "IdleDeadline": false, - "IdleDetector": false, - "Image": false, - "ImageBitmap": false, - "ImageBitmapRenderingContext": false, - "ImageCapture": false, - "ImageData": false, - "ImageDecoder": false, - "ImageTrack": false, - "ImageTrackList": false, - "Ink": false, - "InputDeviceCapabilities": false, - "InputDeviceInfo": false, - "InputEvent": false, - "IntersectionObserver": false, - "IntersectionObserverEntry": false, - "Iterator": false, - "Keyboard": false, - "KeyboardEvent": false, - "KeyboardLayoutMap": false, - "KeyframeEffect": false, - "LargestContentfulPaint": false, - "LaunchParams": false, - "LaunchQueue": false, - "LayoutShift": false, - "LayoutShiftAttribution": false, - "LinearAccelerationSensor": false, - "Location": false, - "Lock": false, - "LockManager": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MathMLElement": false, - "MediaCapabilities": false, - "MediaCapabilitiesInfo": false, - "MediaDeviceInfo": false, - "MediaDevices": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyError": false, - "MediaKeyMessageEvent": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaKeys": false, - "MediaList": false, - "MediaMetadata": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaRecorder": false, - "MediaRecorderErrorEvent": false, - "MediaSession": false, - "MediaSource": false, - "MediaSourceHandle": false, - "MediaStream": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "MediaStreamTrackAudioSourceNode": false, - "MediaStreamTrackAudioStats": false, - "MediaStreamTrackEvent": false, - "MediaStreamTrackGenerator": false, - "MediaStreamTrackProcessor": false, - "MediaStreamTrackVideoStats": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MimeType": false, - "MimeTypeArray": false, - "ModelGenericSession": false, - "ModelManager": false, - "MouseEvent": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "NamedNodeMap": false, - "NavigateEvent": false, - "Navigation": false, - "NavigationActivation": false, - "NavigationCurrentEntryChangeEvent": false, - "NavigationDestination": false, - "NavigationHistoryEntry": false, - "NavigationPreloadManager": false, - "NavigationTransition": false, - "Navigator": false, - "NavigatorLogin": false, - "NavigatorManagedData": false, - "NavigatorUAData": false, - "NetworkInformation": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "NotRestoredReasonDetails": false, - "NotRestoredReasons": false, - "Notification": false, - "NotifyPaintEvent": false, - "OTPCredential": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "OffscreenCanvas": false, - "OffscreenCanvasRenderingContext2D": false, - "Option": false, - "OrientationSensor": false, - "OscillatorNode": false, - "OverconstrainedError": false, - "PERSISTENT": false, - "PageRevealEvent": false, - "PageSwapEvent": false, - "PageTransitionEvent": false, - "PannerNode": false, - "PasswordCredential": false, - "Path2D": false, - "PaymentAddress": false, - "PaymentManager": false, - "PaymentMethodChangeEvent": false, - "PaymentRequest": false, - "PaymentRequestUpdateEvent": false, - "PaymentResponse": false, - "Performance": false, - "PerformanceElementTiming": false, - "PerformanceEntry": false, - "PerformanceEventTiming": false, - "PerformanceLongAnimationFrameTiming": false, - "PerformanceLongTaskTiming": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceNavigationTiming": false, - "PerformanceObserver": false, - "PerformanceObserverEntryList": false, - "PerformancePaintTiming": false, - "PerformanceResourceTiming": false, - "PerformanceScriptTiming": false, - "PerformanceServerTiming": false, - "PerformanceTiming": false, - "PeriodicSyncManager": false, - "PeriodicWave": false, - "PermissionStatus": false, - "Permissions": false, - "PictureInPictureEvent": false, - "PictureInPictureWindow": false, - "Plugin": false, - "PluginArray": false, - "PointerEvent": false, - "PopStateEvent": false, - "Presentation": false, - "PresentationAvailability": false, - "PresentationConnection": false, - "PresentationConnectionAvailableEvent": false, - "PresentationConnectionCloseEvent": false, - "PresentationConnectionList": false, - "PresentationReceiver": false, - "PresentationRequest": false, - "PressureObserver": false, - "PressureRecord": false, - "ProcessingInstruction": false, - "Profiler": false, - "ProgressEvent": false, - "PromiseRejectionEvent": false, - "ProtectedAudience": false, - "PublicKeyCredential": false, - "PushManager": false, - "PushSubscription": false, - "PushSubscriptionOptions": false, - "RTCCertificate": false, - "RTCDTMFSender": false, - "RTCDTMFToneChangeEvent": false, - "RTCDataChannel": false, - "RTCDataChannelEvent": false, - "RTCDtlsTransport": false, - "RTCEncodedAudioFrame": false, - "RTCEncodedVideoFrame": false, - "RTCError": false, - "RTCErrorEvent": false, - "RTCIceCandidate": false, - "RTCIceTransport": false, - "RTCPeerConnection": false, - "RTCPeerConnectionIceErrorEvent": false, - "RTCPeerConnectionIceEvent": false, - "RTCRtpReceiver": false, - "RTCRtpScriptTransform": false, - "RTCRtpSender": false, - "RTCRtpTransceiver": false, - "RTCSctpTransport": false, - "RTCSessionDescription": false, - "RTCStatsReport": false, - "RTCTrackEvent": false, - "RadioNodeList": false, - "Range": false, - "ReadableByteStreamController": false, - "ReadableStream": false, - "ReadableStreamBYOBReader": false, - "ReadableStreamBYOBRequest": false, - "ReadableStreamDefaultController": false, - "ReadableStreamDefaultReader": false, - "RelativeOrientationSensor": false, - "RemotePlayback": false, - "ReportingObserver": false, - "Request": false, - "ResizeObserver": false, - "ResizeObserverEntry": false, - "ResizeObserverSize": false, - "Response": false, - "SVGAElement": false, - "SVGAngle": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGComponentTransferFunctionElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGElement": false, - "SVGEllipseElement": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGImageElement": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLineElement": false, - "SVGLinearGradientElement": false, - "SVGMPathElement": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPathElement": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGSVGElement": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStyleElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTSpanElement": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformList": false, - "SVGUnitTypes": false, - "SVGUseElement": false, - "SVGViewElement": false, - "Scheduler": false, - "Scheduling": false, - "Screen": false, - "ScreenDetailed": false, - "ScreenDetails": false, - "ScreenOrientation": false, - "ScriptProcessorNode": false, - "ScrollTimeline": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "Sensor": false, - "SensorErrorEvent": false, - "Serial": false, - "SerialPort": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "ShadowRoot": false, - "SharedStorage": false, - "SharedStorageWorklet": false, - "SharedWorker": false, - "SnapEvent": false, - "SourceBuffer": false, - "SourceBufferList": false, - "SpeechSynthesis": false, - "SpeechSynthesisErrorEvent": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "SpeechSynthesisVoice": false, - "StaticRange": false, - "StereoPannerNode": false, - "Storage": false, - "StorageBucket": false, - "StorageBucketManager": false, - "StorageEvent": false, - "StorageManager": false, - "StylePropertyMap": false, - "StylePropertyMapReadOnly": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubmitEvent": false, - "SubtleCrypto": false, - "SyncManager": false, - "TEMPORARY": false, - "TaskAttributionTiming": false, - "TaskController": false, - "TaskPriorityChangeEvent": false, - "TaskSignal": false, - "Text": false, - "TextDecoder": false, - "TextDecoderStream": false, - "TextEncoder": false, - "TextEncoderStream": false, - "TextEvent": false, - "TextFormat": false, - "TextFormatUpdateEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TextUpdateEvent": false, - "TimeEvent": false, - "TimeRanges": false, - "ToggleEvent": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransformStream": false, - "TransformStreamDefaultController": false, - "TransitionEvent": false, - "TreeWalker": false, - "TrustedHTML": false, - "TrustedScript": false, - "TrustedScriptURL": false, - "TrustedTypePolicy": false, - "TrustedTypePolicyFactory": false, - "UIEvent": false, - "URL": false, - "URLPattern": false, - "URLSearchParams": false, - "USB": false, - "USBAlternateInterface": false, - "USBConfiguration": false, - "USBConnectionEvent": false, - "USBDevice": false, - "USBEndpoint": false, - "USBInTransferResult": false, - "USBInterface": false, - "USBIsochronousInTransferPacket": false, - "USBIsochronousInTransferResult": false, - "USBIsochronousOutTransferPacket": false, - "USBIsochronousOutTransferResult": false, - "USBOutTransferResult": false, - "UserActivation": false, - "VTTCue": false, - "VTTRegion": false, - "ValidityState": false, - "VideoColorSpace": false, - "VideoDecoder": false, - "VideoEncoder": false, - "VideoFrame": false, - "VideoPlaybackQuality": false, - "ViewTimeline": false, - "ViewTransition": false, - "ViewTransitionTypeSet": false, - "VirtualKeyboard": false, - "VirtualKeyboardGeometryChangeEvent": false, - "VisibilityStateEntry": false, - "VisualViewport": false, - "WGSLLanguageFeatures": false, - "WakeLock": false, - "WakeLockSentinel": false, - "WaveShaperNode": false, - "WebAssembly": false, - "WebGL2RenderingContext": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLObject": false, - "WebGLProgram": false, - "WebGLQuery": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLSampler": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLSync": false, - "WebGLTexture": false, - "WebGLTransformFeedback": false, - "WebGLUniformLocation": false, - "WebGLVertexArrayObject": false, - "WebSocket": false, - "WebSocketError": false, - "WebSocketStream": false, - "WebTransport": false, - "WebTransportBidirectionalStream": false, - "WebTransportDatagramDuplexStream": false, - "WebTransportError": false, - "WebTransportReceiveStream": false, - "WebTransportSendStream": false, - "WheelEvent": false, - "Window": false, - "WindowControlsOverlay": false, - "WindowControlsOverlayGeometryChangeEvent": false, - "Worker": false, - "Worklet": false, - "WorkletGlobalScope": false, - "WritableStream": false, - "WritableStreamDefaultController": false, - "WritableStreamDefaultWriter": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathExpression": false, - "XPathResult": false, - "XRAnchor": false, - "XRAnchorSet": false, - "XRBoundedReferenceSpace": false, - "XRCPUDepthInformation": false, - "XRCamera": false, - "XRDOMOverlayState": false, - "XRDepthInformation": false, - "XRFrame": false, - "XRHitTestResult": false, - "XRHitTestSource": false, - "XRInputSource": false, - "XRInputSourceArray": false, - "XRInputSourceEvent": false, - "XRInputSourcesChangeEvent": false, - "XRLayer": false, - "XRLightEstimate": false, - "XRLightProbe": false, - "XRPose": false, - "XRRay": false, - "XRReferenceSpace": false, - "XRReferenceSpaceEvent": false, - "XRRenderState": false, - "XRRigidTransform": false, - "XRSession": false, - "XRSessionEvent": false, - "XRSpace": false, - "XRSystem": false, - "XRTransientInputHitTestResult": false, - "XRTransientInputHitTestSource": false, - "XRView": false, - "XRViewerPose": false, - "XRViewport": false, - "XRWebGLBinding": false, - "XRWebGLDepthInformation": false, - "XRWebGLLayer": false, - "XSLTProcessor": false, - "addEventListener": false, - "ai": false, - "alert": false, - "atob": false, - "blur": false, - "btoa": false, - "caches": false, - "cancelAnimationFrame": false, - "cancelIdleCallback": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "close": false, - "closed": false, - "confirm": false, - "console": false, - "cookieStore": false, - "createImageBitmap": false, - "credentialless": false, - "crossOriginIsolated": false, - "crypto": false, - "currentFrame": false, - "currentTime": false, - "customElements": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "documentPictureInPicture": false, - "event": false, - "external": false, - "fence": false, - "fetch": false, - "fetchLater": false, - "find": false, - "focus": false, - "frameElement": false, - "frames": false, - "getComputedStyle": false, - "getScreenDetails": false, - "getSelection": false, - "history": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "isSecureContext": false, - "launchQueue": false, - "length": false, - "localStorage": false, - "location": true, - "locationbar": false, - "matchMedia": false, - "menubar": false, - "model": false, - "moveBy": false, - "moveTo": false, - "name": false, - "navigation": false, - "navigator": false, - "offscreenBuffering": false, - "onabort": true, - "onafterprint": true, - "onanimationcancel": true, - "onanimationend": true, - "onanimationiteration": true, - "onanimationstart": true, - "onappinstalled": true, - "onauxclick": true, - "onbeforeinput": true, - "onbeforeinstallprompt": true, - "onbeforematch": true, - "onbeforeprint": true, - "onbeforetoggle": true, - "onbeforeunload": true, - "onbeforexrselect": true, - "onblur": true, - "oncancel": true, - "oncanplay": true, - "oncanplaythrough": true, - "onchange": true, - "onclick": true, - "onclose": true, - "oncontentvisibilityautostatechange": true, - "oncontextlost": true, - "oncontextmenu": true, - "oncontextrestored": true, - "oncopy": true, - "oncuechange": true, - "oncut": true, - "ondblclick": true, - "ondevicemotion": true, - "ondeviceorientation": true, - "ondeviceorientationabsolute": true, - "ondrag": true, - "ondragend": true, - "ondragenter": true, - "ondragleave": true, - "ondragover": true, - "ondragstart": true, - "ondrop": true, - "ondurationchange": true, - "onemptied": true, - "onended": true, - "onerror": true, - "onfocus": true, - "onformdata": true, - "ongamepadconnected": true, - "ongamepaddisconnected": true, - "ongotpointercapture": true, - "onhashchange": true, - "oninput": true, - "oninvalid": true, - "onkeydown": true, - "onkeypress": true, - "onkeyup": true, - "onlanguagechange": true, - "onload": true, - "onloadeddata": true, - "onloadedmetadata": true, - "onloadstart": true, - "onlostpointercapture": true, - "onmessage": true, - "onmessageerror": true, - "onmousedown": true, - "onmouseenter": true, - "onmouseleave": true, - "onmousemove": true, - "onmouseout": true, - "onmouseover": true, - "onmouseup": true, - "onmousewheel": true, - "onoffline": true, - "ononline": true, - "onpagehide": true, - "onpagereveal": true, - "onpageshow": true, - "onpageswap": true, - "onpaste": true, - "onpause": true, - "onplay": true, - "onplaying": true, - "onpointercancel": true, - "onpointerdown": true, - "onpointerenter": true, - "onpointerleave": true, - "onpointermove": true, - "onpointerout": true, - "onpointerover": true, - "onpointerrawupdate": true, - "onpointerup": true, - "onpopstate": true, - "onprogress": true, - "onratechange": true, - "onrejectionhandled": true, - "onreset": true, - "onresize": true, - "onscroll": true, - "onscrollend": true, - "onscrollsnapchange": true, - "onscrollsnapchanging": true, - "onsearch": true, - "onsecuritypolicyviolation": true, - "onseeked": true, - "onseeking": true, - "onselect": true, - "onselectionchange": true, - "onselectstart": true, - "onslotchange": true, - "onstalled": true, - "onstorage": true, - "onsubmit": true, - "onsuspend": true, - "ontimeupdate": true, - "ontoggle": true, - "ontransitioncancel": true, - "ontransitionend": true, - "ontransitionrun": true, - "ontransitionstart": true, - "onunhandledrejection": true, - "onunload": true, - "onvolumechange": true, - "onwaiting": true, - "onwheel": true, - "open": false, - "opener": false, - "origin": false, - "originAgentCluster": false, - "outerHeight": false, - "outerWidth": false, - "pageXOffset": false, - "pageYOffset": false, - "parent": false, - "performance": false, - "personalbar": false, - "postMessage": false, - "print": false, - "prompt": false, - "queryLocalFonts": false, - "queueMicrotask": false, - "registerProcessor": false, - "removeEventListener": false, - "reportError": false, - "requestAnimationFrame": false, - "requestIdleCallback": false, - "resizeBy": false, - "resizeTo": false, - "sampleRate": false, - "scheduler": false, - "screen": false, - "screenLeft": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "scroll": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "scrollbars": false, - "self": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "sharedStorage": false, - "showDirectoryPicker": false, - "showOpenFilePicker": false, - "showSaveFilePicker": false, - "speechSynthesis": false, - "status": false, - "statusbar": false, - "stop": false, - "structuredClone": false, - "styleMedia": false, - "toolbar": false, - "top": false, - "trustedTypes": false, - "visualViewport": false, - "window": false, - }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - "jsxPragma": null, - }, - }, - "name": "jimmy.codes/react", - "plugins": { - "jsx-a11y": { - "configs": { - "recommended": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "jsx-a11y", - ], - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-ambiguous-text": "off", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "searchbox", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "canvas": [ - "img", - ], - "tr": [ - "none", - "presentation", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "alert": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "body": [ - "onError", - "onLoad", - ], - "dialog": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "handlers": [ - "onClick", - "onError", - "onLoad", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "fieldset": [ - "radiogroup", - "presentation", - ], - "li": [ - "menuitem", - "menuitemradio", - "menuitemcheckbox", - "option", - "row", - "tab", - "treeitem", - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - "table": [ - "grid", - ], - "td": [ - "gridcell", - ], - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - }, - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "allowExpressionValues": true, - "roles": [ - "tabpanel", - ], - "tags": [], - }, - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "allowExpressionValues": true, - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - }, - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - "strict": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "jsx-a11y", - ], - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "progressbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "body": [ - "onError", - "onLoad", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "jsx-a11y/no-noninteractive-tabindex": "error", - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": "error", - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - }, - "flatConfigs": { - "recommended": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "name": "jsx-a11y/recommended", - "plugins": { - "jsx-a11y": { - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`
\`) that have click handlers use the role attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md", - }, - "schema": [ - { - "properties": { - "handlers": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "prefer-tag-over-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforces using semantic DOM elements over the ARIA \`role\` property.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-has-required-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must have all required attributes for that role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-supports-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with explicit or implicit roles defined contain only \`aria-*\` properties supported by that \`role\`.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "scope": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`scope\` prop is only used on \`\` elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "tabindex-no-positive": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`tabIndex\` value is not greater than zero.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - }, - }, - }, - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-ambiguous-text": "off", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "searchbox", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "canvas": [ - "img", - ], - "tr": [ - "none", - "presentation", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "alert": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "body": [ - "onError", - "onLoad", - ], - "dialog": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "handlers": [ - "onClick", - "onError", - "onLoad", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "fieldset": [ - "radiogroup", - "presentation", - ], - "li": [ - "menuitem", - "menuitemradio", - "menuitemcheckbox", - "option", - "row", - "tab", - "treeitem", - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - "table": [ - "grid", - ], - "td": [ - "gridcell", - ], - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - }, - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "allowExpressionValues": true, - "roles": [ - "tabpanel", - ], - "tags": [], - }, - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "allowExpressionValues": true, - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - }, - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - "strict": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "name": "jsx-a11y/strict", - "plugins": { - "jsx-a11y": { - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`
\`) that have click handlers use the role attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md", - }, - "schema": [ - { - "properties": { - "handlers": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "prefer-tag-over-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforces using semantic DOM elements over the ARIA \`role\` property.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-has-required-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must have all required attributes for that role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-supports-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with explicit or implicit roles defined contain only \`aria-*\` properties supported by that \`role\`.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "scope": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`scope\` prop is only used on \`\` elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "tabindex-no-positive": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`tabIndex\` value is not greater than zero.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - }, - }, - }, - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "progressbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "body": [ - "onError", - "onLoad", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "jsx-a11y/no-noninteractive-tabindex": "error", - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": "error", - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - }, - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`
\`) that have click handlers use the role attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md", - }, - "schema": [ - { - "properties": { - "handlers": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "prefer-tag-over-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforces using semantic DOM elements over the ARIA \`role\` property.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-has-required-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must have all required attributes for that role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-supports-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with explicit or implicit roles defined contain only \`aria-*\` properties supported by that \`role\`.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "scope": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`scope\` prop is only used on \`\` elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "tabindex-no-positive": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`tabIndex\` value is not greater than zero.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - }, - }, - "react": { - "configs": { - "all": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "react", - ], - "rules": { - "react/boolean-prop-naming": 2, - "react/button-has-type": 2, - "react/checked-requires-onchange-or-readonly": 2, - "react/default-props-match-prop-types": 2, - "react/destructuring-assignment": 2, - "react/display-name": 2, - "react/forbid-component-props": 2, - "react/forbid-dom-props": 2, - "react/forbid-elements": 2, - "react/forbid-foreign-prop-types": 2, - "react/forbid-prop-types": 2, - "react/forward-ref-uses-ref": 2, - "react/function-component-definition": 2, - "react/hook-use-state": 2, - "react/iframe-missing-sandbox": 2, - "react/jsx-boolean-value": 2, - "react/jsx-child-element-spacing": 2, - "react/jsx-closing-bracket-location": 2, - "react/jsx-closing-tag-location": 2, - "react/jsx-curly-brace-presence": 2, - "react/jsx-curly-newline": 2, - "react/jsx-curly-spacing": 2, - "react/jsx-equals-spacing": 2, - "react/jsx-filename-extension": 2, - "react/jsx-first-prop-new-line": 2, - "react/jsx-fragments": 2, - "react/jsx-handler-names": 2, - "react/jsx-indent": 2, - "react/jsx-indent-props": 2, - "react/jsx-key": 2, - "react/jsx-max-depth": 2, - "react/jsx-max-props-per-line": 2, - "react/jsx-newline": 2, - "react/jsx-no-bind": 2, - "react/jsx-no-comment-textnodes": 2, - "react/jsx-no-constructed-context-values": 2, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-leaked-render": 2, - "react/jsx-no-literals": 2, - "react/jsx-no-script-url": 2, - "react/jsx-no-target-blank": 2, - "react/jsx-no-undef": 2, - "react/jsx-no-useless-fragment": 2, - "react/jsx-one-expression-per-line": 2, - "react/jsx-pascal-case": 2, - "react/jsx-props-no-multi-spaces": 2, - "react/jsx-props-no-spread-multi": 2, - "react/jsx-props-no-spreading": 2, - "react/jsx-sort-props": 2, - "react/jsx-tag-spacing": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/jsx-wrap-multilines": 2, - "react/no-access-state-in-setstate": 2, - "react/no-adjacent-inline-elements": 2, - "react/no-array-index-key": 2, - "react/no-arrow-function-lifecycle": 2, - "react/no-children-prop": 2, - "react/no-danger": 2, - "react/no-danger-with-children": 2, - "react/no-deprecated": 2, - "react/no-did-mount-set-state": 2, - "react/no-did-update-set-state": 2, - "react/no-direct-mutation-state": 2, - "react/no-find-dom-node": 2, - "react/no-invalid-html-attribute": 2, - "react/no-is-mounted": 2, - "react/no-multi-comp": 2, - "react/no-namespace": 2, - "react/no-object-type-as-default-prop": 2, - "react/no-redundant-should-component-update": 2, - "react/no-render-return-value": 2, - "react/no-set-state": 2, - "react/no-string-refs": 2, - "react/no-this-in-sfc": 2, - "react/no-typos": 2, - "react/no-unescaped-entities": 2, - "react/no-unknown-property": 2, - "react/no-unsafe": 2, - "react/no-unstable-nested-components": 2, - "react/no-unused-class-component-methods": 2, - "react/no-unused-prop-types": 2, - "react/no-unused-state": 2, - "react/no-will-update-set-state": 2, - "react/prefer-es6-class": 2, - "react/prefer-exact-props": 2, - "react/prefer-read-only-props": 2, - "react/prefer-stateless-function": 2, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/require-default-props": 2, - "react/require-optimization": 2, - "react/require-render-return": 2, - "react/self-closing-comp": 2, - "react/sort-comp": 2, - "react/sort-default-props": 2, - "react/sort-prop-types": 2, - "react/state-in-constructor": 2, - "react/static-property-placement": 2, - "react/style-prop-object": 2, - "react/void-dom-elements-no-children": 2, - }, - }, - "flat": { - "all": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "plugins": { - "react": [Circular], - }, - "rules": { - "react/boolean-prop-naming": 2, - "react/button-has-type": 2, - "react/checked-requires-onchange-or-readonly": 2, - "react/default-props-match-prop-types": 2, - "react/destructuring-assignment": 2, - "react/display-name": 2, - "react/forbid-component-props": 2, - "react/forbid-dom-props": 2, - "react/forbid-elements": 2, - "react/forbid-foreign-prop-types": 2, - "react/forbid-prop-types": 2, - "react/forward-ref-uses-ref": 2, - "react/function-component-definition": 2, - "react/hook-use-state": 2, - "react/iframe-missing-sandbox": 2, - "react/jsx-boolean-value": 2, - "react/jsx-child-element-spacing": 2, - "react/jsx-closing-bracket-location": 2, - "react/jsx-closing-tag-location": 2, - "react/jsx-curly-brace-presence": 2, - "react/jsx-curly-newline": 2, - "react/jsx-curly-spacing": 2, - "react/jsx-equals-spacing": 2, - "react/jsx-filename-extension": 2, - "react/jsx-first-prop-new-line": 2, - "react/jsx-fragments": 2, - "react/jsx-handler-names": 2, - "react/jsx-indent": 2, - "react/jsx-indent-props": 2, - "react/jsx-key": 2, - "react/jsx-max-depth": 2, - "react/jsx-max-props-per-line": 2, - "react/jsx-newline": 2, - "react/jsx-no-bind": 2, - "react/jsx-no-comment-textnodes": 2, - "react/jsx-no-constructed-context-values": 2, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-leaked-render": 2, - "react/jsx-no-literals": 2, - "react/jsx-no-script-url": 2, - "react/jsx-no-target-blank": 2, - "react/jsx-no-undef": 2, - "react/jsx-no-useless-fragment": 2, - "react/jsx-one-expression-per-line": 2, - "react/jsx-pascal-case": 2, - "react/jsx-props-no-multi-spaces": 2, - "react/jsx-props-no-spread-multi": 2, - "react/jsx-props-no-spreading": 2, - "react/jsx-sort-props": 2, - "react/jsx-tag-spacing": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/jsx-wrap-multilines": 2, - "react/no-access-state-in-setstate": 2, - "react/no-adjacent-inline-elements": 2, - "react/no-array-index-key": 2, - "react/no-arrow-function-lifecycle": 2, - "react/no-children-prop": 2, - "react/no-danger": 2, - "react/no-danger-with-children": 2, - "react/no-deprecated": 2, - "react/no-did-mount-set-state": 2, - "react/no-did-update-set-state": 2, - "react/no-direct-mutation-state": 2, - "react/no-find-dom-node": 2, - "react/no-invalid-html-attribute": 2, - "react/no-is-mounted": 2, - "react/no-multi-comp": 2, - "react/no-namespace": 2, - "react/no-object-type-as-default-prop": 2, - "react/no-redundant-should-component-update": 2, - "react/no-render-return-value": 2, - "react/no-set-state": 2, - "react/no-string-refs": 2, - "react/no-this-in-sfc": 2, - "react/no-typos": 2, - "react/no-unescaped-entities": 2, - "react/no-unknown-property": 2, - "react/no-unsafe": 2, - "react/no-unstable-nested-components": 2, - "react/no-unused-class-component-methods": 2, - "react/no-unused-prop-types": 2, - "react/no-unused-state": 2, - "react/no-will-update-set-state": 2, - "react/prefer-es6-class": 2, - "react/prefer-exact-props": 2, - "react/prefer-read-only-props": 2, - "react/prefer-stateless-function": 2, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/require-default-props": 2, - "react/require-optimization": 2, - "react/require-render-return": 2, - "react/self-closing-comp": 2, - "react/sort-comp": 2, - "react/sort-default-props": 2, - "react/sort-prop-types": 2, - "react/state-in-constructor": 2, - "react/static-property-placement": 2, - "react/style-prop-object": 2, - "react/void-dom-elements-no-children": 2, - }, - }, - "jsx-runtime": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - "jsxPragma": null, - }, - }, - "plugins": { - "react": [Circular], - }, - "rules": { - "react/jsx-uses-react": 0, - "react/react-in-jsx-scope": 0, - }, - }, - "recommended": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "plugins": { - "react": [Circular], - }, - "rules": { - "react/display-name": 2, - "react/jsx-key": 2, - "react/jsx-no-comment-textnodes": 2, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-target-blank": 2, - "react/jsx-no-undef": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-children-prop": 2, - "react/no-danger-with-children": 2, - "react/no-deprecated": 2, - "react/no-direct-mutation-state": 2, - "react/no-find-dom-node": 2, - "react/no-is-mounted": 2, - "react/no-render-return-value": 2, - "react/no-string-refs": 2, - "react/no-unescaped-entities": 2, - "react/no-unknown-property": 2, - "react/no-unsafe": 0, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/require-render-return": 2, - }, - }, - }, - "jsx-runtime": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - "jsxPragma": null, - }, - "plugins": [ - "react", - ], - "rules": { - "react/jsx-uses-react": 0, - "react/react-in-jsx-scope": 0, - }, - }, - "recommended": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "react", - ], - "rules": { - "react/display-name": 2, - "react/jsx-key": 2, - "react/jsx-no-comment-textnodes": 2, - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-target-blank": 2, - "react/jsx-no-undef": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-children-prop": 2, - "react/no-danger-with-children": 2, - "react/no-deprecated": 2, - "react/no-direct-mutation-state": 2, - "react/no-find-dom-node": 2, - "react/no-is-mounted": 2, - "react/no-render-return-value": 2, - "react/no-string-refs": 2, - "react/no-unescaped-entities": 2, - "react/no-unknown-property": 2, - "react/no-unsafe": 0, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/require-render-return": 2, - }, - }, - }, - "deprecatedRules": { - "jsx-sort-default-props": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "category": "Stylistic Issues", - "description": "Enforce defaultProps declarations alphabetical sorting", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md", - }, - "messages": { - "propsNotSorted": "Default prop types declarations should be sorted alphabetically", - }, - "replacedBy": [ - "sort-default-props", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreCase": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-space-before-closing": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "category": "Stylistic Issues", - "description": "Enforce spacing before closing bracket in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md", - }, - "fixable": "code", - "messages": { - "needSpaceBeforeClose": "A space is required before closing bracket", - "noSpaceBeforeClose": "A space is forbidden before closing bracket", - }, - "replacedBy": [ - "jsx-tag-spacing", - ], - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - }, - }, - "rules": { - "boolean-prop-naming": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforces consistent naming for boolean props", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md", - }, - "messages": { - "patternMismatch": "Prop name \`{{propName}}\` doesn’t match rule \`{{pattern}}\`", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "message": { - "minLength": 1, - "type": "string", - }, - "propTypeNames": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "rule": { - "default": "^(is|has)[A-Z]([A-Za-z0-9]?)+", - "minLength": 1, - "type": "string", - }, - "validateNested": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "button-has-type": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow usage of \`button\` elements without an explicit \`type\` attribute", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md", - }, - "messages": { - "complexType": "The button type attribute must be specified by a static string or a trivial ternary expression", - "forbiddenValue": ""{{value}}" is an invalid value for button type attribute", - "invalidValue": ""{{value}}" is an invalid value for button type attribute", - "missingType": "Missing an explicit type attribute for button", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "button": { - "default": true, - "type": "boolean", - }, - "reset": { - "default": true, - "type": "boolean", - }, - "submit": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "checked-requires-onchange-or-readonly": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Enforce using \`onChange\` or \`readonly\` attribute when \`checked\` is used", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/checked-requires-onchange-or-readonly.md", - }, - "messages": { - "exclusiveCheckedAttribute": "Use either \`checked\` or \`defaultChecked\`, but not both.", - "missingProperty": "\`checked\` should be used with either \`onChange\` or \`readOnly\`.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreExclusiveCheckedAttribute": { - "type": "boolean", - }, - "ignoreMissingProperties": { - "type": "boolean", - }, - }, - }, - ], - }, - }, - "default-props-match-prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Enforce all defaultProps have a corresponding non-required PropType", - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md", - }, - "messages": { - "defaultHasNoType": "defaultProp "{{name}}" has no corresponding propTypes declaration.", - "requiredHasDefault": "defaultProp "{{name}}" defined for isRequired propType.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowRequiredDefaults": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "destructuring-assignment": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce consistent usage of destructuring assignment of props, state, and context", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md", - }, - "fixable": "code", - "messages": { - "destructureInSignature": "Must destructure props in the function signature.", - "noDestructAssignment": "Must never use destructuring {{type}} assignment", - "noDestructContextInSFCArg": "Must never use destructuring context assignment in SFC argument", - "noDestructPropsInSFCArg": "Must never use destructuring props assignment in SFC argument", - "useDestructAssignment": "Must use destructuring {{type}} assignment", - }, - "schema": [ - { - "enum": [ - "always", - "never", - ], - "type": "string", - }, - { - "additionalProperties": false, - "properties": { - "destructureInSignature": { - "enum": [ - "always", - "ignore", - ], - "type": "string", - }, - "ignoreClassFields": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "display-name": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow missing displayName in a React component definition", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md", - }, - "messages": { - "noContextDisplayName": "Context definition is missing display name", - "noDisplayName": "Component definition is missing display name", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "checkContextObjects": { - "type": "boolean", - }, - "ignoreTranspilerName": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "forbid-component-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow certain props on components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md", - }, - "messages": { - "propIsForbidden": "Prop "{{prop}}" is forbidden on Components", - }, - "schema": [ - { - "properties": { - "forbid": { - "items": { - "anyOf": [ - { - "type": "string", - }, - { - "additionalProperties": false, - "properties": { - "allowedFor": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "allowedForPatterns": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "message": { - "type": "string", - }, - "propName": { - "type": "string", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "disallowedFor", - ], - }, - { - "required": [ - "disallowedForPatterns", - ], - }, - ], - "properties": { - "disallowedFor": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "disallowedForPatterns": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "message": { - "type": "string", - }, - "propName": { - "type": "string", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "allowedFor": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "allowedForPatterns": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "message": { - "type": "string", - }, - "propNamePattern": { - "type": "string", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "disallowedFor", - ], - }, - { - "required": [ - "disallowedForPatterns", - ], - }, - ], - "properties": { - "disallowedFor": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "disallowedForPatterns": { - "items": { - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "message": { - "type": "string", - }, - "propNamePattern": { - "type": "string", - }, - }, - "type": "object", - }, - ], - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "forbid-dom-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow certain props on DOM Nodes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md", - }, - "messages": { - "propIsForbidden": "Prop "{{prop}}" is forbidden on DOM Nodes", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "anyOf": [ - { - "type": "string", - }, - { - "properties": { - "disallowedFor": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "message": { - "type": "string", - }, - "propName": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "minLength": 1, - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - }, - "forbid-elements": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow certain elements", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md", - }, - "messages": { - "forbiddenElement": "<{{element}}> is forbidden", - "forbiddenElement_message": "<{{element}}> is forbidden, {{message}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "anyOf": [ - { - "type": "string", - }, - { - "additionalProperties": false, - "properties": { - "element": { - "type": "string", - }, - "message": { - "type": "string", - }, - }, - "required": [ - "element", - ], - "type": "object", - }, - ], - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "forbid-foreign-prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow using another component's propTypes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md", - }, - "messages": { - "forbiddenPropType": "Using propTypes from another component is not safe because they may be removed in production builds", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowInPropTypes": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "forbid-prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow certain propTypes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md", - }, - "messages": { - "forbiddenPropType": "Prop type "{{target}}" is forbidden", - }, - "schema": [ - { - "additionalProperties": true, - "properties": { - "checkChildContextTypes": { - "type": "boolean", - }, - "checkContextTypes": { - "type": "boolean", - }, - "forbid": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "forward-ref-uses-ref": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Require all forwardRef components include a ref parameter", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forward-ref-uses-ref.md", - }, - "hasSuggestions": true, - "messages": { - "addRefParameter": "Add a ref parameter", - "missingRefParameter": "forwardRef is used with this component but no ref parameter is set", - "removeForwardRef": "Remove forwardRef wrapper", - }, - "schema": [], - "type": "suggestion", - }, - }, - "function-component-definition": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce a specific function type for function components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md", - }, - "fixable": "code", - "messages": { - "arrow-function": "Function component is not an arrow function", - "function-declaration": "Function component is not a function declaration", - "function-expression": "Function component is not a function expression", - }, - "schema": [ - { - "properties": { - "namedComponents": { - "anyOf": [ - { - "enum": [ - "function-declaration", - "arrow-function", - "function-expression", - ], - }, - { - "items": { - "enum": [ - "function-declaration", - "arrow-function", - "function-expression", - ], - "type": "string", - }, - "type": "array", - }, - ], - }, - "unnamedComponents": { - "anyOf": [ - { - "enum": [ - "arrow-function", - "function-expression", - ], - }, - { - "items": { - "enum": [ - "arrow-function", - "function-expression", - ], - "type": "string", - }, - "type": "array", - }, - ], - }, - }, - "type": "object", - }, - ], - }, - }, - "hook-use-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Ensure destructuring and symmetric naming of useState hook value and setter variables", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md", - }, - "hasSuggestions": true, - "messages": { - "suggestMemo": "Replace useState call with useMemo", - "suggestPair": "Destructure useState call into value + setter pair", - "useStateErrorMessage": "useState call is not destructured into value + setter pair", - "useStateErrorMessageOrAddOption": "useState call is not destructured into value + setter pair (you can allow destructuring by enabling "allowDestructuredState" option)", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowDestructuredState": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "iframe-missing-sandbox": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Enforce sandbox attribute on iframe elements", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md", - }, - "messages": { - "attributeMissing": "An iframe element is missing a sandbox attribute", - "invalidCombination": "An iframe element defines a sandbox attribute with both allow-scripts and allow-same-origin which is invalid", - "invalidValue": "An iframe element defines a sandbox attribute with invalid value "{{ value }}"", - }, - "schema": [], - }, - }, - "jsx-boolean-value": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce boolean attributes notation in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md", - }, - "fixable": "code", - "messages": { - "omitBoolean": "Value must be omitted for boolean attribute \`{{propName}}\`", - "omitPropAndBoolean": "Value must be omitted for \`false\` attribute: \`{{propName}}\`", - "setBoolean": "Value must be set for boolean attribute \`{{propName}}\`", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "always", - ], - }, - { - "additionalProperties": false, - "properties": { - "assumeUndefinedIsFalse": { - "type": "boolean", - }, - "never": { - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "enum": [ - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "always": { - "items": { - "minLength": 1, - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "assumeUndefinedIsFalse": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - }, - }, - "jsx-child-element-spacing": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce or disallow spaces inside of curly braces in JSX attributes and expressions", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md", - }, - "fixable": null, - "messages": { - "spacingAfterPrev": "Ambiguous spacing after previous element {{element}}", - "spacingBeforeNext": "Ambiguous spacing before next element {{element}}", - }, - "schema": [], - }, - }, - "jsx-closing-bracket-location": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce closing bracket location in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md", - }, - "fixable": "code", - "messages": { - "bracketLocation": "The closing bracket must be {{location}}{{details}}", - }, - "schema": [ - { - "anyOf": [ - { - "enum": [ - "after-props", - "props-aligned", - "tag-aligned", - "line-aligned", - ], - }, - { - "additionalProperties": false, - "properties": { - "location": { - "enum": [ - "after-props", - "props-aligned", - "tag-aligned", - "line-aligned", - ], - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "nonEmpty": { - "enum": [ - "after-props", - "props-aligned", - "tag-aligned", - "line-aligned", - false, - ], - }, - "selfClosing": { - "enum": [ - "after-props", - "props-aligned", - "tag-aligned", - "line-aligned", - false, - ], - }, - }, - "type": "object", - }, - ], - }, - ], - }, - }, - "jsx-closing-tag-location": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce closing tag location for multiline JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md", - }, - "fixable": "whitespace", - "messages": { - "alignWithOpening": "Expected closing tag to be aligned with the line containing the opening tag", - "matchIndent": "Expected closing tag to match indentation of opening.", - "onOwnLine": "Closing tag of a multiline JSX expression must be on its own line.", - }, - "schema": [ - { - "anyOf": [ - { - "enum": [ - "tag-aligned", - "line-aligned", - ], - }, - { - "additionalProperties": false, - "properties": { - "location": { - "enum": [ - "tag-aligned", - "line-aligned", - ], - }, - }, - "type": "object", - }, - ], - }, - ], - }, - }, - "jsx-curly-brace-presence": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md", - }, - "fixable": "code", - "messages": { - "missingCurly": "Need to wrap this literal in a JSX expression.", - "unnecessaryCurly": "Curly braces are unnecessary here.", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "children": { - "enum": [ - "always", - "never", - "ignore", - ], - }, - "propElementValues": { - "enum": [ - "always", - "never", - "ignore", - ], - }, - "props": { - "enum": [ - "always", - "never", - "ignore", - ], - }, - }, - "type": "object", - }, - { - "enum": [ - "always", - "never", - "ignore", - ], - }, - ], - }, - ], - }, - }, - "jsx-curly-newline": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce consistent linebreaks in curly braces in JSX attributes and expressions", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md", - }, - "fixable": "whitespace", - "messages": { - "expectedAfter": "Expected newline after '{'.", - "expectedBefore": "Expected newline before '}'.", - "unexpectedAfter": "Unexpected newline after '{'.", - "unexpectedBefore": "Unexpected newline before '}'.", - }, - "schema": [ - { - "anyOf": [ - { - "enum": [ - "consistent", - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "multiline": { - "enum": [ - "consistent", - "require", - "forbid", - ], - }, - "singleline": { - "enum": [ - "consistent", - "require", - "forbid", - ], - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "layout", - }, - }, - "jsx-curly-spacing": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce or disallow spaces inside of curly braces in JSX attributes and expressions", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md", - }, - "fixable": "code", - "messages": { - "noNewlineAfter": "There should be no newline after '{{token}}'", - "noNewlineBefore": "There should be no newline before '{{token}}'", - "noSpaceAfter": "There should be no space after '{{token}}'", - "noSpaceBefore": "There should be no space before '{{token}}'", - "spaceNeededAfter": "A space is required after '{{token}}'", - "spaceNeededBefore": "A space is required before '{{token}}'", - }, - "schema": { - "definitions": { - "basicConfig": { - "properties": { - "allowMultiline": { - "type": "boolean", - }, - "spacing": { - "properties": { - "objectLiterals": { - "enum": [ - "always", - "never", - ], - }, - }, - "type": "object", - }, - "when": { - "enum": [ - "always", - "never", - ], - }, - }, - "type": "object", - }, - "basicConfigOrBoolean": { - "anyOf": [ - { - "$ref": "#/definitions/basicConfig", - }, - { - "type": "boolean", - }, - ], - }, - }, - "items": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/definitions/basicConfig", - }, - { - "properties": { - "attributes": { - "$ref": "#/definitions/basicConfigOrBoolean", - }, - "children": { - "$ref": "#/definitions/basicConfigOrBoolean", - }, - }, - "type": "object", - }, - ], - }, - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - { - "additionalProperties": false, - "properties": { - "allowMultiline": { - "type": "boolean", - }, - "spacing": { - "properties": { - "objectLiterals": { - "enum": [ - "always", - "never", - ], - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - }, - }, - "jsx-equals-spacing": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce or disallow spaces around equal signs in JSX attributes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md", - }, - "fixable": "code", - "messages": { - "needSpaceAfter": "A space is required after '='", - "needSpaceBefore": "A space is required before '='", - "noSpaceAfter": "There should be no space after '='", - "noSpaceBefore": "There should be no space before '='", - }, - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - }, - "jsx-filename-extension": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow file extensions that may contain JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md", - }, - "messages": { - "extensionOnlyForJSX": "Only files containing JSX may use the extension '{{ext}}'", - "noJSXWithExtension": "JSX not allowed in files with extension '{{ext}}'", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allow": { - "enum": [ - "always", - "as-needed", - ], - }, - "extensions": { - "items": { - "type": "string", - }, - "type": "array", - }, - "ignoreFilesWithoutCode": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-first-prop-new-line": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce proper position of the first property in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md", - }, - "fixable": "code", - "messages": { - "propOnNewLine": "Property should be placed on a new line", - "propOnSameLine": "Property should be placed on the same line as the component declaration", - }, - "schema": [ - { - "enum": [ - "always", - "never", - "multiline", - "multiline-multiprop", - "multiprop", - ], - }, - ], - }, - }, - "jsx-fragments": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce shorthand or standard form for React fragments", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md", - }, - "fixable": "code", - "messages": { - "fragmentsNotSupported": "Fragments are only supported starting from React v16.2. Please disable the \`react/jsx-fragments\` rule in \`eslint\` settings or upgrade your version of React.", - "preferFragment": "Prefer fragment shorthand over {{react}}.{{fragment}}", - "preferPragma": "Prefer {{react}}.{{fragment}} over fragment shorthand", - }, - "schema": [ - { - "enum": [ - "syntax", - "element", - ], - }, - ], - }, - }, - "jsx-handler-names": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce event handler naming conventions in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md", - }, - "messages": { - "badHandlerName": "Handler function for {{propKey}} prop key must be a camelCase name beginning with '{{handlerPrefix}}' only", - "badPropKey": "Prop key for {{propValue}} must begin with '{{handlerPropPrefix}}'", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "checkInlineFunction": { - "type": "boolean", - }, - "checkLocalVariables": { - "type": "boolean", - }, - "eventHandlerPrefix": { - "type": "string", - }, - "eventHandlerPropPrefix": { - "type": "string", - }, - "ignoreComponentNames": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "checkInlineFunction": { - "type": "boolean", - }, - "checkLocalVariables": { - "type": "boolean", - }, - "eventHandlerPrefix": { - "type": "string", - }, - "eventHandlerPropPrefix": { - "enum": [ - false, - ], - "type": "boolean", - }, - "ignoreComponentNames": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "checkInlineFunction": { - "type": "boolean", - }, - "checkLocalVariables": { - "type": "boolean", - }, - "eventHandlerPrefix": { - "enum": [ - false, - ], - "type": "boolean", - }, - "eventHandlerPropPrefix": { - "type": "string", - }, - "ignoreComponentNames": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "checkLocalVariables": { - "type": "boolean", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "checkInlineFunction": { - "type": "boolean", - }, - }, - "type": "object", - }, - { - "properties": { - "ignoreComponentNames": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - ], - }, - }, - "jsx-indent": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce JSX indentation", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md", - }, - "fixable": "whitespace", - "messages": { - "wrongIndent": "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}.", - }, - "schema": [ - { - "anyOf": [ - { - "enum": [ - "tab", - ], - }, - { - "type": "integer", - }, - ], - }, - { - "additionalProperties": false, - "properties": { - "checkAttributes": { - "type": "boolean", - }, - "indentLogicalExpressions": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-indent-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce props indentation in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md", - }, - "fixable": "code", - "messages": { - "wrongIndent": "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}.", - }, - "schema": [ - { - "anyOf": [ - { - "enum": [ - "tab", - "first", - ], - }, - { - "type": "integer", - }, - { - "properties": { - "ignoreTernaryOperator": { - "type": "boolean", - }, - "indentMode": { - "anyOf": [ - { - "enum": [ - "tab", - "first", - ], - }, - { - "type": "integer", - }, - ], - }, - }, - "type": "object", - }, - ], - }, - ], - }, - }, - "jsx-key": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow missing \`key\` props in iterators/collection literals", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md", - }, - "messages": { - "keyBeforeSpread": "\`key\` prop must be placed before any \`{...spread}, to avoid conflicting with React’s new JSX transform: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html\`", - "missingArrayKey": "Missing "key" prop for element in array", - "missingArrayKeyUsePrag": "Missing "key" prop for element in array. Shorthand fragment syntax does not support providing keys. Use {{reactPrag}}.{{fragPrag}} instead", - "missingIterKey": "Missing "key" prop for element in iterator", - "missingIterKeyUsePrag": "Missing "key" prop for element in iterator. Shorthand fragment syntax does not support providing keys. Use {{reactPrag}}.{{fragPrag}} instead", - "nonUniqueKeys": "\`key\` prop must be unique", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "checkFragmentShorthand": { - "default": false, - "type": "boolean", - }, - "checkKeyMustBeforeSpread": { - "default": false, - "type": "boolean", - }, - "warnOnDuplicates": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-max-depth": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce JSX maximum depth", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md", - }, - "messages": { - "wrongDepth": "Expected the depth of nested jsx elements to be <= {{needed}}, but found {{found}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "max": { - "minimum": 0, - "type": "integer", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-max-props-per-line": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce maximum of props on a single line in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md", - }, - "fixable": "code", - "messages": { - "newLine": "Prop \`{{prop}}\` must be placed on a new line", - }, - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "maximum": { - "properties": { - "multi": { - "minimum": 1, - "type": "integer", - }, - "single": { - "minimum": 1, - "type": "integer", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "maximum": { - "minimum": 1, - "type": "number", - }, - "when": { - "enum": [ - "always", - "multiline", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - }, - ], - }, - }, - "jsx-newline": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Require or prevent a new line after jsx elements and expressions.", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md", - }, - "fixable": "code", - "messages": { - "allowMultilines": "Multiline JSX elements should start in a new line", - "prevent": "JSX element should not start in a new line", - "require": "JSX element should start in a new line", - }, - "schema": [ - { - "additionalProperties": false, - "if": { - "properties": { - "allowMultilines": { - "const": true, - }, - }, - }, - "properties": { - "allowMultilines": { - "default": false, - "type": "boolean", - }, - "prevent": { - "default": false, - "type": "boolean", - }, - }, - "then": { - "properties": { - "prevent": { - "const": true, - }, - }, - "required": [ - "prevent", - ], - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-bind": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow \`.bind()\` or arrow functions in JSX props", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md", - }, - "messages": { - "arrowFunc": "JSX props should not use arrow functions", - "bindCall": "JSX props should not use .bind()", - "bindExpression": "JSX props should not use ::", - "func": "JSX props should not use functions", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowArrowFunctions": { - "default": false, - "type": "boolean", - }, - "allowBind": { - "default": false, - "type": "boolean", - }, - "allowFunctions": { - "default": false, - "type": "boolean", - }, - "ignoreDOMComponents": { - "default": false, - "type": "boolean", - }, - "ignoreRefs": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-comment-textnodes": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow comments from being inserted as text nodes", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md", - }, - "messages": { - "putCommentInBraces": "Comments inside children section of tag should be placed inside braces", - }, - "schema": [], - }, - }, - "jsx-no-constructed-context-values": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallows JSX context provider values from taking values that will cause needless rerenders", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md", - }, - "messages": { - "defaultMsg": "The {{type}} passed as the value prop to the Context provider (at line {{nodeLine}}) changes every render. To fix this consider wrapping it in a useMemo hook.", - "defaultMsgFunc": "The {{type}} passed as the value prop to the Context provider (at line {{nodeLine}}) changes every render. To fix this consider wrapping it in a useCallback hook.", - "withIdentifierMsg": "The '{{variableName}}' {{type}} (at line {{nodeLine}}) passed as the value prop to the Context provider (at line {{usageLine}}) changes every render. To fix this consider wrapping it in a useMemo hook.", - "withIdentifierMsgFunc": "The '{{variableName}}' {{type}} (at line {{nodeLine}}) passed as the value prop to the Context provider (at line {{usageLine}}) changes every render. To fix this consider wrapping it in a useCallback hook.", - }, - "schema": false, - }, - }, - "jsx-no-duplicate-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow duplicate properties in JSX", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md", - }, - "messages": { - "noDuplicateProps": "No duplicate props allowed", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreCase": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-leaked-render": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow problematic leaked values from being rendered", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md", - }, - "fixable": "code", - "messages": { - "noPotentialLeakedRender": "Potential leaked value that might cause unintentionally rendered values or rendering crashes", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "validStrategies": { - "default": [ - "ternary", - "coerce", - ], - "items": { - "enum": [ - "ternary", - "coerce", - ], - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-literals": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow usage of string literals in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md", - }, - "messages": { - "invalidPropValue": "Invalid prop value: "{{text}}"", - "invalidPropValueInElement": "Invalid prop value: "{{text}}" in {{element}}", - "literalNotInJSXExpression": "Missing JSX expression container around literal string: "{{text}}"", - "literalNotInJSXExpressionInElement": "Missing JSX expression container around literal string: "{{text}}" in {{element}}", - "noStringsInAttributes": "Strings not allowed in attributes: "{{text}}"", - "noStringsInAttributesInElement": "Strings not allowed in attributes: "{{text}}" in {{element}}", - "noStringsInJSX": "Strings not allowed in JSX files: "{{text}}"", - "noStringsInJSXInElement": "Strings not allowed in JSX files: "{{text}}" in {{element}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowedStrings": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elementOverrides": { - "patternProperties": { - "^[A-Z][\\w.]*$": { - "properties": { - "allowedStrings": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "applyToNestedElements": { - "type": "boolean", - }, - "ignoreProps": { - "type": "boolean", - }, - "noAttributeStrings": { - "type": "boolean", - }, - "noStrings": { - "type": "boolean", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - "ignoreProps": { - "type": "boolean", - }, - "noAttributeStrings": { - "type": "boolean", - }, - "noStrings": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-script-url": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of \`javascript:\` URLs", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md", - }, - "messages": { - "noScriptURL": "A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML, try using dangerouslySetInnerHTML instead.", - }, - "schema": { - "anyOf": [ - { - "additionalItems": false, - "items": [ - { - "items": { - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - }, - "props": { - "items": { - "type": "string", - "uniqueItems": true, - }, - "type": "array", - }, - }, - "required": [ - "name", - "props", - ], - "type": "object", - }, - "type": "array", - "uniqueItems": true, - }, - { - "additionalItems": false, - "properties": { - "includeFromSettings": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - { - "additionalItems": false, - "items": [ - { - "additionalItems": false, - "properties": { - "includeFromSettings": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "array", - }, - ], - }, - }, - }, - "jsx-no-target-blank": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow \`target="_blank"\` attribute without \`rel="noreferrer"\`", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md", - }, - "fixable": "code", - "messages": { - "noTargetBlankWithoutNoopener": "Using target="_blank" without rel="noreferrer" or rel="noopener" (the former implies the latter and is preferred due to wider support) is a security risk: see https://mathiasbynens.github.io/rel-noopener/#recommendations", - "noTargetBlankWithoutNoreferrer": "Using target="_blank" without rel="noreferrer" (which implies rel="noopener") is a security risk in older browsers: see https://mathiasbynens.github.io/rel-noopener/#recommendations", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowReferrer": { - "type": "boolean", - }, - "enforceDynamicLinks": { - "enum": [ - "always", - "never", - ], - }, - "forms": { - "default": false, - "type": "boolean", - }, - "links": { - "default": true, - "type": "boolean", - }, - "warnOnSpreadAttributes": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-undef": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow undeclared variables in JSX", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md", - }, - "messages": { - "undefined": "'{{identifier}}' is not defined.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowGlobals": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-no-useless-fragment": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow unnecessary fragments", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md", - }, - "fixable": "code", - "messages": { - "ChildOfHtmlElement": "Passing a fragment to an HTML element is useless.", - "NeedsMoreChildren": "Fragments should contain more than one child - otherwise, there’s no need for a Fragment at all.", - }, - "schema": [ - { - "properties": { - "allowExpressions": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "jsx-one-expression-per-line": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Require one JSX element per line", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md", - }, - "fixable": "whitespace", - "messages": { - "moveToNewLine": "\`{{descriptor}}\` must be placed on a new line", - }, - "schema": [ - { - "additionalProperties": false, - "default": { - "allow": "none", - }, - "properties": { - "allow": { - "enum": [ - "none", - "literal", - "single-child", - "non-jsx", - ], - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-pascal-case": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce PascalCase for user-defined JSX components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md", - }, - "messages": { - "usePascalCase": "Imported JSX component {{name}} must be in PascalCase", - "usePascalOrSnakeCase": "Imported JSX component {{name}} must be in PascalCase or SCREAMING_SNAKE_CASE", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAllCaps": { - "type": "boolean", - }, - "allowLeadingUnderscore": { - "type": "boolean", - }, - "allowNamespace": { - "type": "boolean", - }, - "ignore": { - "items": [ - { - "type": "string", - }, - ], - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-props-no-multi-spaces": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow multiple spaces between inline JSX props", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md", - }, - "fixable": "code", - "messages": { - "noLineGap": "Expected no line gap between “{{prop1}}” and “{{prop2}}”", - "onlyOneSpace": "Expected only one space between “{{prop1}}” and “{{prop2}}”", - }, - "schema": [], - }, - }, - "jsx-props-no-spread-multi": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow JSX prop spreading the same identifier multiple times", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spread-multi.md", - }, - "messages": { - "noMultiSpreading": "Spreading the same expression multiple times is forbidden", - }, - }, - }, - "jsx-props-no-spreading": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow JSX prop spreading", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md", - }, - "messages": { - "noSpreading": "Prop spreading is forbidden", - }, - "schema": [ - { - "allOf": [ - { - "properties": { - "custom": { - "enum": [ - "enforce", - "ignore", - ], - }, - "exceptions": { - "items": { - "type": "string", - "uniqueItems": true, - }, - "type": "array", - }, - "explicitSpread": { - "enum": [ - "enforce", - "ignore", - ], - }, - "html": { - "enum": [ - "enforce", - "ignore", - ], - }, - }, - "type": "object", - }, - { - "not": { - "properties": { - "custom": { - "enum": [ - "ignore", - ], - }, - "exceptions": { - "maxItems": 0, - "minItems": 0, - "type": "array", - }, - "html": { - "enum": [ - "ignore", - ], - }, - }, - "required": [ - "html", - "custom", - ], - "type": "object", - }, - }, - ], - }, - ], - }, - }, - "jsx-sort-default-props": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "category": "Stylistic Issues", - "description": "Enforce defaultProps declarations alphabetical sorting", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md", - }, - "messages": { - "propsNotSorted": "Default prop types declarations should be sorted alphabetically", - }, - "replacedBy": [ - "sort-default-props", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreCase": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-sort-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce props alphabetical sorting", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md", - }, - "fixable": "code", - "messages": { - "listCallbacksLast": "Callbacks must be listed after all other props", - "listIsEmpty": "A customized reserved first list must not be empty", - "listMultilineFirst": "Multiline props must be listed before all other props", - "listMultilineLast": "Multiline props must be listed after all other props", - "listReservedPropsFirst": "Reserved props must be listed before all other props", - "listShorthandFirst": "Shorthand props must be listed before all other props", - "listShorthandLast": "Shorthand props must be listed after all other props", - "noUnreservedProps": "A customized reserved first list must only contain a subset of React reserved props. Remove: {{unreservedWords}}", - "sortPropsByAlpha": "Props should be sorted alphabetically", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "callbacksLast": { - "type": "boolean", - }, - "ignoreCase": { - "type": "boolean", - }, - "locale": { - "default": "auto", - "type": "string", - }, - "multiline": { - "default": "ignore", - "enum": [ - "ignore", - "first", - "last", - ], - }, - "noSortAlphabetically": { - "type": "boolean", - }, - "reservedFirst": { - "type": [ - "array", - "boolean", - ], - }, - "shorthandFirst": { - "type": "boolean", - }, - "shorthandLast": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-space-before-closing": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "category": "Stylistic Issues", - "description": "Enforce spacing before closing bracket in JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md", - }, - "fixable": "code", - "messages": { - "needSpaceBeforeClose": "A space is required before closing bracket", - "noSpaceBeforeClose": "A space is forbidden before closing bracket", - }, - "replacedBy": [ - "jsx-tag-spacing", - ], - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - }, - "jsx-tag-spacing": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce whitespace in and around the JSX opening and closing brackets", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md", - }, - "fixable": "whitespace", - "messages": { - "afterOpenNeedSpace": "A space is required after opening bracket", - "afterOpenNoSpace": "A space is forbidden after opening bracket", - "beforeCloseNeedNewline": "A newline is required before closing bracket", - "beforeCloseNeedSpace": "Whitespace is required before closing bracket", - "beforeCloseNoSpace": "A space is forbidden before closing bracket", - "beforeSelfCloseNeedNewline": "A newline is required before closing bracket", - "beforeSelfCloseNeedSpace": "A space is required before closing bracket", - "beforeSelfCloseNoSpace": "A space is forbidden before closing bracket", - "closeSlashNeedSpace": "Whitespace is required between \`<\` and \`/\`; write \`< /\`", - "closeSlashNoSpace": "Whitespace is forbidden between \`<\` and \`/\`; write \`\`; write \`/ >\`", - "selfCloseSlashNoSpace": "Whitespace is forbidden between \`/\` and \`>\`; write \`/>\`", - }, - "schema": [ - { - "additionalProperties": false, - "default": { - "afterOpening": "never", - "beforeClosing": "allow", - "beforeSelfClosing": "always", - "closingSlash": "never", - }, - "properties": { - "afterOpening": { - "enum": [ - "always", - "allow-multiline", - "never", - "allow", - ], - }, - "beforeClosing": { - "enum": [ - "always", - "proportional-always", - "never", - "allow", - ], - }, - "beforeSelfClosing": { - "enum": [ - "always", - "proportional-always", - "never", - "allow", - ], - }, - "closingSlash": { - "enum": [ - "always", - "never", - "allow", - ], - }, - }, - "type": "object", - }, - ], - }, - }, - "jsx-uses-react": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow React to be incorrectly marked as unused", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md", - }, - "schema": [], - }, - }, - "jsx-uses-vars": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow variables used in JSX to be incorrectly marked as unused", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md", - }, - "schema": [], - }, - }, - "jsx-wrap-multilines": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow missing parentheses around multiline JSX", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md", - }, - "fixable": "code", - "messages": { - "extraParens": "Expected no parentheses around multilines JSX", - "missingParens": "Missing parentheses around multilines JSX", - "parensOnNewLines": "Parentheses around JSX should be on separate lines", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "arrow": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "assignment": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "condition": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "declaration": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "logical": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "prop": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - "return": { - "enum": [ - true, - false, - "ignore", - "parens", - "parens-new-line", - "never", - ], - }, - }, - "type": "object", - }, - ], - }, - }, - "no-access-state-in-setstate": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow when this.state is accessed within setState", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md", - }, - "messages": { - "useCallback": "Use callback in setState when referencing the previous state.", - }, - }, - }, - "no-adjacent-inline-elements": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow adjacent inline elements not separated by whitespace.", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md", - }, - "messages": { - "inlineElement": "Child elements which render as inline HTML elements should be separated by a space or wrapped in block level elements.", - }, - "schema": [], - }, - }, - "no-array-index-key": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of Array index in keys", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md", - }, - "messages": { - "noArrayIndex": "Do not use Array index in keys", - }, - "schema": [], - }, - }, - "no-arrow-function-lifecycle": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Lifecycle methods should be methods on the prototype, not class fields", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md", - }, - "fixable": "code", - "messages": { - "lifecycle": "{{propertyName}} is a React lifecycle method, and should not be an arrow function or in a class field. Use an instance method instead.", - }, - "schema": [], - }, - }, - "no-children-prop": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow passing of children as props", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md", - }, - "messages": { - "nestChildren": "Do not pass children as props. Instead, nest children between the opening and closing tags.", - "nestFunction": "Do not nest a function between the opening and closing tags. Instead, pass it as a prop.", - "passChildrenAsArgs": "Do not pass children as props. Instead, pass them as additional arguments to React.createElement.", - "passFunctionAsArgs": "Do not pass a function as an additional argument to React.createElement. Instead, pass it as a prop.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowFunctions": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-danger": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of dangerous JSX properties", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md", - }, - "messages": { - "dangerousProp": "Dangerous property '{{name}}' found", - }, - "schema": [ - { - "properties": { - "customComponentNames": { - "items": { - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - }, - "no-danger-with-children": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow when a DOM element is using both children and dangerouslySetInnerHTML", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md", - }, - "messages": { - "dangerWithChildren": "Only set one of \`children\` or \`props.dangerouslySetInnerHTML\`", - }, - "schema": [], - }, - }, - "no-deprecated": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of deprecated methods", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md", - }, - "messages": { - "deprecated": "{{oldMethod}} is deprecated since React {{version}}{{newMethod}}{{refs}}", - }, - "schema": [], - }, - }, - "no-did-mount-set-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of setState in componentDidMount", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md", - }, - "messages": { - "noSetState": "Do not use setState in {{name}}", - }, - "schema": [ - { - "enum": [ - "disallow-in-func", - ], - }, - ], - }, - }, - "no-did-update-set-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of setState in componentDidUpdate", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md", - }, - "messages": { - "noSetState": "Do not use setState in {{name}}", - }, - "schema": [ - { - "enum": [ - "disallow-in-func", - ], - }, - ], - }, - }, - "no-direct-mutation-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow direct mutation of this.state", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md", - }, - "messages": { - "noDirectMutation": "Do not mutate state directly. Use setState().", - }, - }, - }, - "no-find-dom-node": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of findDOMNode", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md", - }, - "messages": { - "noFindDOMNode": "Do not use findDOMNode. It doesn’t work with function components and is deprecated in StrictMode. See https://reactjs.org/docs/react-dom.html#finddomnode", - }, - "schema": [], - }, - }, - "no-invalid-html-attribute": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow usage of invalid attributes", - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md", - }, - "hasSuggestions": true, - "messages": { - "emptyIsMeaningless": "An empty “{{attributeName}}” attribute is meaningless.", - "neverValid": "“{{reportingValue}}” is never a valid “{{attributeName}}” attribute value.", - "noEmpty": "An empty “{{attributeName}}” attribute is meaningless.", - "noMethod": "The ”{{attributeName}}“ attribute cannot be a method.", - "notAlone": "“{{reportingValue}}” must be directly followed by “{{missingValue}}”.", - "notPaired": "“{{reportingValue}}” can not be directly followed by “{{secondValue}}” without “{{missingValue}}”.", - "notValidFor": "“{{reportingValue}}” is not a valid “{{attributeName}}” attribute value for <{{elementName}}>.", - "onlyMeaningfulFor": "The ”{{attributeName}}“ attribute only has meaning on the tags: {{tagNames}}", - "onlyStrings": "“{{attributeName}}” attribute only supports strings.", - "spaceDelimited": "”{{attributeName}}“ attribute values should be space delimited.", - "suggestRemoveDefault": ""remove {{attributeName}}"", - "suggestRemoveEmpty": ""remove empty attribute {{attributeName}}"", - "suggestRemoveInvalid": "“remove invalid attribute {{reportingValue}}”", - "suggestRemoveNonString": "remove non-string value in “{{attributeName}}”", - "suggestRemoveWhitespaces": "remove whitespaces in “{{attributeName}}”", - }, - "schema": [ - { - "items": { - "enum": [ - "rel", - ], - }, - "type": "array", - "uniqueItems": true, - }, - ], - "type": "suggestion", - }, - }, - "no-is-mounted": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of isMounted", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md", - }, - "messages": { - "noIsMounted": "Do not use isMounted", - }, - "schema": [], - }, - }, - "no-multi-comp": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow multiple component definition per file", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md", - }, - "messages": { - "onlyOneComponent": "Declare only one React component per file", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreStateless": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-namespace": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Enforce that namespaces are not used in React elements", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md", - }, - "messages": { - "noNamespace": "React component {{name}} must not be in a namespace, as React does not support them", - }, - "schema": [], - }, - }, - "no-object-type-as-default-prop": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of referential-type variables as default param in functional component", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md", - }, - "messages": { - "forbiddenTypeDefaultParam": "{{propName}} has a/an {{forbiddenType}} as default prop. This could lead to potential infinite render loop in React. Use a variable reference instead of {{forbiddenType}}.", - }, - }, - }, - "no-redundant-should-component-update": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow usage of shouldComponentUpdate when extending React.PureComponent", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md", - }, - "messages": { - "noShouldCompUpdate": "{{component}} does not need shouldComponentUpdate when extending React.PureComponent.", - }, - "schema": [], - }, - }, - "no-render-return-value": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of the return value of ReactDOM.render", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md", - }, - "messages": { - "noReturnValue": "Do not depend on the return value from {{node}}.render", - }, - "schema": [], - }, - }, - "no-set-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow usage of setState", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md", - }, - "messages": { - "noSetState": "Do not use setState", - }, - "schema": [], - }, - }, - "no-string-refs": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow using string references", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md", - }, - "messages": { - "stringInRefDeprecated": "Using string literals in ref attributes is deprecated.", - "thisRefsDeprecated": "Using this.refs is deprecated.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "noTemplateLiterals": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-this-in-sfc": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow \`this\` from being used in stateless functional components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md", - }, - "messages": { - "noThisInSFC": "Stateless functional components should not use \`this\`", - }, - "schema": [], - }, - }, - "no-typos": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow common typos", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md", - }, - "messages": { - "noPropTypesBinding": "\`'prop-types'\` imported without a local \`PropTypes\` binding.", - "noReactBinding": "\`'react'\` imported without a local \`React\` binding.", - "staticLifecycleMethod": "Lifecycle method should be static: {{method}}", - "typoLifecycleMethod": "Typo in component lifecycle method declaration: {{actual}} should be {{expected}}", - "typoPropDeclaration": "Typo in property declaration", - "typoPropType": "Typo in declared prop type: {{name}}", - "typoPropTypeChain": "Typo in prop type chain qualifier: {{name}}", - "typoStaticClassProp": "Typo in static class property declaration", - }, - "schema": [], - }, - }, - "no-unescaped-entities": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow unescaped HTML entities from appearing in markup", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md", - }, - "hasSuggestions": true, - "messages": { - "replaceWithAlt": "Replace with \`{{alt}}\`.", - "unescapedEntity": "HTML entity, \`{{entity}}\` , must be escaped.", - "unescapedEntityAlts": "\`{{entity}}\` can be escaped with {{alts}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "forbid": { - "items": { - "anyOf": [ - { - "type": "string", - }, - { - "properties": { - "alternatives": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "char": { - "type": "string", - }, - }, - "type": "object", - }, - ], - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-unknown-property": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow usage of unknown DOM property", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md", - }, - "fixable": "code", - "messages": { - "dataLowercaseRequired": "React does not recognize data-* props with uppercase characters on a DOM element. Found '{{name}}', use '{{lowerCaseName}}' instead", - "invalidPropOnTag": "Invalid property '{{name}}' found on tag '{{tagName}}', but it is only allowed on: {{allowedTags}}", - "unknownProp": "Unknown property '{{name}}' found", - "unknownPropWithStandardName": "Unknown property '{{name}}' found, use '{{standardName}}' instead", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - }, - "requireDataLowercase": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-unsafe": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of unsafe lifecycle methods", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md", - }, - "messages": { - "unsafeMethod": "{{method}} is unsafe for use in async rendering. Update the component to use {{newMethod}} instead. {{details}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "checkAliases": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-unstable-nested-components": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow creating unstable components inside components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowAsProps": { - "type": "boolean", - }, - "customValidators": { - "items": { - "type": "string", - }, - "type": "array", - }, - "propNamePattern": { - "type": "string", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-unused-class-component-methods": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow declaring unused methods of component class", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md", - }, - "messages": { - "unused": "Unused method or property "{{name}}"", - "unusedWithClass": "Unused method or property "{{name}}" of class "{{className}}"", - }, - "schema": [], - }, - }, - "no-unused-prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow definitions of unused propTypes", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md", - }, - "messages": { - "unusedPropType": "'{{name}}' PropType is defined but prop is never used", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "customValidators": { - "items": { - "type": "string", - }, - "type": "array", - }, - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "skipShapeProps": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "no-unused-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow definitions of unused state", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md", - }, - "messages": { - "unusedStateField": "Unused state field: '{{name}}'", - }, - "schema": [], - }, - }, - "no-will-update-set-state": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow usage of setState in componentWillUpdate", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md", - }, - "messages": { - "noSetState": "Do not use setState in {{name}}", - }, - "schema": [ - { - "enum": [ - "disallow-in-func", - ], - }, - ], - }, - }, - "prefer-es6-class": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce ES5 or ES6 class for React Components", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md", - }, - "messages": { - "shouldUseCreateClass": "Component should use createClass instead of es6 class", - "shouldUseES6Class": "Component should use es6 class instead of createClass", - }, - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - }, - "prefer-exact-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Prefer exact proptype definitions", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md", - }, - "messages": { - "flow": "Component flow props should be set with exact objects.", - "propTypes": "Component propTypes should be exact by using {{exactPropWrappers}}.", - }, - "schema": [], - }, - }, - "prefer-read-only-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce that props are read-only", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md", - }, - "fixable": "code", - "messages": { - "readOnlyProp": "Prop '{{name}}' should be read-only.", - }, - "schema": [], - }, - }, - "prefer-stateless-function": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce stateless components to be written as a pure function", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md", - }, - "messages": { - "componentShouldBePure": "Component should be written as a pure function", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignorePureComponents": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow missing props validation in a React component definition", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md", - }, - "messages": { - "missingPropType": "'{{name}}' is missing in props validation", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "customValidators": { - "items": { - "type": "string", - }, - "type": "array", - }, - "ignore": { - "items": { - "type": "string", - }, - "type": "array", - }, - "skipUndeclared": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "react-in-jsx-scope": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Disallow missing React when using JSX", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md", - }, - "messages": { - "notInScope": "'{{name}}' must be in scope when using JSX", - }, - "schema": [], - }, - }, - "require-default-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Enforce a defaultProps definition for every prop that is not a required prop", - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md", - }, - "messages": { - "destructureInSignature": "Must destructure props in the function signature to initialize an optional prop.", - "noDefaultPropsWithFunction": "Don’t use defaultProps with function components.", - "noDefaultWithRequired": "propType "{{name}}" is required and should not have a defaultProps declaration.", - "shouldAssignObjectDefault": "propType "{{name}}" is not required, but has no corresponding default argument value.", - "shouldHaveDefault": "propType "{{name}}" is not required, but has no corresponding defaultProps declaration.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "classes": { - "enum": [ - "defaultProps", - "ignore", - ], - }, - "forbidDefaultForRequired": { - "type": "boolean", - }, - "functions": { - "enum": [ - "defaultArguments", - "defaultProps", - "ignore", - ], - }, - "ignoreFunctionalComponents": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "require-optimization": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Enforce React components to have a shouldComponentUpdate method", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md", - }, - "messages": { - "noShouldComponentUpdate": "Component is not optimized. Please add a shouldComponentUpdate method.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowDecorators": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "require-render-return": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Enforce ES5 or ES6 class for returning value in render function", - "recommended": true, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md", - }, - "messages": { - "noRenderReturn": "Your render method should have a return statement", - }, - "schema": [], - }, - }, - "self-closing-comp": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Disallow extra closing tags for components without children", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md", - }, - "fixable": "code", - "messages": { - "notSelfClosing": "Empty components are self-closing", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "component": { - "default": true, - "type": "boolean", - }, - "html": { - "default": true, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "sort-comp": { - "create": [Function], - "defaultConfig": { - "groups": { - "lifecycle": [ - "displayName", - "propTypes", - "contextTypes", - "childContextTypes", - "mixins", - "statics", - "defaultProps", - "constructor", - "getDefaultProps", - "state", - "getInitialState", - "getChildContext", - "getDerivedStateFromProps", - "componentWillMount", - "UNSAFE_componentWillMount", - "componentDidMount", - "componentWillReceiveProps", - "UNSAFE_componentWillReceiveProps", - "shouldComponentUpdate", - "componentWillUpdate", - "UNSAFE_componentWillUpdate", - "getSnapshotBeforeUpdate", - "componentDidUpdate", - "componentDidCatch", - "componentWillUnmount", - ], - }, - "order": [ - "static-methods", - "lifecycle", - "everything-else", - "render", - ], - }, - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce component methods order", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md", - }, - "messages": { - "unsortedProps": "{{propA}} should be placed {{position}} {{propB}}", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "groups": { - "patternProperties": { - "^.*$": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - "order": { - "items": { - "type": "string", - }, - "type": "array", - }, - }, - "type": "object", - }, - ], - }, - }, - "sort-default-props": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce defaultProps declarations alphabetical sorting", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md", - }, - "messages": { - "propsNotSorted": "Default prop types declarations should be sorted alphabetically", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "ignoreCase": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "sort-prop-types": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce propTypes declarations alphabetical sorting", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md", - }, - "fixable": "code", - "messages": { - "callbackPropsLast": "Callback prop types must be listed after all other prop types", - "propsNotSorted": "Prop types declarations should be sorted alphabetically", - "requiredPropsFirst": "Required prop types must be listed before all other prop types", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "callbacksLast": { - "type": "boolean", - }, - "checkTypes": { - "type": "boolean", - }, - "ignoreCase": { - "type": "boolean", - }, - "noSortAlphabetically": { - "type": "boolean", - }, - "requiredFirst": { - "type": "boolean", - }, - "sortShapeProp": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - }, - }, - "state-in-constructor": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforce class component state initialization style", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md", - }, - "messages": { - "stateInitClassProp": "State initialization should be in a class property", - "stateInitConstructor": "State initialization should be in a constructor", - }, - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - }, - "static-property-placement": { - "create": [Function], - "meta": { - "docs": { - "category": "Stylistic Issues", - "description": "Enforces where React component static properties should be positioned.", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md", - }, - "fixable": null, - "messages": { - "declareOutsideClass": "'{{name}}' should be declared outside the class body.", - "notGetterClassFunc": "'{{name}}' should be declared as a static getter class function.", - "notStaticClassProp": "'{{name}}' should be declared as a static class property.", - }, - "schema": [ - { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - { - "additionalProperties": false, - "properties": { - "childContextTypes": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - "contextType": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - "contextTypes": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - "defaultProps": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - "displayName": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - "propTypes": { - "enum": [ - "static public field", - "static getter", - "property assignment", - ], - }, - }, - "type": "object", - }, - ], - }, - }, - "style-prop-object": { - "create": [Function], - "meta": { - "docs": { - "category": "Possible Errors", - "description": "Enforce style prop value is an object", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md", - }, - "messages": { - "stylePropNotObject": "Style prop value must be an object", - }, - "schema": [ - { - "properties": { - "allow": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "type": "object", - }, - ], - }, - }, - "void-dom-elements-no-children": { - "create": [Function], - "meta": { - "docs": { - "category": "Best Practices", - "description": "Disallow void DOM elements (e.g. \`\`, \`
\`) from receiving children", - "recommended": false, - "url": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md", - }, - "messages": { - "noChildrenInVoidEl": "Void DOM element <{{element}} /> cannot receive children.", - }, - "schema": [], - }, - }, - }, - }, - "react-hooks": { - "configs": { - "recommended": { - "plugins": [ - "react-hooks", - ], - "rules": { - "react-hooks/exhaustive-deps": "warn", - "react-hooks/rules-of-hooks": "error", - }, - }, - }, - "rules": { - "exhaustive-deps": { - "create": [Function], - "meta": { - "docs": { - "description": "verifies the list of dependencies for Hooks like useEffect and similar", - "recommended": true, - "url": "https://github.com/facebook/react/issues/14920", - }, - "fixable": "code", - "hasSuggestions": true, - "schema": [ - { - "additionalProperties": false, - "enableDangerousAutofixThisMayCauseInfiniteLoops": false, - "properties": { - "additionalHooks": { - "type": "string", - }, - "enableDangerousAutofixThisMayCauseInfiniteLoops": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "rules-of-hooks": { - "create": [Function], - "meta": { - "docs": { - "description": "enforces the Rules of Hooks", - "recommended": true, - "url": "https://reactjs.org/docs/hooks-rules.html", - }, - "type": "problem", - }, - }, - }, - }, - "react-refresh": { - "default": { - "rules": { - "only-export-components": { - "create": [Function], - "defaultOptions": [], - "meta": { - "messages": { - "anonymousExport": "Fast refresh can't handle anonymous components. Add a name to your export.", - "exportAll": "This rule can't verify that \`export *\` only exports components.", - "localComponents": "Fast refresh only works when a file only exports components. Move your component(s) to a separate file.", - "namedExport": "Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.", - "noExport": "Fast refresh only works when a file has exports. Move your component(s) to a separate file.", - "reactContext": "Fast refresh only works when a file only exports components. Move your React context(s) to a separate file.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowConstantExport": { - "type": "boolean", - }, - "allowExportNames": { - "items": { - "type": "string", - }, - "type": "array", - }, - "checkJS": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - }, - }, - "rules": { - "only-export-components": { - "create": [Function], - "defaultOptions": [], - "meta": { - "messages": { - "anonymousExport": "Fast refresh can't handle anonymous components. Add a name to your export.", - "exportAll": "This rule can't verify that \`export *\` only exports components.", - "localComponents": "Fast refresh only works when a file only exports components. Move your component(s) to a separate file.", - "namedExport": "Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.", - "noExport": "Fast refresh only works when a file has exports. Move your component(s) to a separate file.", - "reactContext": "Fast refresh only works when a file only exports components. Move your React context(s) to a separate file.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowConstantExport": { - "type": "boolean", - }, - "allowExportNames": { - "items": { - "type": "string", - }, - "type": "array", - }, - "checkJS": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, - }, - }, - }, - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-ambiguous-text": "off", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "searchbox", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "canvas": [ - "img", - ], - "tr": [ - "none", - "presentation", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "alert": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "body": [ - "onError", - "onLoad", - ], - "dialog": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "handlers": [ - "onClick", - "onError", - "onLoad", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "fieldset": [ - "radiogroup", - "presentation", - ], - "li": [ - "menuitem", - "menuitemradio", - "menuitemcheckbox", - "option", - "row", - "tab", - "treeitem", - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - "table": [ - "grid", - ], - "td": [ - "gridcell", - ], - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - }, - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "allowExpressionValues": true, - "roles": [ - "tabpanel", - ], - "tags": [], - }, - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "allowExpressionValues": true, - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - }, - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - "react-hooks/exhaustive-deps": "error", - "react-hooks/rules-of-hooks": "error", - "react-refresh/only-export-components": [ - "warn", - { - "allowConstantExport": true, - }, - ], - "react/boolean-prop-naming": "off", - "react/button-has-type": "error", - "react/checked-requires-onchange-or-readonly": "error", - "react/default-props-match-prop-types": "error", - "react/destructuring-assignment": "off", - "react/display-name": "error", - "react/forbid-component-props": "off", - "react/forbid-dom-props": "off", - "react/forbid-elements": "off", - "react/forbid-foreign-prop-types": "off", - "react/forbid-prop-types": "off", - "react/function-component-definition": "off", - "react/hook-use-state": "error", - "react/iframe-missing-sandbox": "error", - "react/jsx-boolean-value": [ - "error", - "never", - ], - "react/jsx-curly-brace-presence": "error", - "react/jsx-filename-extension": "off", - "react/jsx-fragments": [ - "error", - "syntax", - ], - "react/jsx-handler-names": "off", - "react/jsx-key": "error", - "react/jsx-max-depth": "off", - "react/jsx-no-bind": "off", - "react/jsx-no-comment-textnodes": "error", - "react/jsx-no-constructed-context-values": "error", - "react/jsx-no-duplicate-props": "error", - "react/jsx-no-leaked-render": "error", - "react/jsx-no-literals": "off", - "react/jsx-no-script-url": "error", - "react/jsx-no-target-blank": "error", - "react/jsx-no-undef": "error", - "react/jsx-no-useless-fragment": "error", - "react/jsx-one-expression-per-line": "off", - "react/jsx-pascal-case": [ - "error", - { - "allowNamespace": true, - }, - ], - "react/jsx-props-no-spreading": "off", - "react/jsx-sort-default-props": "off", - "react/jsx-sort-props": "off", - "react/jsx-uses-react": "off", - "react/jsx-uses-vars": "error", - "react/no-access-state-in-setstate": "error", - "react/no-adjacent-inline-elements": "off", - "react/no-array-index-key": "off", - "react/no-arrow-function-lifecycle": "error", - "react/no-children-prop": "error", - "react/no-danger": "off", - "react/no-danger-with-children": "error", - "react/no-deprecated": "error", - "react/no-did-mount-set-state": "error", - "react/no-did-update-set-state": "error", - "react/no-direct-mutation-state": "error", - "react/no-find-dom-node": "error", - "react/no-invalid-html-attribute": "error", - "react/no-is-mounted": "error", - "react/no-multi-comp": "off", - "react/no-namespace": "error", - "react/no-object-type-as-default-prop": "off", - "react/no-redundant-should-component-update": "error", - "react/no-render-return-value": "error", - "react/no-set-state": "off", - "react/no-string-refs": "error", - "react/no-this-in-sfc": "error", - "react/no-typos": "error", - "react/no-unescaped-entities": "error", - "react/no-unknown-property": "error", - "react/no-unsafe": "off", - "react/no-unstable-nested-components": "error", - "react/no-unused-class-component-methods": "error", - "react/no-unused-prop-types": "error", - "react/no-unused-state": "error", - "react/no-will-update-set-state": "error", - "react/prefer-es6-class": "off", - "react/prefer-exact-props": "off", - "react/prefer-read-only-props": "off", - "react/prefer-stateless-function": "off", - "react/prop-types": "error", - "react/react-in-jsx-scope": "off", - "react/require-default-props": "off", - "react/require-optimization": "off", - "react/require-render-return": "error", - "react/self-closing-comp": "error", - "react/sort-comp": "off", - "react/sort-default-props": "off", - "react/sort-prop-types": "off", - "react/state-in-constructor": "off", - "react/static-property-placement": "off", - "react/style-prop-object": "error", - "react/void-dom-elements-no-children": "error", - }, - "settings": { - "react": { - "version": "detect", - }, - }, - }, - { - "files": [ - "**/*.?([cm])jsx", - "**/*.?([cm])tsx", - ], - "name": "jimmy.codes/react/query", - "plugins": { - "@tanstack/query": { - "configs": { - "flat/recommended": [ - { - "plugins": { - "@tanstack/query": [Circular], - }, - "rules": { - "@tanstack/query/exhaustive-deps": "error", - "@tanstack/query/infinite-query-property-order": "error", - "@tanstack/query/no-rest-destructuring": "warn", - "@tanstack/query/no-unstable-deps": "error", - "@tanstack/query/stable-query-client": "error", - }, - }, - ], - "recommended": { - "plugins": [ - "@tanstack/query", - ], - "rules": { - "@tanstack/query/exhaustive-deps": "error", - "@tanstack/query/infinite-query-property-order": "error", - "@tanstack/query/no-rest-destructuring": "warn", - "@tanstack/query/no-unstable-deps": "error", - "@tanstack/query/stable-query-client": "error", - }, - }, - }, - "meta": { - "name": "@tanstack/eslint-plugin-query", - }, - "rules": { - "exhaustive-deps": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Exhaustive deps rule for useQuery", - "recommended": "error", - "url": "https://tanstack.com/query/latest/docs/eslint/exhaustive-deps", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "fixTo": "Fix to {{result}}", - "missingDeps": "The following dependencies are missing in your queryKey: {{deps}}", - }, - "schema": [], - "type": "problem", - }, - }, - "infinite-query-property-order": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Ensure correct order of inference sensitive properties for infinite queries", - "recommended": "error", - "url": "https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "invalidOrder": "Invalid order of properties for \`{{function}}\`.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-rest-destructuring": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Disallows rest destructuring in queries", - "recommended": "warn", - "url": "https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring", - }, - "messages": { - "objectRestDestructure": "Object rest destructuring on a query will observe all changes to the query, leading to excessive re-renders.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-unstable-deps": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Disallow putting the result of query hooks directly in a React hook dependency array", - "recommended": "error", - "url": "https://tanstack.com/query/latest/docs/eslint/no-unstable-deps", - }, - "messages": { - "noUnstableDeps": "The result of {{queryHook}} is not referentially stable, so don't pass it directly into the dependencies array of {{reactHook}}. Instead, destructure the return value of {{queryHook}} and pass the destructured values into the dependency array of {{reactHook}}.", - }, - "schema": [], - "type": "problem", - }, - }, - "stable-query-client": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Makes sure that QueryClient is stable", - "recommended": "error", - "url": "https://tanstack.com/query/latest/docs/eslint/stable-query-client", - }, - "fixable": "code", - "hasSuggestions": true, - "messages": { - "fixTo": "Fix to {{result}}", - "unstable": "QueryClient is not stable. It should be either extracted from the component or wrapped in React.useState. -See https://tkdodo.eu/blog/react-query-fa-qs#2-the-queryclient-is-not-stable", - }, - "schema": [], - "type": "problem", - }, - }, - }, - }, - }, - "rules": { - "@tanstack/query/exhaustive-deps": "error", - "@tanstack/query/no-rest-destructuring": "warn", - "@tanstack/query/stable-query-client": "error", - }, - }, -] -`; - -exports[`reactConfig > should create default config 1`] = ` -[ - { - "files": [ - "**/*.?([cm])jsx", - "**/*.?([cm])tsx", - ], - "languageOptions": { - "globals": { - "AI": false, - "AITextSession": false, - "AbortController": false, - "AbortSignal": false, - "AbsoluteOrientationSensor": false, - "AbstractRange": false, - "Accelerometer": false, - "AnalyserNode": false, - "Animation": false, - "AnimationEffect": false, - "AnimationEvent": false, - "AnimationPlaybackEvent": false, - "AnimationTimeline": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioData": false, - "AudioDecoder": false, - "AudioDestinationNode": false, - "AudioEncoder": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioParamMap": false, - "AudioProcessingEvent": false, - "AudioScheduledSourceNode": false, - "AudioSinkInfo": false, - "AudioWorklet": false, - "AudioWorkletGlobalScope": false, - "AudioWorkletNode": false, - "AudioWorkletProcessor": false, - "AuthenticatorAssertionResponse": false, - "AuthenticatorAttestationResponse": false, - "AuthenticatorResponse": false, - "BackgroundFetchManager": false, - "BackgroundFetchRecord": false, - "BackgroundFetchRegistration": false, - "BarProp": false, - "BarcodeDetector": false, - "BaseAudioContext": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "BlobEvent": false, - "Bluetooth": false, - "BluetoothCharacteristicProperties": false, - "BluetoothDevice": false, - "BluetoothRemoteGATTCharacteristic": false, - "BluetoothRemoteGATTDescriptor": false, - "BluetoothRemoteGATTServer": false, - "BluetoothRemoteGATTService": false, - "BluetoothUUID": false, - "BroadcastChannel": false, - "BrowserCaptureMediaStreamTrack": false, - "ByteLengthQueuingStrategy": false, - "CDATASection": false, - "CSS": false, - "CSSAnimation": false, - "CSSConditionRule": false, - "CSSContainerRule": false, - "CSSCounterStyleRule": false, - "CSSFontFaceRule": false, - "CSSFontFeatureValuesRule": false, - "CSSFontPaletteValuesRule": false, - "CSSGroupingRule": false, - "CSSImageValue": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSKeywordValue": false, - "CSSLayerBlockRule": false, - "CSSLayerStatementRule": false, - "CSSMathClamp": false, - "CSSMathInvert": false, - "CSSMathMax": false, - "CSSMathMin": false, - "CSSMathNegate": false, - "CSSMathProduct": false, - "CSSMathSum": false, - "CSSMathValue": false, - "CSSMatrixComponent": false, - "CSSMediaRule": false, - "CSSNamespaceRule": false, - "CSSNumericArray": false, - "CSSNumericValue": false, - "CSSPageDescriptors": false, - "CSSPageRule": false, - "CSSPerspective": false, - "CSSPositionTryDescriptors": false, - "CSSPositionTryRule": false, - "CSSPositionValue": false, - "CSSPropertyRule": false, - "CSSRotate": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSScale": false, - "CSSScopeRule": false, - "CSSSkew": false, - "CSSSkewX": false, - "CSSSkewY": false, - "CSSStartingStyleRule": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSStyleValue": false, - "CSSSupportsRule": false, - "CSSTransformComponent": false, - "CSSTransformValue": false, - "CSSTransition": false, - "CSSTranslate": false, - "CSSUnitValue": false, - "CSSUnparsedValue": false, - "CSSVariableReferenceValue": false, - "CSSViewTransitionRule": false, - "Cache": false, - "CacheStorage": false, - "CanvasCaptureMediaStream": false, - "CanvasCaptureMediaStreamTrack": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "CaptureController": false, - "CaretPosition": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "ChapterInformation": false, - "CharacterBoundsUpdateEvent": false, - "CharacterData": false, - "Clipboard": false, - "ClipboardEvent": false, - "ClipboardItem": false, - "CloseEvent": false, - "CloseWatcher": false, - "Comment": false, - "CompositionEvent": false, - "CompressionStream": false, - "ConstantSourceNode": false, - "ContentVisibilityAutoStateChangeEvent": false, - "ConvolverNode": false, - "CookieChangeEvent": false, - "CookieDeprecationLabel": false, - "CookieStore": false, - "CookieStoreManager": false, - "CountQueuingStrategy": false, - "Credential": false, - "CredentialsContainer": false, - "CropTarget": false, - "Crypto": false, - "CryptoKey": false, - "CustomElementRegistry": false, - "CustomEvent": false, - "CustomStateSet": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMMatrix": false, - "DOMMatrixReadOnly": false, - "DOMParser": false, - "DOMPoint": false, - "DOMPointReadOnly": false, - "DOMQuad": false, - "DOMRect": false, - "DOMRectList": false, - "DOMRectReadOnly": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "DecompressionStream": false, - "DelayNode": false, - "DelegatedInkTrailPresenter": false, - "DeviceMotionEvent": false, - "DeviceMotionEventAcceleration": false, - "DeviceMotionEventRotationRate": false, - "DeviceOrientationEvent": false, - "Document": false, - "DocumentFragment": false, - "DocumentPictureInPicture": false, - "DocumentPictureInPictureEvent": false, - "DocumentTimeline": false, - "DocumentType": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "EditContext": false, - "Element": false, - "ElementInternals": false, - "EncodedAudioChunk": false, - "EncodedVideoChunk": false, - "ErrorEvent": false, - "Event": false, - "EventCounts": false, - "EventSource": false, - "EventTarget": false, - "External": false, - "EyeDropper": false, - "FeaturePolicy": false, - "FederatedCredential": false, - "Fence": false, - "FencedFrameConfig": false, - "FetchLaterResult": false, - "File": false, - "FileList": false, - "FileReader": false, - "FileSystem": false, - "FileSystemDirectoryEntry": false, - "FileSystemDirectoryHandle": false, - "FileSystemDirectoryReader": false, - "FileSystemEntry": false, - "FileSystemFileEntry": false, - "FileSystemFileHandle": false, - "FileSystemHandle": false, - "FileSystemWritableFileStream": false, - "Float16Array": false, - "FocusEvent": false, - "FontData": false, - "FontFace": false, - "FontFaceSet": false, - "FontFaceSetLoadEvent": false, - "FormData": false, - "FormDataEvent": false, - "FragmentDirective": false, - "GPU": false, - "GPUAdapter": false, - "GPUAdapterInfo": false, - "GPUBindGroup": false, - "GPUBindGroupLayout": false, - "GPUBuffer": false, - "GPUBufferUsage": false, - "GPUCanvasContext": false, - "GPUColorWrite": false, - "GPUCommandBuffer": false, - "GPUCommandEncoder": false, - "GPUCompilationInfo": false, - "GPUCompilationMessage": false, - "GPUComputePassEncoder": false, - "GPUComputePipeline": false, - "GPUDevice": false, - "GPUDeviceLostInfo": false, - "GPUError": false, - "GPUExternalTexture": false, - "GPUInternalError": false, - "GPUMapMode": false, - "GPUOutOfMemoryError": false, - "GPUPipelineError": false, - "GPUPipelineLayout": false, - "GPUQuerySet": false, - "GPUQueue": false, - "GPURenderBundle": false, - "GPURenderBundleEncoder": false, - "GPURenderPassEncoder": false, - "GPURenderPipeline": false, - "GPUSampler": false, - "GPUShaderModule": false, - "GPUShaderStage": false, - "GPUSupportedFeatures": false, - "GPUSupportedLimits": false, - "GPUTexture": false, - "GPUTextureUsage": false, - "GPUTextureView": false, - "GPUUncapturedErrorEvent": false, - "GPUValidationError": false, - "GainNode": false, - "Gamepad": false, - "GamepadAxisMoveEvent": false, - "GamepadButton": false, - "GamepadButtonEvent": false, - "GamepadEvent": false, - "GamepadHapticActuator": false, - "GamepadPose": false, - "Geolocation": false, - "GeolocationCoordinates": false, - "GeolocationPosition": false, - "GeolocationPositionError": false, - "GravitySensor": false, - "Gyroscope": false, - "HID": false, - "HIDConnectionEvent": false, - "HIDDevice": false, - "HIDInputReportEvent": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBRElement": false, - "HTMLBaseElement": false, - "HTMLBodyElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLDListElement": false, - "HTMLDataElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFencedFrameElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHRElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLLIElement": false, - "HTMLLabelElement": false, - "HTMLLegendElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLOListElement": false, - "HTMLObjectElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLSlotElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTimeElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "HashChangeEvent": false, - "Headers": false, - "Highlight": false, - "HighlightRegistry": false, - "History": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "IIRFilterNode": false, - "IdentityCredential": false, - "IdentityCredentialError": false, - "IdentityProvider": false, - "IdleDeadline": false, - "IdleDetector": false, - "Image": false, - "ImageBitmap": false, - "ImageBitmapRenderingContext": false, - "ImageCapture": false, - "ImageData": false, - "ImageDecoder": false, - "ImageTrack": false, - "ImageTrackList": false, - "Ink": false, - "InputDeviceCapabilities": false, - "InputDeviceInfo": false, - "InputEvent": false, - "IntersectionObserver": false, - "IntersectionObserverEntry": false, - "Iterator": false, - "Keyboard": false, - "KeyboardEvent": false, - "KeyboardLayoutMap": false, - "KeyframeEffect": false, - "LargestContentfulPaint": false, - "LaunchParams": false, - "LaunchQueue": false, - "LayoutShift": false, - "LayoutShiftAttribution": false, - "LinearAccelerationSensor": false, - "Location": false, - "Lock": false, - "LockManager": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MathMLElement": false, - "MediaCapabilities": false, - "MediaCapabilitiesInfo": false, - "MediaDeviceInfo": false, - "MediaDevices": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyError": false, - "MediaKeyMessageEvent": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaKeys": false, - "MediaList": false, - "MediaMetadata": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaRecorder": false, - "MediaRecorderErrorEvent": false, - "MediaSession": false, - "MediaSource": false, - "MediaSourceHandle": false, - "MediaStream": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "MediaStreamTrackAudioSourceNode": false, - "MediaStreamTrackAudioStats": false, - "MediaStreamTrackEvent": false, - "MediaStreamTrackGenerator": false, - "MediaStreamTrackProcessor": false, - "MediaStreamTrackVideoStats": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MimeType": false, - "MimeTypeArray": false, - "ModelGenericSession": false, - "ModelManager": false, - "MouseEvent": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "NamedNodeMap": false, - "NavigateEvent": false, - "Navigation": false, - "NavigationActivation": false, - "NavigationCurrentEntryChangeEvent": false, - "NavigationDestination": false, - "NavigationHistoryEntry": false, - "NavigationPreloadManager": false, - "NavigationTransition": false, - "Navigator": false, - "NavigatorLogin": false, - "NavigatorManagedData": false, - "NavigatorUAData": false, - "NetworkInformation": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "NotRestoredReasonDetails": false, - "NotRestoredReasons": false, - "Notification": false, - "NotifyPaintEvent": false, - "OTPCredential": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "OffscreenCanvas": false, - "OffscreenCanvasRenderingContext2D": false, - "Option": false, - "OrientationSensor": false, - "OscillatorNode": false, - "OverconstrainedError": false, - "PERSISTENT": false, - "PageRevealEvent": false, - "PageSwapEvent": false, - "PageTransitionEvent": false, - "PannerNode": false, - "PasswordCredential": false, - "Path2D": false, - "PaymentAddress": false, - "PaymentManager": false, - "PaymentMethodChangeEvent": false, - "PaymentRequest": false, - "PaymentRequestUpdateEvent": false, - "PaymentResponse": false, - "Performance": false, - "PerformanceElementTiming": false, - "PerformanceEntry": false, - "PerformanceEventTiming": false, - "PerformanceLongAnimationFrameTiming": false, - "PerformanceLongTaskTiming": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceNavigationTiming": false, - "PerformanceObserver": false, - "PerformanceObserverEntryList": false, - "PerformancePaintTiming": false, - "PerformanceResourceTiming": false, - "PerformanceScriptTiming": false, - "PerformanceServerTiming": false, - "PerformanceTiming": false, - "PeriodicSyncManager": false, - "PeriodicWave": false, - "PermissionStatus": false, - "Permissions": false, - "PictureInPictureEvent": false, - "PictureInPictureWindow": false, - "Plugin": false, - "PluginArray": false, - "PointerEvent": false, - "PopStateEvent": false, - "Presentation": false, - "PresentationAvailability": false, - "PresentationConnection": false, - "PresentationConnectionAvailableEvent": false, - "PresentationConnectionCloseEvent": false, - "PresentationConnectionList": false, - "PresentationReceiver": false, - "PresentationRequest": false, - "PressureObserver": false, - "PressureRecord": false, - "ProcessingInstruction": false, - "Profiler": false, - "ProgressEvent": false, - "PromiseRejectionEvent": false, - "ProtectedAudience": false, - "PublicKeyCredential": false, - "PushManager": false, - "PushSubscription": false, - "PushSubscriptionOptions": false, - "RTCCertificate": false, - "RTCDTMFSender": false, - "RTCDTMFToneChangeEvent": false, - "RTCDataChannel": false, - "RTCDataChannelEvent": false, - "RTCDtlsTransport": false, - "RTCEncodedAudioFrame": false, - "RTCEncodedVideoFrame": false, - "RTCError": false, - "RTCErrorEvent": false, - "RTCIceCandidate": false, - "RTCIceTransport": false, - "RTCPeerConnection": false, - "RTCPeerConnectionIceErrorEvent": false, - "RTCPeerConnectionIceEvent": false, - "RTCRtpReceiver": false, - "RTCRtpScriptTransform": false, - "RTCRtpSender": false, - "RTCRtpTransceiver": false, - "RTCSctpTransport": false, - "RTCSessionDescription": false, - "RTCStatsReport": false, - "RTCTrackEvent": false, - "RadioNodeList": false, - "Range": false, - "ReadableByteStreamController": false, - "ReadableStream": false, - "ReadableStreamBYOBReader": false, - "ReadableStreamBYOBRequest": false, - "ReadableStreamDefaultController": false, - "ReadableStreamDefaultReader": false, - "RelativeOrientationSensor": false, - "RemotePlayback": false, - "ReportingObserver": false, - "Request": false, - "ResizeObserver": false, - "ResizeObserverEntry": false, - "ResizeObserverSize": false, - "Response": false, - "SVGAElement": false, - "SVGAngle": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGComponentTransferFunctionElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGElement": false, - "SVGEllipseElement": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGImageElement": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLineElement": false, - "SVGLinearGradientElement": false, - "SVGMPathElement": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPathElement": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGSVGElement": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStyleElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTSpanElement": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformList": false, - "SVGUnitTypes": false, - "SVGUseElement": false, - "SVGViewElement": false, - "Scheduler": false, - "Scheduling": false, - "Screen": false, - "ScreenDetailed": false, - "ScreenDetails": false, - "ScreenOrientation": false, - "ScriptProcessorNode": false, - "ScrollTimeline": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "Sensor": false, - "SensorErrorEvent": false, - "Serial": false, - "SerialPort": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "ShadowRoot": false, - "SharedStorage": false, - "SharedStorageWorklet": false, - "SharedWorker": false, - "SnapEvent": false, - "SourceBuffer": false, - "SourceBufferList": false, - "SpeechSynthesis": false, - "SpeechSynthesisErrorEvent": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "SpeechSynthesisVoice": false, - "StaticRange": false, - "StereoPannerNode": false, - "Storage": false, - "StorageBucket": false, - "StorageBucketManager": false, - "StorageEvent": false, - "StorageManager": false, - "StylePropertyMap": false, - "StylePropertyMapReadOnly": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubmitEvent": false, - "SubtleCrypto": false, - "SyncManager": false, - "TEMPORARY": false, - "TaskAttributionTiming": false, - "TaskController": false, - "TaskPriorityChangeEvent": false, - "TaskSignal": false, - "Text": false, - "TextDecoder": false, - "TextDecoderStream": false, - "TextEncoder": false, - "TextEncoderStream": false, - "TextEvent": false, - "TextFormat": false, - "TextFormatUpdateEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TextUpdateEvent": false, - "TimeEvent": false, - "TimeRanges": false, - "ToggleEvent": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransformStream": false, - "TransformStreamDefaultController": false, - "TransitionEvent": false, - "TreeWalker": false, - "TrustedHTML": false, - "TrustedScript": false, - "TrustedScriptURL": false, - "TrustedTypePolicy": false, - "TrustedTypePolicyFactory": false, - "UIEvent": false, - "URL": false, - "URLPattern": false, - "URLSearchParams": false, - "USB": false, - "USBAlternateInterface": false, - "USBConfiguration": false, - "USBConnectionEvent": false, - "USBDevice": false, - "USBEndpoint": false, - "USBInTransferResult": false, - "USBInterface": false, - "USBIsochronousInTransferPacket": false, - "USBIsochronousInTransferResult": false, - "USBIsochronousOutTransferPacket": false, - "USBIsochronousOutTransferResult": false, - "USBOutTransferResult": false, - "UserActivation": false, - "VTTCue": false, - "VTTRegion": false, - "ValidityState": false, - "VideoColorSpace": false, - "VideoDecoder": false, - "VideoEncoder": false, - "VideoFrame": false, - "VideoPlaybackQuality": false, - "ViewTimeline": false, - "ViewTransition": false, - "ViewTransitionTypeSet": false, - "VirtualKeyboard": false, - "VirtualKeyboardGeometryChangeEvent": false, - "VisibilityStateEntry": false, - "VisualViewport": false, - "WGSLLanguageFeatures": false, - "WakeLock": false, - "WakeLockSentinel": false, - "WaveShaperNode": false, - "WebAssembly": false, - "WebGL2RenderingContext": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLObject": false, - "WebGLProgram": false, - "WebGLQuery": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLSampler": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLSync": false, - "WebGLTexture": false, - "WebGLTransformFeedback": false, - "WebGLUniformLocation": false, - "WebGLVertexArrayObject": false, - "WebSocket": false, - "WebSocketError": false, - "WebSocketStream": false, - "WebTransport": false, - "WebTransportBidirectionalStream": false, - "WebTransportDatagramDuplexStream": false, - "WebTransportError": false, - "WebTransportReceiveStream": false, - "WebTransportSendStream": false, - "WheelEvent": false, - "Window": false, - "WindowControlsOverlay": false, - "WindowControlsOverlayGeometryChangeEvent": false, - "Worker": false, - "Worklet": false, - "WorkletGlobalScope": false, - "WritableStream": false, - "WritableStreamDefaultController": false, - "WritableStreamDefaultWriter": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathExpression": false, - "XPathResult": false, - "XRAnchor": false, - "XRAnchorSet": false, - "XRBoundedReferenceSpace": false, - "XRCPUDepthInformation": false, - "XRCamera": false, - "XRDOMOverlayState": false, - "XRDepthInformation": false, - "XRFrame": false, - "XRHitTestResult": false, - "XRHitTestSource": false, - "XRInputSource": false, - "XRInputSourceArray": false, - "XRInputSourceEvent": false, - "XRInputSourcesChangeEvent": false, - "XRLayer": false, - "XRLightEstimate": false, - "XRLightProbe": false, - "XRPose": false, - "XRRay": false, - "XRReferenceSpace": false, - "XRReferenceSpaceEvent": false, - "XRRenderState": false, - "XRRigidTransform": false, - "XRSession": false, - "XRSessionEvent": false, - "XRSpace": false, - "XRSystem": false, - "XRTransientInputHitTestResult": false, - "XRTransientInputHitTestSource": false, - "XRView": false, - "XRViewerPose": false, - "XRViewport": false, - "XRWebGLBinding": false, - "XRWebGLDepthInformation": false, - "XRWebGLLayer": false, - "XSLTProcessor": false, - "addEventListener": false, - "ai": false, - "alert": false, - "atob": false, - "blur": false, - "btoa": false, - "caches": false, - "cancelAnimationFrame": false, - "cancelIdleCallback": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "close": false, - "closed": false, - "confirm": false, - "console": false, - "cookieStore": false, - "createImageBitmap": false, - "credentialless": false, - "crossOriginIsolated": false, - "crypto": false, - "currentFrame": false, - "currentTime": false, - "customElements": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "documentPictureInPicture": false, - "event": false, - "external": false, - "fence": false, - "fetch": false, - "fetchLater": false, - "find": false, - "focus": false, - "frameElement": false, - "frames": false, - "getComputedStyle": false, - "getScreenDetails": false, - "getSelection": false, - "history": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "isSecureContext": false, - "launchQueue": false, - "length": false, - "localStorage": false, - "location": true, - "locationbar": false, - "matchMedia": false, - "menubar": false, - "model": false, - "moveBy": false, - "moveTo": false, - "name": false, - "navigation": false, - "navigator": false, - "offscreenBuffering": false, - "onabort": true, - "onafterprint": true, - "onanimationcancel": true, - "onanimationend": true, - "onanimationiteration": true, - "onanimationstart": true, - "onappinstalled": true, - "onauxclick": true, - "onbeforeinput": true, - "onbeforeinstallprompt": true, - "onbeforematch": true, - "onbeforeprint": true, - "onbeforetoggle": true, - "onbeforeunload": true, - "onbeforexrselect": true, - "onblur": true, - "oncancel": true, - "oncanplay": true, - "oncanplaythrough": true, - "onchange": true, - "onclick": true, - "onclose": true, - "oncontentvisibilityautostatechange": true, - "oncontextlost": true, - "oncontextmenu": true, - "oncontextrestored": true, - "oncopy": true, - "oncuechange": true, - "oncut": true, - "ondblclick": true, - "ondevicemotion": true, - "ondeviceorientation": true, - "ondeviceorientationabsolute": true, - "ondrag": true, - "ondragend": true, - "ondragenter": true, - "ondragleave": true, - "ondragover": true, - "ondragstart": true, - "ondrop": true, - "ondurationchange": true, - "onemptied": true, - "onended": true, - "onerror": true, - "onfocus": true, - "onformdata": true, - "ongamepadconnected": true, - "ongamepaddisconnected": true, - "ongotpointercapture": true, - "onhashchange": true, - "oninput": true, - "oninvalid": true, - "onkeydown": true, - "onkeypress": true, - "onkeyup": true, - "onlanguagechange": true, - "onload": true, - "onloadeddata": true, - "onloadedmetadata": true, - "onloadstart": true, - "onlostpointercapture": true, - "onmessage": true, - "onmessageerror": true, - "onmousedown": true, - "onmouseenter": true, - "onmouseleave": true, - "onmousemove": true, - "onmouseout": true, - "onmouseover": true, - "onmouseup": true, - "onmousewheel": true, - "onoffline": true, - "ononline": true, - "onpagehide": true, - "onpagereveal": true, - "onpageshow": true, - "onpageswap": true, - "onpaste": true, - "onpause": true, - "onplay": true, - "onplaying": true, - "onpointercancel": true, - "onpointerdown": true, - "onpointerenter": true, - "onpointerleave": true, - "onpointermove": true, - "onpointerout": true, - "onpointerover": true, - "onpointerrawupdate": true, - "onpointerup": true, - "onpopstate": true, - "onprogress": true, - "onratechange": true, - "onrejectionhandled": true, - "onreset": true, - "onresize": true, - "onscroll": true, - "onscrollend": true, - "onscrollsnapchange": true, - "onscrollsnapchanging": true, - "onsearch": true, - "onsecuritypolicyviolation": true, - "onseeked": true, - "onseeking": true, - "onselect": true, - "onselectionchange": true, - "onselectstart": true, - "onslotchange": true, - "onstalled": true, - "onstorage": true, - "onsubmit": true, - "onsuspend": true, - "ontimeupdate": true, - "ontoggle": true, - "ontransitioncancel": true, - "ontransitionend": true, - "ontransitionrun": true, - "ontransitionstart": true, - "onunhandledrejection": true, - "onunload": true, - "onvolumechange": true, - "onwaiting": true, - "onwheel": true, - "open": false, - "opener": false, - "origin": false, - "originAgentCluster": false, - "outerHeight": false, - "outerWidth": false, - "pageXOffset": false, - "pageYOffset": false, - "parent": false, - "performance": false, - "personalbar": false, - "postMessage": false, - "print": false, - "prompt": false, - "queryLocalFonts": false, - "queueMicrotask": false, - "registerProcessor": false, - "removeEventListener": false, - "reportError": false, - "requestAnimationFrame": false, - "requestIdleCallback": false, - "resizeBy": false, - "resizeTo": false, - "sampleRate": false, - "scheduler": false, - "screen": false, - "screenLeft": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "scroll": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "scrollbars": false, - "self": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "sharedStorage": false, - "showDirectoryPicker": false, - "showOpenFilePicker": false, - "showSaveFilePicker": false, - "speechSynthesis": false, - "status": false, - "statusbar": false, - "stop": false, - "structuredClone": false, - "styleMedia": false, - "toolbar": false, - "top": false, - "trustedTypes": false, - "visualViewport": false, - "window": false, - }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - "jsxPragma": null, - }, - }, - "name": "jimmy.codes/react", - "plugins": { - "jsx-a11y": { - "configs": { - "recommended": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "jsx-a11y", - ], - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-ambiguous-text": "off", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "searchbox", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "canvas": [ - "img", - ], - "tr": [ - "none", - "presentation", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "alert": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "body": [ - "onError", - "onLoad", - ], - "dialog": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "handlers": [ - "onClick", - "onError", - "onLoad", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "fieldset": [ - "radiogroup", - "presentation", - ], - "li": [ - "menuitem", - "menuitemradio", - "menuitemcheckbox", - "option", - "row", - "tab", - "treeitem", - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - "table": [ - "grid", - ], - "td": [ - "gridcell", - ], - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - }, - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "allowExpressionValues": true, - "roles": [ - "tabpanel", - ], - "tags": [], - }, - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "allowExpressionValues": true, - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - }, - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - "strict": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - "plugins": [ - "jsx-a11y", - ], - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "progressbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "body": [ - "onError", - "onLoad", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "jsx-a11y/no-noninteractive-tabindex": "error", - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": "error", - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - }, - "flatConfigs": { - "recommended": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "name": "jsx-a11y/recommended", - "plugins": { - "jsx-a11y": { - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`
\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`
\`) that have click handlers use the role attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md", - }, - "schema": [ - { - "properties": { - "handlers": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "prefer-tag-over-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforces using semantic DOM elements over the ARIA \`role\` property.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-has-required-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must have all required attributes for that role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-supports-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with explicit or implicit roles defined contain only \`aria-*\` properties supported by that \`role\`.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "scope": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`scope\` prop is only used on \`\` elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "tabindex-no-positive": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`tabIndex\` value is not greater than zero.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - }, - }, - }, - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-ambiguous-text": "off", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "searchbox", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "canvas": [ - "img", - ], - "tr": [ - "none", - "presentation", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "alert": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "body": [ - "onError", - "onLoad", - ], - "dialog": [ - "onKeyUp", - "onKeyDown", - "onKeyPress", - ], - "handlers": [ - "onClick", - "onError", - "onLoad", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "fieldset": [ - "radiogroup", - "presentation", - ], - "li": [ - "menuitem", - "menuitemradio", - "menuitemcheckbox", - "option", - "row", - "tab", - "treeitem", - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - "table": [ - "grid", - ], - "td": [ - "gridcell", - ], - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid", - ], - }, - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "allowExpressionValues": true, - "roles": [ - "tabpanel", - ], - "tags": [], - }, - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "allowExpressionValues": true, - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp", - ], - }, - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - "strict": { - "languageOptions": { - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - }, - }, - }, - "name": "jsx-a11y/strict", - "plugins": { - "jsx-a11y": { - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`
\`) that have click handlers use the role attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md", - }, - "schema": [ - { - "properties": { - "handlers": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "prefer-tag-over-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforces using semantic DOM elements over the ARIA \`role\` property.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-has-required-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must have all required attributes for that role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "role-supports-aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with explicit or implicit roles defined contain only \`aria-*\` properties supported by that \`role\`.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "scope": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`scope\` prop is only used on \`\` elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "tabindex-no-positive": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`tabIndex\` value is not greater than zero.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - }, - }, - }, - "rules": { - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/autocomplete-valid": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "off", - { - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video", - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid", - ], - "includeRoles": [ - "alert", - "dialog", - ], - }, - ], - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": [ - "error", - { - "tabbable": [ - "button", - "checkbox", - "link", - "progressbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "textbox", - ], - }, - ], - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/label-has-for": "off", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "body": [ - "onError", - "onLoad", - ], - "iframe": [ - "onError", - "onLoad", - ], - "img": [ - "onError", - "onLoad", - ], - }, - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "jsx-a11y/no-noninteractive-tabindex": "error", - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": "error", - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - }, - }, - }, - "meta": { - "name": "eslint-plugin-jsx-a11y", - "version": "6.10.2", - }, - "rules": { - "accessible-emoji": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce emojis are wrapped in \`\` and provide screen reader access.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "alt-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all elements that require alternative text have meaningful information to relay back to end user.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md", - }, - "schema": [ - { - "properties": { - "area": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "elements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "img": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "input[type="image"]": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "object": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-ambiguous-text": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` text to not exactly match "click here", "here", "link", or "a link".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md", - }, - "schema": [ - { - "properties": { - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors to contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "anchor-is-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all anchors are valid, navigable elements.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md", - }, - "schema": [ - { - "properties": { - "aspects": { - "additionalItems": false, - "items": { - "enum": [ - "noHref", - "invalidHref", - "preferButton", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "specialLink": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-activedescendant-has-tabindex": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce elements with aria-activedescendant are tabbable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-props": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce all \`aria-*\` props are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-proptypes": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce ARIA state and property values are valid.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - "validityCheck": [Function], - }, - "aria-role": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md", - }, - "schema": [ - { - "properties": { - "allowedInvalidRoles": { - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreNonDOM": { - "default": false, - "type": "boolean", - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "aria-unsupported-elements": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "autocomplete-valid": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that autocomplete attributes are used correctly.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md", - }, - "schema": [ - { - "properties": { - "inputComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "click-events-have-key-events": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce a clickable non-interactive element has at least one keyboard event listener.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "control-has-associated-label": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a control (an interactive element) has a text label.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md", - }, - "schema": [ - { - "properties": { - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "ignoreElements": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "ignoreRoles": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "heading-has-content": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce heading (\`h1\`, \`h2\`, etc) elements contain accessible content.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "html-has-lang": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` element has \`lang\` prop.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "iframe-has-title": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce iframe elements have a title attribute.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md", - }, - "schema": [ - { - "properties": {}, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "img-redundant-alt": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce \`\` alt prop does not contain the word "image", "picture", or "photo".", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md", - }, - "schema": [ - { - "properties": { - "components": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "words": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "interactive-supports-focus": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that elements with interactive handlers like \`onClick\` must be focusable.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md", - }, - "schema": [ - { - "properties": { - "tabbable": { - "additionalItems": false, - "items": { - "enum": [ - "button", - "checkbox", - "columnheader", - "combobox", - "grid", - "gridcell", - "link", - "listbox", - "menu", - "menubar", - "menuitem", - "menuitemcheckbox", - "menuitemradio", - "option", - "progressbar", - "radio", - "radiogroup", - "row", - "rowheader", - "scrollbar", - "searchbox", - "slider", - "spinbutton", - "switch", - "tab", - "tablist", - "textbox", - "tree", - "treegrid", - "treeitem", - "doc-backlink", - "doc-biblioref", - "doc-glossref", - "doc-noteref", - ], - "type": "string", - }, - "minItems": 0, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-associated-control": { - "create": [Function], - "meta": { - "docs": { - "description": "Enforce that a \`label\` tag has a text label and an associated control.", - "url": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md", - }, - "schema": [ - { - "properties": { - "assert": { - "description": "Assert that the label has htmlFor, a nested label, both or either", - "enum": [ - "htmlFor", - "nesting", - "both", - "either", - ], - "type": "string", - }, - "controlComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "depth": { - "description": "JSX tree depth limit to check for accessible label", - "minimum": 0, - "type": "integer", - }, - "labelAttributes": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - "labelComponents": { - "additionalItems": false, - "items": { - "type": "string", - }, - "type": "array", - "uniqueItems": true, - }, - }, - "required": undefined, - "type": "object", - }, - ], - }, - }, - "label-has-for": { - "create": [Function], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce that \`