From b386b545e3f11b12d0bab316c9d11f2d642e0baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Pires?= <131185695+codacy-vrhpires@users.noreply.github.com> Date: Mon, 3 Jul 2023 13:52:36 +0100 Subject: [PATCH] Fix: memory leak TS-456 (#3957) * fix/memory-leaks-TS-456 * fix/multiple-tests-TS-456 * fix/memory-leaks-TS-456 --- .eslintignore | 7 +- Dockerfile | 2 +- docs/description/description.json | 310 +++++++- .../import_consistent-type-specifier-style.md | 91 +++ .../import_dynamic-import-chunkname.md | 87 +++ docs/description/import_export.md | 36 + docs/description/import_exports-last.md | 52 ++ docs/description/import_extensions.md | 174 +++++ docs/description/import_first.md | 74 ++ docs/description/import_group-exports.md | 119 +++ docs/description/import_imports-first.md | 9 + docs/description/import_max-dependencies.md | 68 ++ .../import_newline-after-import.md | 118 +++ docs/description/import_no-absolute-path.md | 54 ++ docs/description/import_no-amd.md | 37 + .../import_no-anonymous-default-export.md | 81 ++ docs/description/import_no-commonjs.md | 97 +++ docs/description/import_no-default-export.md | 65 ++ docs/description/import_no-duplicates.md | 102 +++ docs/description/import_no-dynamic-require.md | 25 + .../import_no-empty-named-blocks.md | 43 ++ .../import_no-extraneous-dependencies.md | 141 ++++ .../import_no-import-module-exports.md | 78 ++ .../description/import_no-internal-modules.md | 134 ++++ docs/description/import_no-mutable-exports.md | 54 ++ docs/description/import_no-named-default.md | 33 + docs/description/import_no-named-export.md | 79 ++ docs/description/import_no-namespace.md | 45 ++ docs/description/import_no-nodejs-modules.md | 42 ++ .../import_no-relative-packages.md | 71 ++ .../import_no-relative-parent-imports.md | 122 +++ .../description/import_no-restricted-paths.md | 198 +++++ docs/description/import_no-self-import.md | 32 + .../import_no-unassigned-import.md | 61 ++ docs/description/import_no-unresolved.md | 110 +++ .../import_no-useless-path-segments.md | 84 +++ .../import_no-webpack-loader-syntax.md | 38 + docs/description/import_order.md | 361 +++++++++ .../import_prefer-default-export.md | 186 +++++ docs/description/import_unambiguous.md | 56 ++ docs/description/jsdoc_match-description.md | 2 - docs/description/max-len.md | 2 +- docs/description/no-extra-parens.md | 21 + .../description/vue_no-use-v-if-with-v-for.md | 8 +- .../all-patterns-typescript/patterns.xml | 38 +- .../all-patterns-typescript/results.xml | 1 + docs/multiple-tests/all-patterns/patterns.xml | 38 +- docs/multiple-tests/all-patterns/results.xml | 1 + .../blacklist-patterns/results.xml | 3 + .../react-without-config/results.xml | 13 +- docs/patterns.json | 312 +++++++- package-lock.json | 693 ++++++++---------- package.json | 50 +- src/blacklist.ts | 11 +- src/docGeneratorMain.ts | 2 +- src/eslintDefaultOptions.ts | 4 + 56 files changed, 4305 insertions(+), 470 deletions(-) create mode 100644 docs/description/import_consistent-type-specifier-style.md create mode 100644 docs/description/import_dynamic-import-chunkname.md create mode 100644 docs/description/import_export.md create mode 100644 docs/description/import_exports-last.md create mode 100644 docs/description/import_extensions.md create mode 100644 docs/description/import_first.md create mode 100644 docs/description/import_group-exports.md create mode 100644 docs/description/import_imports-first.md create mode 100644 docs/description/import_max-dependencies.md create mode 100644 docs/description/import_newline-after-import.md create mode 100644 docs/description/import_no-absolute-path.md create mode 100644 docs/description/import_no-amd.md create mode 100644 docs/description/import_no-anonymous-default-export.md create mode 100644 docs/description/import_no-commonjs.md create mode 100644 docs/description/import_no-default-export.md create mode 100644 docs/description/import_no-duplicates.md create mode 100644 docs/description/import_no-dynamic-require.md create mode 100644 docs/description/import_no-empty-named-blocks.md create mode 100644 docs/description/import_no-extraneous-dependencies.md create mode 100644 docs/description/import_no-import-module-exports.md create mode 100644 docs/description/import_no-internal-modules.md create mode 100644 docs/description/import_no-mutable-exports.md create mode 100644 docs/description/import_no-named-default.md create mode 100644 docs/description/import_no-named-export.md create mode 100644 docs/description/import_no-namespace.md create mode 100644 docs/description/import_no-nodejs-modules.md create mode 100644 docs/description/import_no-relative-packages.md create mode 100644 docs/description/import_no-relative-parent-imports.md create mode 100644 docs/description/import_no-restricted-paths.md create mode 100644 docs/description/import_no-self-import.md create mode 100644 docs/description/import_no-unassigned-import.md create mode 100644 docs/description/import_no-unresolved.md create mode 100644 docs/description/import_no-useless-path-segments.md create mode 100644 docs/description/import_no-webpack-loader-syntax.md create mode 100644 docs/description/import_order.md create mode 100644 docs/description/import_prefer-default-export.md create mode 100644 docs/description/import_unambiguous.md diff --git a/.eslintignore b/.eslintignore index 9f6e14122..f803eb7a2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,5 @@ -docs/tests -dist +node_modules/* +dist/* +build/* +bin/* +docs/tests/* diff --git a/Dockerfile b/Dockerfile index 5197026b6..192f5dcf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_IMAGE_VERSION=18-alpine3.17 +ARG NODE_IMAGE_VERSION=lts-alpine3.18 FROM node:$NODE_IMAGE_VERSION as builder diff --git a/docs/description/description.json b/docs/description/description.json index 824bbe05e..c3b98de57 100644 --- a/docs/description/description.json +++ b/docs/description/description.json @@ -3745,34 +3745,6 @@ "description": "Require or disallow spacing between function identifiers and their invocations", "timeToFix": 5 }, - { - "parameters": [ - { - "name": "unnamedParam", - "description": "unnamedParam" - }, - { - "name": "SwitchCase", - "description": "SwitchCase" - }, - { - "name": "flatTernaryExpressions", - "description": "flatTernaryExpressions" - }, - { - "name": "offsetTernaryExpressions", - "description": "offsetTernaryExpressions" - }, - { - "name": "ignoreComments", - "description": "ignoreComments" - } - ], - "patternId": "@typescript-eslint_indent", - "title": "@typescript eslint: Indent", - "description": "Enforce consistent indentation", - "timeToFix": 5 - }, { "parameters": [], "patternId": "@typescript-eslint_init-declarations", @@ -8228,6 +8200,288 @@ "description": "Disallow literal string", "timeToFix": 5 }, + { + "parameters": [ + { + "name": "caseSensitive", + "description": "caseSensitive" + }, + { + "name": "caseSensitiveStrict", + "description": "caseSensitiveStrict" + } + ], + "patternId": "import_no-unresolved", + "title": "Import: No unresolved", + "description": "Ensure imports point to a file/module that can be resolved.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-namespace", + "title": "Import: No namespace", + "description": "Forbid namespace (a.k.a. \"wildcard\" `*`) imports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_export", + "title": "Import: Export", + "description": "Forbid any invalid exports, i.e. re-export of the same name.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-mutable-exports", + "title": "Import: No mutable exports", + "description": "Forbid the use of mutable exports with `var` or `let`.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_extensions", + "title": "Import: Extensions", + "description": "Ensure consistent use of file extension within the import path.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-restricted-paths", + "title": "Import: No restricted paths", + "description": "Enforce which files can be imported in a given folder.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-internal-modules", + "title": "Import: No internal modules", + "description": "Forbid importing the submodules of other modules.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_group-exports", + "title": "Import: Group exports", + "description": "Prefer named exports to be grouped together in a single export declaration", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-relative-packages", + "title": "Import: No relative packages", + "description": "Forbid importing packages through relative paths.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-relative-parent-imports", + "title": "Import: No relative parent imports", + "description": "Forbid importing modules from parent directories.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_consistent-type-specifier-style", + "title": "Import: Consistent type specifier style", + "description": "Enforce or ban the use of inline type-only markers for named imports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-self-import", + "title": "Import: No self import", + "description": "Forbid a module from importing itself.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-named-default", + "title": "Import: No named default", + "description": "Forbid named default exports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-anonymous-default-export", + "title": "Import: No anonymous default export", + "description": "Forbid anonymous values as default exports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-commonjs", + "title": "Import: No commonjs", + "description": "Forbid CommonJS `require` calls and `module.exports` or `exports.*`.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-amd", + "title": "Import: No amd", + "description": "Forbid AMD `require` and `define` calls.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-duplicates", + "title": "Import: No duplicates", + "description": "Forbid repeated import of the same module in multiple places.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_first", + "title": "Import: First", + "description": "Ensure all imports appear before other statements.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_max-dependencies", + "title": "Import: Max dependencies", + "description": "Enforce the maximum number of dependencies a module can have.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-extraneous-dependencies", + "title": "Import: No extraneous dependencies", + "description": "Forbid the use of extraneous packages.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-absolute-path", + "title": "Import: No absolute path", + "description": "Forbid import of modules using absolute paths.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-nodejs-modules", + "title": "Import: No nodejs modules", + "description": "Forbid Node.js builtin modules.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-webpack-loader-syntax", + "title": "Import: No webpack loader syntax", + "description": "Forbid webpack loader syntax in imports.", + "timeToFix": 5 + }, + { + "parameters": [ + { + "name": "distinctGroup", + "description": "distinctGroup" + }, + { + "name": "warnOnUnassignedImports", + "description": "warnOnUnassignedImports" + } + ], + "patternId": "import_order", + "title": "Import: Order", + "description": "Enforce a convention in module import order.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_newline-after-import", + "title": "Import: Newline after import", + "description": "Enforce a newline after import statements.", + "timeToFix": 5 + }, + { + "parameters": [ + { + "name": "target", + "description": "target" + } + ], + "patternId": "import_prefer-default-export", + "title": "Import: Prefer default export", + "description": "Prefer a default export if module exports a single name or multiple names.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-default-export", + "title": "Import: No default export", + "description": "Forbid default exports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-named-export", + "title": "Import: No named export", + "description": "Forbid named exports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-dynamic-require", + "title": "Import: No dynamic require", + "description": "Forbid `require()` calls with expressions.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_unambiguous", + "title": "Import: Unambiguous", + "description": "Forbid potentially ambiguous parse goal (`script` vs. `module`).", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-unassigned-import", + "title": "Import: No unassigned import", + "description": "Forbid unassigned imports", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-useless-path-segments", + "title": "Import: No useless path segments", + "description": "Forbid unnecessary path segments in import and require statements.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_dynamic-import-chunkname", + "title": "Import: Dynamic import chunkname", + "description": "Enforce a leading comment with the webpackChunkName for dynamic imports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-import-module-exports", + "title": "Import: No import module exports", + "description": "Forbid import statements with CommonJS module.exports.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_no-empty-named-blocks", + "title": "Import: No empty named blocks", + "description": "Forbid empty named import blocks.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_exports-last", + "title": "Import: Exports last", + "description": "Ensure all exports appear after other statements.", + "timeToFix": 5 + }, + { + "parameters": [], + "patternId": "import_imports-first", + "title": "Import: Imports first", + "description": "Replaced by `import/first`.", + "timeToFix": 5 + }, { "parameters": [], "patternId": "import-alias_import-alias", diff --git a/docs/description/import_consistent-type-specifier-style.md b/docs/description/import_consistent-type-specifier-style.md new file mode 100644 index 000000000..54c09049e --- /dev/null +++ b/docs/description/import_consistent-type-specifier-style.md @@ -0,0 +1,91 @@ +# import/consistent-type-specifier-style + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +In both Flow and TypeScript you can mark an import as a type-only import by adding a "kind" marker to the import. Both languages support two positions for marker. + +**At the top-level** which marks all names in the import as type-only and applies to named, default, and namespace (for TypeScript) specifiers: + +```ts +import type Foo from 'Foo'; +import type {Bar} from 'Bar'; +// ts only +import type * as Bam from 'Bam'; +// flow only +import typeof Baz from 'Baz'; +``` + +**Inline** with to the named import, which marks just the specific name in the import as type-only. An inline specifier is only valid for named specifiers, and not for default or namespace specifiers: + +```ts +import {type Foo} from 'Foo'; +// flow only +import {typeof Bar} from 'Bar'; +``` + +## Rule Details + +This rule either enforces or bans the use of inline type-only markers for named imports. + +This rule includes a fixer that will automatically convert your specifiers to the correct form - however the fixer will not respect your preferences around de-duplicating imports. If this is important to you, consider using the [`import/no-duplicates`] rule. + +[`import/no-duplicates`]: ./no-duplicates.md + +## Options + +The rule accepts a single string option which may be one of: + +- `'prefer-inline'` - enforces that named type-only specifiers are only ever written with an inline marker; and never as part of a top-level, type-only import. +- `'prefer-top-level'` - enforces that named type-only specifiers only ever written as part of a top-level, type-only import; and never with an inline marker. + +By default the rule will use the `prefer-inline` option. + +## Examples + +### `prefer-top-level` + +❌ Invalid with `["error", "prefer-top-level"]` + +```ts +import {type Foo} from 'Foo'; +import Foo, {type Bar} from 'Foo'; +// flow only +import {typeof Foo} from 'Foo'; +``` + +βœ… Valid with `["error", "prefer-top-level"]` + +```ts +import type {Foo} from 'Foo'; +import type Foo, {Bar} from 'Foo'; +// flow only +import typeof {Foo} from 'Foo'; +``` + +### `prefer-inline` + +❌ Invalid with `["error", "prefer-inline"]` + +```ts +import type {Foo} from 'Foo'; +import type Foo, {Bar} from 'Foo'; +// flow only +import typeof {Foo} from 'Foo'; +``` + +βœ… Valid with `["error", "prefer-inline"]` + +```ts +import {type Foo} from 'Foo'; +import Foo, {type Bar} from 'Foo'; +// flow only +import {typeof Foo} from 'Foo'; +``` + +## When Not To Use It + +If you aren't using Flow or TypeScript 4.5+, then this rule does not apply and need not be used. + +If you don't care about, and don't want to standardize how named specifiers are imported then you should not use this rule. diff --git a/docs/description/import_dynamic-import-chunkname.md b/docs/description/import_dynamic-import-chunkname.md new file mode 100644 index 000000000..472a36648 --- /dev/null +++ b/docs/description/import_dynamic-import-chunkname.md @@ -0,0 +1,87 @@ +# import/dynamic-import-chunkname + + + +This rule reports any dynamic imports without a webpackChunkName specified in a leading block comment in the proper format. + +This rule enforces naming of webpack chunks in dynamic imports. When you don't explicitly name chunks, webpack will autogenerate chunk names that are not consistent across builds, which prevents long-term browser caching. + +## Rule Details +This rule runs against `import()` by default, but can be configured to also run against an alternative dynamic-import function, e.g. 'dynamicImport.' +You can also configure the regex format you'd like to accept for the webpackChunkName - for example, if we don't want the number 6 to show up in our chunk names: + ```javascript +{ + "dynamic-import-chunkname": [2, { + importFunctions: ["dynamicImport"], + webpackChunknameFormat: "[a-zA-Z0-57-9-/_]+" + }] +} +``` + +### invalid +The following patterns are invalid: + +```javascript +// no leading comment +import('someModule'); + +// incorrectly formatted comment +import( + /*webpackChunkName:"someModule"*/ + 'someModule', +); +import( + /* webpackChunkName : "someModule" */ + 'someModule', +); + +// chunkname contains a 6 (forbidden by rule config) +import( + /* webpackChunkName: "someModule6" */ + 'someModule', +); + +// invalid syntax for webpack comment +import( + /* totally not webpackChunkName: "someModule" */ + 'someModule', +); + +// single-line comment, not a block-style comment +import( + // webpackChunkName: "someModule" + 'someModule', +); +``` +### valid +The following patterns are valid: + +```javascript + import( + /* webpackChunkName: "someModule" */ + 'someModule', + ); + import( + /* webpackChunkName: "someOtherModule12345789" */ + 'someModule', + ); + import( + /* webpackChunkName: "someModule" */ + /* webpackPrefetch: true */ + 'someModule', + ); + import( + /* webpackChunkName: "someModule", webpackPrefetch: true */ + 'someModule', + ); + + // using single quotes instead of double quotes + import( + /* webpackChunkName: 'someModule' */ + 'someModule', + ); +``` + +## When Not To Use It + +If you don't care that webpack will autogenerate chunk names and may blow up browser caches and bundle size reports. diff --git a/docs/description/import_export.md b/docs/description/import_export.md new file mode 100644 index 000000000..115d2d8b2 --- /dev/null +++ b/docs/description/import_export.md @@ -0,0 +1,36 @@ +# import/export + +πŸ’Ό This rule is enabled in the following configs: ❗ `errors`, β˜‘οΈ `recommended`. + + + +Reports funny business with exports, like repeated exports of names or defaults. + +## Rule Details + +```js +export default class MyClass { /*...*/ } // Multiple default exports. + +function makeClass() { return new MyClass(...arguments) } + +export default makeClass // Multiple default exports. +``` + +or +```js +export const foo = function () { /*...*/ } // Multiple exports of name 'foo'. + +function bar() { /*...*/ } +export { bar as foo } // Multiple exports of name 'foo'. +``` + +In the case of named/default re-export, all `n` re-exports will be reported, +as at least `n-1` of them are clearly mistakes, but it is not clear which one +(if any) is intended. Could be the result of copy/paste, code duplication with +intent to rename, etc. + +## Further Reading + +- Lee Byron's [ES7] export proposal + +[ES7]: https://github.com/leebyron/ecmascript-more-export-from diff --git a/docs/description/import_exports-last.md b/docs/description/import_exports-last.md new file mode 100644 index 000000000..6b3e4bac4 --- /dev/null +++ b/docs/description/import_exports-last.md @@ -0,0 +1,52 @@ +# import/exports-last + + + +This rule enforces that all exports are declared at the bottom of the file. This rule will report any export declarations that comes before any non-export statements. + + +## This will be reported + +```JS + +const bool = true + +export default bool + +const str = 'foo' + +``` + +```JS + +export const bool = true + +const str = 'foo' + +``` + +## This will not be reported + +```JS +const arr = ['bar'] + +export const bool = true + +export default bool + +export function func() { + console.log('Hello World 🌍') +} + +export const str = 'foo' +``` + +## When Not To Use It + +If you don't mind exports being sprinkled throughout a file, you may not want to enable this rule. + +#### ES6 exports only + +The exports-last rule is currently only working on ES6 exports. You may not want to enable this rule if you're using CommonJS exports. + +If you need CommonJS support feel free to open an issue or create a PR. diff --git a/docs/description/import_extensions.md b/docs/description/import_extensions.md new file mode 100644 index 000000000..df4f34128 --- /dev/null +++ b/docs/description/import_extensions.md @@ -0,0 +1,174 @@ +# import/extensions + + + +Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver (which does not yet support ESM/`import`) can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default in CJS. Depending on the resolver you can configure more extensions to get resolved automatically. + +In order to provide a consistent use of file extensions across your code base, this rule can enforce or disallow the use of certain file extensions. + +## Rule Details + +This rule either takes one string option, one object option, or a string and an object option. If it is the string `"never"` (the default value), then the rule forbids the use for any extension. If it is the string `"always"`, then the rule enforces the use of extensions for all import statements. If it is the string `"ignorePackages"`, then the rule enforces the use of extensions for all import statements except package imports. + +``` +"import/extensions": [, "never" | "always" | "ignorePackages"] +``` + +By providing an object you can configure each extension separately. + +``` +"import/extensions": [, { + : "never" | "always" | "ignorePackages" +}] +``` + + For example `{ "js": "always", "json": "never"Β }` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension. + +By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions. + +``` +"import/extensions": [ + , + "never" | "always" | "ignorePackages", + { + : "never" | "always" | "ignorePackages" + } +] +``` + +For example, `["error", "never", { "svg": "always" }]` would require that all extensions are omitted, except for "svg". + +`ignorePackages` can be set as a separate boolean option like this: + +``` +"import/extensions": [ + , + "never" | "always" | "ignorePackages", + { + ignorePackages: true | false, + pattern: { + : "never" | "always" | "ignorePackages" + } + } +] +``` + +In that case, if you still want to specify extensions, you can do so inside the **pattern** property. +Default value of `ignorePackages` is `false`. + +### Exception + +When disallowing the use of certain extensions this rule makes an exception and allows the use of extension when the file would not be resolvable without extension. + +For example, given the following folder structure: + +``` +β”œβ”€β”€ foo +β”‚Β Β  β”œβ”€β”€ bar.js +β”‚Β Β  β”œβ”€β”€ bar.json +``` + +and this import statement: + +```js +import bar from './foo/bar.json'; +``` + +then the extension can’t be omitted because it would then resolve to `./foo/bar.js`. + +### Examples + +The following patterns are considered problems when configuration set to "never": + +```js +import foo from './foo.js'; + +import bar from './bar.json'; + +import Component from './Component.jsx'; + +import express from 'express/index.js'; +``` + +The following patterns are not considered problems when configuration set to "never": + +```js +import foo from './foo'; + +import bar from './bar'; + +import Component from './Component'; + +import express from 'express/index'; + +import * as path from 'path'; +``` + +The following patterns are considered problems when configuration set to "always": + +```js +import foo from './foo'; + +import bar from './bar'; + +import Component from './Component'; + +import foo from '@/foo'; +``` + +The following patterns are not considered problems when configuration set to "always": + +```js +import foo from './foo.js'; + +import bar from './bar.json'; + +import Component from './Component.jsx'; + +import * as path from 'path'; + +import foo from '@/foo.js'; +``` + +The following patterns are considered problems when configuration set to "ignorePackages": + +```js +import foo from './foo'; + +import bar from './bar'; + +import Component from './Component'; + +``` + +The following patterns are not considered problems when configuration set to "ignorePackages": + +```js +import foo from './foo.js'; + +import bar from './bar.json'; + +import Component from './Component.jsx'; + +import express from 'express'; + +import foo from '@/foo' +``` + +The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`: + +```js +import Component from './Component.jsx'; + +import baz from 'foo/baz.js'; + +import express from 'express'; + +import foo from '@/foo'; +``` + +## When Not To Use It + +If you are not concerned about a consistent usage of file extension. + +In the future, when this rule supports native node ESM resolution, and the plugin is configured to use native rather than transpiled ESM (a config option that is not yet available) - setting this to `always` will have no effect. diff --git a/docs/description/import_first.md b/docs/description/import_first.md new file mode 100644 index 000000000..21904e2fa --- /dev/null +++ b/docs/description/import_first.md @@ -0,0 +1,74 @@ +# import/first + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +This rule reports any imports that come after non-import +statements. + +## Rule Details + +```js +import foo from './foo' + +// some module-level initializer +initWith(foo) + +import bar from './bar' // <- reported +``` + +Providing `absolute-first` as an option will report any absolute imports (i.e. +packages) that come after any relative imports: + +```js +import foo from 'foo' +import bar from './bar' + +import * as _ from 'lodash' // <- reported +``` + +If you really want import type ordering, check out [`import/order`]. + +Notably, `import`s are hoisted, which means the imported modules will be evaluated +before any of the statements interspersed between them. Keeping all `import`s together +at the top of the file may prevent surprises resulting from this part of the spec. + +### On directives + +Directives are allowed as long as they occur strictly before any `import` declarations, +as follows: + +```js +'use super-mega-strict' + +import { suchFoo } from 'lame-fake-module-name' // no report here +``` + +A directive in this case is assumed to be a single statement that contains only +a literal string-valued expression. + +`'use strict'` would be a good example, except that [modules are always in strict +mode](https://262.ecma-international.org/6.0/#sec-strict-mode-code) so it would be surprising to see a `'use strict'` sharing a file with `import`s and +`export`s. + +Given that, see [#255] for the reasoning. + +### With Fixer + +This rule contains a fixer to reorder in-body import to top, the following criteria applied: +1. Never re-order relative to each other, even if `absolute-first` is set. +2. If an import creates an identifier, and that identifier is referenced at module level *before* the import itself, that won't be re-ordered. + +## When Not To Use It + +If you don't mind imports being sprinkled throughout, you may not want to +enable this rule. + +## Further Reading + +- [`import/order`]: a major step up from `absolute-first` +- Issue [#255] + +[`import/order`]: ./order.md +[#255]: https://github.com/import-js/eslint-plugin-import/issues/255 diff --git a/docs/description/import_group-exports.md b/docs/description/import_group-exports.md new file mode 100644 index 000000000..67e76de2f --- /dev/null +++ b/docs/description/import_group-exports.md @@ -0,0 +1,119 @@ +# import/group-exports + + + +Reports when named exports are not grouped together in a single `export` declaration or when multiple assignments to CommonJS `module.exports` or `exports` object are present in a single file. + +**Rationale:** An `export` declaration or `module.exports` assignment can appear anywhere in the code. By requiring a single export declaration all your exports will remain at one place, making it easier to see what exports a module provides. + +## Rule Details + +This rule warns whenever a single file contains multiple named export declarations or multiple assignments to `module.exports` (or `exports`). + +### Valid + +```js +// A single named export declaration -> ok +export const valid = true +``` + +```js +const first = true +const second = true + +// A single named export declaration -> ok +export { + first, + second, +} +``` + +```js +// Aggregating exports -> ok +export { default as module1 } from 'module-1' +export { default as module2 } from 'module-2' +``` + +```js +// A single exports assignment -> ok +module.exports = { + first: true, + second: true +} +``` + +```js +const first = true +const second = true + +// A single exports assignment -> ok +module.exports = { + first, + second, +} +``` + +```js +function test() {} +test.property = true +test.another = true + +// A single exports assignment -> ok +module.exports = test +``` + +```ts +const first = true; +type firstType = boolean + +// A single named export declaration (type exports handled separately) -> ok +export {first} +export type {firstType} +``` + + +### Invalid + +```js +// Multiple named export statements -> not ok! +export const first = true +export const second = true +``` + +```js +// Aggregating exports from the same module -> not ok! +export { module1 } from 'module-1' +export { module2 } from 'module-1' +``` + +```js +// Multiple exports assignments -> not ok! +exports.first = true +exports.second = true +``` + +```js +// Multiple exports assignments -> not ok! +module.exports = {} +module.exports.first = true +``` + +```js +// Multiple exports assignments -> not ok! +module.exports = () => {} +module.exports.first = true +module.exports.second = true +``` + +```ts +type firstType = boolean +type secondType = any + +// Multiple named type export statements -> not ok! +export type {firstType} +export type {secondType} +``` + +## When Not To Use It + +If you do not mind having your exports spread across the file, you can safely turn this rule off. diff --git a/docs/description/import_imports-first.md b/docs/description/import_imports-first.md new file mode 100644 index 000000000..278e4c472 --- /dev/null +++ b/docs/description/import_imports-first.md @@ -0,0 +1,9 @@ +# import/imports-first + +❌ This rule is deprecated. + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/first.md). diff --git a/docs/description/import_max-dependencies.md b/docs/description/import_max-dependencies.md new file mode 100644 index 000000000..1da74f681 --- /dev/null +++ b/docs/description/import_max-dependencies.md @@ -0,0 +1,68 @@ +# import/max-dependencies + + + +Forbid modules to have too many dependencies (`import` or `require` statements). + +This is a useful rule because a module with too many dependencies is a code smell, and usually indicates the module is doing too much and/or should be broken up into smaller modules. + +Importing multiple named exports from a single module will only count once (e.g. `import {x, y, z} from './foo'` will only count as a single dependency). + +## Options + +This rule has the following options, with these defaults: + +```js +"import/max-dependencies": ["error", { + "max": 10, + "ignoreTypeImports": false, +}] +``` + +### `max` + +This option sets the maximum number of dependencies allowed. Anything over will trigger the rule. **Default is 10** if the rule is enabled and no `max` is specified. + +Given a max value of `{"max": 2}`: + +### Fail + +```js +import a from './a'; // 1 +const b = require('./b'); // 2 +import c from './c'; // 3 - exceeds max! +``` + +### Pass + +```js +import a from './a'; // 1 +const anotherA = require('./a'); // still 1 +import {x, y, z} from './foo'; // 2 +``` + +### `ignoreTypeImports` + +Ignores `type` imports. Type imports are a feature released in TypeScript 3.8, you can [read more here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). Defaults to `false`. + +Given `{"max": 2, "ignoreTypeImports": true}`: + +### Fail + +```ts +import a from './a'; +import b from './b'; +import c from './c'; +``` + +### Pass + +```ts +import a from './a'; +import b from './b'; +import type c from './c'; // Doesn't count against max +``` + +## When Not To Use It + +If you don't care how many dependencies a module has. diff --git a/docs/description/import_newline-after-import.md b/docs/description/import_newline-after-import.md new file mode 100644 index 000000000..ed0a5b678 --- /dev/null +++ b/docs/description/import_newline-after-import.md @@ -0,0 +1,118 @@ +# import/newline-after-import + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Enforces having one or more empty lines after the last top-level import statement or require call. ++(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. + +## Rule Details + +This rule supports the following options: +- `count` which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to `1`. + +- `considerComments` which enforces the rule on comments after the last import-statement as well when set to true. This option defaults to `false`. + +Valid: + +```js +import defaultExport from './foo' + +const FOO = 'BAR' +``` + +```js +import defaultExport from './foo' +import { bar } from 'bar-lib' + +const FOO = 'BAR' +``` + +```js +const FOO = require('./foo') +const BAR = require('./bar') + +const BAZ = 1 +``` + +Invalid: + +```js +import * as foo from 'foo' +const FOO = 'BAR' +``` + +```js +import * as foo from 'foo' +const FOO = 'BAR' + +import { bar } from 'bar-lib' +``` + +```js +const FOO = require('./foo') +const BAZ = 1 +const BAR = require('./bar') +``` + +With `count` set to `2` this will be considered valid: + +```js +import defaultExport from './foo' + + +const FOO = 'BAR' +``` + +With `count` set to `2` these will be considered invalid: + +```js +import defaultExport from './foo' +const FOO = 'BAR' +``` + +```js +import defaultExport from './foo' + +const FOO = 'BAR' +``` + +With `considerComments` set to `false` this will be considered valid: + +```js +import defaultExport from './foo' +// some comment here. +const FOO = 'BAR' +``` + +With `considerComments` set to `true` this will be considered valid: + +```js +import defaultExport from './foo' + +// some comment here. +const FOO = 'BAR' +``` + +With `considerComments` set to `true` this will be considered invalid: + +```js +import defaultExport from './foo' +// some comment here. +const FOO = 'BAR' +``` + +## Example options usage +```json +{ + "rules": { + "import/newline-after-import": ["error", { "count": 2 }] + } +} +``` + + +## When Not To Use It + +If you like to visually group module imports with its usage, you don't want to use this rule. diff --git a/docs/description/import_no-absolute-path.md b/docs/description/import_no-absolute-path.md new file mode 100644 index 000000000..a796f9d57 --- /dev/null +++ b/docs/description/import_no-absolute-path.md @@ -0,0 +1,54 @@ +# import/no-absolute-path + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Node.js allows the import of modules using an absolute path such as `/home/xyz/file.js`. That is a bad practice as it ties the code using it to your computer, and therefore makes it unusable in packages distributed on `npm` for instance. + +This rule forbids the import of modules using absolute paths. + +## Rule Details + +### Fail + +```js +import f from '/foo'; +import f from '/some/path'; + +var f = require('/foo'); +var f = require('/some/path'); +``` + +### Pass + +```js +import _ from 'lodash'; +import foo from 'foo'; +import foo from './foo'; + +var _ = require('lodash'); +var foo = require('foo'); +var foo = require('./foo'); +``` + +### Options + +By default, only ES6 imports and CommonJS `require` calls will have this rule enforced. + +You may provide an options object providing true/false for any of + +- `esmodule`: defaults to `true` +- `commonjs`: defaults to `true` +- `amd`: defaults to `false` + +If `{ amd: true }` is provided, dependency paths for AMD-style `define` and `require` +calls will be resolved: + +```js +/*eslint import/no-absolute-path: [2, { commonjs: false, amd: true }]*/ +define(['/foo'], function (foo) { /*...*/ }) // reported +require(['/foo'], function (foo) { /*...*/ }) // reported + +const foo = require('/foo') // ignored because of explicit `commonjs: false` +``` diff --git a/docs/description/import_no-amd.md b/docs/description/import_no-amd.md new file mode 100644 index 000000000..155c19b3c --- /dev/null +++ b/docs/description/import_no-amd.md @@ -0,0 +1,37 @@ +# import/no-amd + + + +Reports `require([array], ...)` and `define([array], ...)` function calls at the +module scope. Will not report if !=2 arguments, or first argument is not a literal array. + +Intended for temporary use when migrating to pure ES6 modules. + +## Rule Details + +This will be reported: + +```js +define(["a", "b"], function (a, b) { /* ... */ }) + +require(["b", "c"], function (b, c) { /* ... */ }) +``` + +CommonJS `require` is still valid. + +## When Not To Use It + +If you don't mind mixing module systems (sometimes this is useful), you probably +don't want this rule. + +It is also fairly noisy if you have a larger codebase that is being transitioned +from AMD to ES6 modules. + +## Contributors + +Special thanks to @xjamundx for donating his no-define rule as a start to this. + +## Further Reading + +- [`no-commonjs`](./no-commonjs.md): report CommonJS `require` and `exports` +- Source: https://github.com/xjamundx/eslint-plugin-modules diff --git a/docs/description/import_no-anonymous-default-export.md b/docs/description/import_no-anonymous-default-export.md new file mode 100644 index 000000000..d3c88f94e --- /dev/null +++ b/docs/description/import_no-anonymous-default-export.md @@ -0,0 +1,81 @@ +# import/no-anonymous-default-export + + + +Reports if a module's default export is unnamed. This includes several types of unnamed data types; literals, object expressions, arrays, anonymous functions, arrow functions, and anonymous class declarations. + +Ensuring that default exports are named helps improve the grepability of the codebase by encouraging the re-use of the same identifier for the module's default export at its declaration site and at its import sites. + +## Options + +By default, all types of anonymous default exports are forbidden, but any types can be selectively allowed by toggling them on in the options. + +The complete default configuration looks like this. + +```js +"import/no-anonymous-default-export": ["error", { + "allowArray": false, + "allowArrowFunction": false, + "allowAnonymousClass": false, + "allowAnonymousFunction": false, + "allowCallExpression": true, // The true value here is for backward compatibility + "allowNew": false, + "allowLiteral": false, + "allowObject": false +}] +``` + +## Rule Details + +### Fail +```js +export default [] + +export default () => {} + +export default class {} + +export default function () {} + +/* eslint import/no-anonymous-default-export: [2, {"allowCallExpression": false}] */ +export default foo(bar) + +export default 123 + +export default {} + +export default new Foo() +``` + +### Pass +```js +const foo = 123 +export default foo + +export default class MyClass() {} + +export default function foo() {} + +/* eslint import/no-anonymous-default-export: [2, {"allowArray": true}] */ +export default [] + +/* eslint import/no-anonymous-default-export: [2, {"allowArrowFunction": true}] */ +export default () => {} + +/* eslint import/no-anonymous-default-export: [2, {"allowAnonymousClass": true}] */ +export default class {} + +/* eslint import/no-anonymous-default-export: [2, {"allowAnonymousFunction": true}] */ +export default function () {} + +export default foo(bar) + +/* eslint import/no-anonymous-default-export: [2, {"allowLiteral": true}] */ +export default 123 + +/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */ +export default {} + +/* eslint import/no-anonymous-default-export: [2, {"allowNew": true}] */ +export default new Foo() +``` diff --git a/docs/description/import_no-commonjs.md b/docs/description/import_no-commonjs.md new file mode 100644 index 000000000..09a6b4401 --- /dev/null +++ b/docs/description/import_no-commonjs.md @@ -0,0 +1,97 @@ +# import/no-commonjs + + + +Reports `require([string])` function calls. Will not report if >1 argument, +or single argument is not a literal string. + +Reports `module.exports` or `exports.*`, also. + +Intended for temporary use when migrating to pure ES6 modules. + +## Rule Details + +This will be reported: + +```js +var mod = require('./mod') + , common = require('./common') + , fs = require('fs') + , whateverModule = require('./not-found') + +module.exports = { a: "b" } +exports.c = "d" +``` + +### Allow require + +If `allowRequire` option is set to `true`, `require` calls are valid: + +```js +/*eslint no-commonjs: [2, { allowRequire: true }]*/ +var mod = require('./mod'); +``` + +but `module.exports` is reported as usual. + +### Allow conditional require + +By default, conditional requires are allowed: + +```js +var a = b && require("c") + +if (typeof window !== "undefined") { + require('that-ugly-thing'); +} + +var fs = null; +try { + fs = require("fs") +} catch (error) {} +``` + +If the `allowConditionalRequire` option is set to `false`, they will be reported. + +If you don't rely on synchronous module loading, check out [dynamic import](https://github.com/airbnb/babel-plugin-dynamic-import-node). + +### Allow primitive modules + +If `allowPrimitiveModules` option is set to `true`, the following is valid: + +```js +/*eslint no-commonjs: [2, { allowPrimitiveModules: true }]*/ + +module.exports = "foo" +module.exports = function rule(context) { return { /* ... */ } } +``` + +but this is still reported: + +```js +/*eslint no-commonjs: [2, { allowPrimitiveModules: true }]*/ + +module.exports = { x: "y" } +exports.z = function boop() { /* ... */ } +``` + +This is useful for things like ESLint rule modules, which must export a function as +the module. + +## When Not To Use It + +If you don't mind mixing module systems (sometimes this is useful), you probably +don't want this rule. + +It is also fairly noisy if you have a larger codebase that is being transitioned +from CommonJS to ES6 modules. + + +## Contributors + +Special thanks to @xjamundx for donating the module.exports and exports.* bits. + +## Further Reading + +- [`no-amd`](./no-amd.md): report on AMD `require`, `define` +- Source: https://github.com/xjamundx/eslint-plugin-modules diff --git a/docs/description/import_no-default-export.md b/docs/description/import_no-default-export.md new file mode 100644 index 000000000..586d5e745 --- /dev/null +++ b/docs/description/import_no-default-export.md @@ -0,0 +1,65 @@ +# import/no-default-export + + + +Prohibit default exports. Mostly an inverse of [`prefer-default-export`]. + +[`prefer-default-export`]: ./prefer-default-export.md + +## Rule Details + +The following patterns are considered warnings: + +```javascript +// bad1.js + +// There is a default export. +export const foo = 'foo'; +const bar = 'bar'; +export default 'bar'; +``` + +```javascript +// bad2.js + +// There is a default export. +const foo = 'foo'; +export { foo as default } +``` + +The following patterns are not warnings: + +```javascript +// good1.js + +// There is only a single module export and it's a named export. +export const foo = 'foo'; +``` + +```javascript +// good2.js + +// There is more than one named export in the module. +export const foo = 'foo'; +export const bar = 'bar'; +``` + +```javascript +// good3.js + +// There is more than one named export in the module +const foo = 'foo'; +const bar = 'bar'; +export { foo, bar } +``` + +```javascript +// export-star.js + +// Any batch export will disable this rule. The remote module is not inspected. +export * from './other-module' +``` + +## When Not To Use It + +If you don't care if default imports are used, or if you prefer default imports over named imports. diff --git a/docs/description/import_no-duplicates.md b/docs/description/import_no-duplicates.md new file mode 100644 index 000000000..5f3cfbd42 --- /dev/null +++ b/docs/description/import_no-duplicates.md @@ -0,0 +1,102 @@ +# import/no-duplicates + +⚠️ This rule _warns_ in the following configs: β˜‘οΈ `recommended`, 🚸 `warnings`. + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Reports if a resolved path is imported more than once. ++(fixable) The `--fix` option on the [command line] automatically fixes some problems reported by this rule. + +ESLint core has a similar rule ([`no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports)), but this version +is different in two key ways: + +1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`) +2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/import-js/eslint-plugin-import/pull/334)) + +## Rule Details + +Valid: +```js +import SomeDefaultClass, * as names from './mod' +// Flow `type` import from same module is fine +import type SomeType from './mod' +``` + +...whereas here, both `./mod` imports will be reported: + +```js +import SomeDefaultClass from './mod' + +// oops, some other import separated these lines +import foo from './some-other-mod' + +import * as names from './mod' + +// will catch this too, assuming it is the same target module +import { something } from './mod.js' +``` + +The motivation is that this is likely a result of two developers importing different +names from the same module at different times (and potentially largely different +locations in the file.) This rule brings both (or n-many) to attention. + +### Query Strings + +By default, this rule ignores query strings (i.e. paths followed by a question mark), and thus imports from `./mod?a` and `./mod?b` will be considered as duplicates. However you can use the option `considerQueryString` to handle them as different (primarily because browsers will resolve those imports differently). + +Config: + +```json +"import/no-duplicates": ["error", {"considerQueryString": true}] +``` + +And then the following code becomes valid: +```js +import minifiedMod from './mod?minify' +import noCommentsMod from './mod?comments=0' +import originalMod from './mod' +``` + +It will still catch duplicates when using the same module and the exact same query string: +```js +import SomeDefaultClass from './mod?minify' + +// This is invalid, assuming `./mod` and `./mod.js` are the same target: +import * from './mod.js?minify' +``` + +### Inline Type imports + +TypeScript 4.5 introduced a new [feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names) that allows mixing of named value and type imports. In order to support fixing to an inline type import when duplicate imports are detected, `prefer-inline` can be set to true. + +Config: + +```json +"import/no-duplicates": ["error", {"prefer-inline": true}] +``` + + + +❌ Invalid `["error", {"prefer-inline": true}]` + +```js +import { AValue, type AType } from './mama-mia' +import type { BType } from './mama-mia' +``` + +βœ… Valid with `["error", {"prefer-inline": true}]` + +```js +import { AValue, type AType, type BType } from './mama-mia' +``` + + + +## When Not To Use It + +If the core ESLint version is good enough (i.e. you're _not_ using Flow and you _are_ using [`import/extensions`](./extensions.md)), keep it and don't use this. + +If you like to split up imports across lines or may need to import a default and a namespace, +you may not want to enable this rule. diff --git a/docs/description/import_no-dynamic-require.md b/docs/description/import_no-dynamic-require.md new file mode 100644 index 000000000..292055fcd --- /dev/null +++ b/docs/description/import_no-dynamic-require.md @@ -0,0 +1,25 @@ +# import/no-dynamic-require + + + +The `require` method from CommonJS is used to import modules from different files. Unlike the ES6 `import` syntax, it can be given expressions that will be resolved at runtime. While this is sometimes necessary and useful, in most cases it isn't. Using expressions (for instance, concatenating a path and variable) as the argument makes it harder for tools to do static code analysis, or to find where in the codebase a module is used. + +This rule forbids every call to `require()` that uses expressions for the module name argument. + +## Rule Details + +### Fail + +```js +require(name); +require('../' + name); +require(`../${name}`); +require(name()); +``` + +### Pass + +```js +require('../name'); +require(`../name`); +``` diff --git a/docs/description/import_no-empty-named-blocks.md b/docs/description/import_no-empty-named-blocks.md new file mode 100644 index 000000000..7bf4d695c --- /dev/null +++ b/docs/description/import_no-empty-named-blocks.md @@ -0,0 +1,43 @@ +# import/no-empty-named-blocks + +πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions). + + + +Reports the use of empty named import blocks. + +## Rule Details + +### Valid +```js +import { mod } from 'mod' +import Default, { mod } from 'mod' +``` + +When using typescript +```js +import type { mod } from 'mod' +``` + +When using flow +```js +import typeof { mod } from 'mod' +``` + +### Invalid +```js +import {} from 'mod' +import Default, {} from 'mod' +``` + +When using typescript +```js +import type Default, {} from 'mod' +import type {} from 'mod' +``` + +When using flow +```js +import typeof {} from 'mod' +import typeof Default, {} from 'mod' +``` \ No newline at end of file diff --git a/docs/description/import_no-extraneous-dependencies.md b/docs/description/import_no-extraneous-dependencies.md new file mode 100644 index 000000000..660875d1d --- /dev/null +++ b/docs/description/import_no-extraneous-dependencies.md @@ -0,0 +1,141 @@ +# import/no-extraneous-dependencies + + + +Forbid the import of external modules that are not declared in the `package.json`'s `dependencies`, `devDependencies`, `optionalDependencies`, `peerDependencies`, or `bundledDependencies`. +The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. Normally ignores imports of modules marked internal, but this can be changed with the rule option `includeInternal`. Type imports can be verified by specifying `includeTypes`. + +Modules have to be installed for this rule to work. + +### Options + +This rule supports the following options: + +`devDependencies`: If set to `false`, then the rule will show an error when `devDependencies` are imported. Defaults to `true`. +Type imports are ignored by default. + +`optionalDependencies`: If set to `false`, then the rule will show an error when `optionalDependencies` are imported. Defaults to `true`. + +`peerDependencies`: If set to `false`, then the rule will show an error when `peerDependencies` are imported. Defaults to `true`. + +`bundledDependencies`: If set to `false`, then the rule will show an error when `bundledDependencies` are imported. Defaults to `true`. + +You can set the options like this: + +```js +"import/no-extraneous-dependencies": ["error", {"devDependencies": false, "optionalDependencies": false, "peerDependencies": false}] +``` + +You can also use an array of globs instead of literal booleans: + +```js +"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js"]}] +``` + +When using an array of globs, the setting will be set to `true` (no errors reported) if the name of the file being linted matches a single glob in the array, and `false` otherwise. + +There are 2 boolean options to opt into checking extra imports that are normally ignored: `includeInternal`, which enables the checking of internal modules, and `includeTypes`, which enables checking of type imports in TypeScript. + +```js +"import/no-extraneous-dependencies": ["error", {"includeInternal": true, "includeTypes": true}] +``` + +Also there is one more option called `packageDir`, this option is to specify the path to the folder containing package.json. + +If provided as a relative path string, will be computed relative to the current working directory at linter execution time. If this is not ideal (does not work with some editor integrations), consider using `__dirname` to provide a path relative to your configuration. + +```js +"import/no-extraneous-dependencies": ["error", {"packageDir": './some-dir/'}] +// or +"import/no-extraneous-dependencies": ["error", {"packageDir": path.join(__dirname, 'some-dir')}] +``` + +It may also be an array of multiple paths, to support monorepos or other novel project +folder layouts: + +```js +"import/no-extraneous-dependencies": ["error", {"packageDir": ['./some-dir/', './root-pkg']}] +``` + +## Rule Details + +Given the following `package.json`: +```json +{ + "name": "my-project", + "...": "...", + "dependencies": { + "builtin-modules": "^1.1.1", + "lodash.cond": "^4.2.0", + "lodash.find": "^4.2.0", + "pkg-up": "^1.0.0" + }, + "devDependencies": { + "ava": "^0.13.0", + "eslint": "^2.4.0", + "eslint-plugin-ava": "^1.3.0", + "xo": "^0.13.0" + }, + "optionalDependencies": { + "lodash.isarray": "^4.0.0" + }, + "peerDependencies": { + "react": ">=15.0.0 <16.0.0" + }, + "bundledDependencies": [ + "@generated/foo", + ] +} +``` + + +## Fail + +```js +var _ = require('lodash'); +import _ from 'lodash'; + +import react from 'react'; + +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": false}] */ +import test from 'ava'; +var test = require('ava'); + +/* eslint import/no-extraneous-dependencies: ["error", {"optionalDependencies": false}] */ +import isArray from 'lodash.isarray'; +var isArray = require('lodash.isarray'); + +/* eslint import/no-extraneous-dependencies: ["error", {"bundledDependencies": false}] */ +import foo from '"@generated/foo"'; +var foo = require('"@generated/foo"'); + +/* eslint import/no-extraneous-dependencies: ["error", {"includeInternal": true}] */ +import foo from './foo'; +var foo = require('./foo'); + +/* eslint import/no-extraneous-dependencies: ["error", {"includeTypes": true}] */ +import type { MyType } from 'foo'; +``` + + +## Pass + +```js +// Builtin and internal modules are fine +var path = require('path'); +var foo = require('./foo'); + +import test from 'ava'; +import find from 'lodash.find'; +import isArray from 'lodash.isarray'; +import foo from '"@generated/foo"'; +import type { MyType } from 'foo'; + +/* eslint import/no-extraneous-dependencies: ["error", {"peerDependencies": true}] */ +import react from 'react'; +``` + + +## When Not To Use It + +If you do not have a `package.json` file in your project. diff --git a/docs/description/import_no-import-module-exports.md b/docs/description/import_no-import-module-exports.md new file mode 100644 index 000000000..08aacfcc3 --- /dev/null +++ b/docs/description/import_no-import-module-exports.md @@ -0,0 +1,78 @@ +# import/no-import-module-exports + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Reports the use of import declarations with CommonJS exports in any module +except for the [main module](https://docs.npmjs.com/files/package.json#main). + +If you have multiple entry points or are using `js:next` this rule includes an +`exceptions` option which you can use to exclude those files from the rule. + +## Options + +#### `exceptions` + - An array of globs. The rule will be omitted from any file that matches a glob + in the options array. For example, the following setting will omit the rule + in the `some-file.js` file. + +```json +"import/no-import-module-exports": ["error", { + "exceptions": ["**/*/some-file.js"] +}] +``` + +## Rule Details + +### Fail + +```js +import { stuff } from 'starwars' +module.exports = thing + +import * as allThings from 'starwars' +exports.bar = thing + +import thing from 'other-thing' +exports.foo = bar + +import thing from 'starwars' +const baz = module.exports = thing +console.log(baz) +``` + +### Pass +Given the following package.json: + +```json +{ + "main": "lib/index.js", +} +``` + +```js +import thing from 'other-thing' +export default thing + +const thing = require('thing') +module.exports = thing + +const thing = require('thing') +exports.foo = bar + +import thing from 'otherthing' +console.log(thing.module.exports) + +// in lib/index.js +import foo from 'path'; +module.exports = foo; + +// in some-file.js +// eslint import/no-import-module-exports: ["error", {"exceptions": ["**/*/some-file.js"]}] +import foo from 'path'; +module.exports = foo; +``` + +### Further Reading + - [webpack issue #4039](https://github.com/webpack/webpack/issues/4039) diff --git a/docs/description/import_no-internal-modules.md b/docs/description/import_no-internal-modules.md new file mode 100644 index 000000000..47f7490da --- /dev/null +++ b/docs/description/import_no-internal-modules.md @@ -0,0 +1,134 @@ +# import/no-internal-modules + + + +Use this rule to prevent importing the submodules of other modules. + +## Rule Details + +This rule has two mutally exclusive options that are arrays of [minimatch/glob patterns](https://github.com/isaacs/node-glob#glob-primer) patterns: + +- `allow` that include paths and import statements that can be imported with reaching. +- `forbid` that exclude paths and import statements that can be imported with reaching. + +### Examples + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ actions +β”‚ └── getUser.js +β”‚ └── updateUser.js +β”œβ”€β”€ reducer +β”‚ └── index.js +β”‚ └── user.js +β”œβ”€β”€ redux +β”‚ └── index.js +β”‚ └── configureStore.js +└── app +β”‚ └── index.js +β”‚ └── settings.js +└── entry.js +``` + +And the .eslintrc file: +``` +{ + ... + "rules": { + "import/no-internal-modules": [ "error", { + "allow": [ "**/actions/*", "source-map-support/*" ], + } ] + } +} +``` + +The following patterns are considered problems: + +```js +/** + * in my-project/entry.js + */ + +import { settings } from './app/index'; // Reaching to "./app/index" is not allowed +import userReducer from './reducer/user'; // Reaching to "./reducer/user" is not allowed +import configureStore from './redux/configureStore'; // Reaching to "./redux/configureStore" is not allowed + +export { settings } from './app/index'; // Reaching to "./app/index" is not allowed +export * from './reducer/user'; // Reaching to "./reducer/user" is not allowed +``` + +The following patterns are NOT considered problems: + +```js +/** + * in my-project/entry.js + */ + +import 'source-map-support/register'; +import { settings } from '../app'; +import getUser from '../actions/getUser'; + +export * from 'source-map-support/register'; +export { settings } from '../app'; +``` + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ actions +β”‚ └── getUser.js +β”‚ └── updateUser.js +β”œβ”€β”€ reducer +β”‚ └── index.js +β”‚ └── user.js +β”œβ”€β”€ redux +β”‚ └── index.js +β”‚ └── configureStore.js +└── app +β”‚ └── index.js +β”‚ └── settings.js +└── entry.js +``` + +And the .eslintrc file: +``` +{ + ... + "rules": { + "import/no-internal-modules": [ "error", { + "forbid": [ "**/actions/*", "source-map-support/*" ], + } ] + } +} +``` + +The following patterns are considered problems: + +```js +/** + * in my-project/entry.js + */ + +import 'source-map-support/register'; +import getUser from '../actions/getUser'; + +export * from 'source-map-support/register'; +export getUser from '../actions/getUser'; +``` + +The following patterns are NOT considered problems: + +```js +/** + * in my-project/entry.js + */ + +import 'source-map-support'; +import { getUser } from '../actions'; + +export * from 'source-map-support'; +export { getUser } from '../actions'; +``` diff --git a/docs/description/import_no-mutable-exports.md b/docs/description/import_no-mutable-exports.md new file mode 100644 index 000000000..f0a6251c1 --- /dev/null +++ b/docs/description/import_no-mutable-exports.md @@ -0,0 +1,54 @@ +# import/no-mutable-exports + + + +Forbids the use of mutable exports with `var` or `let`. + +## Rule Details + +Valid: + +```js +export const count = 1 +export function getCount() {} +export class Counter {} +``` + +...whereas here exports will be reported: + +```js +export let count = 2 +export var count = 3 + +let count = 4 +export { count } // reported here +``` + +## Functions/Classes + +Note that exported function/class declaration identifiers may be reassigned, +but are not flagged by this rule at this time. They may be in the future, if a +reassignment is detected, i.e. + +```js +// possible future behavior! +export class Counter {} // reported here: exported class is reassigned on line [x]. +Counter = KitchenSink // not reported here unless you enable no-class-assign + +// this pre-declaration reassignment is valid on account of function hoisting +getCount = function getDuke() {} // not reported here without no-func-assign +export function getCount() {} // reported here: exported function is reassigned on line [x]. +``` + +To prevent general reassignment of these identifiers, exported or not, you may +want to enable the following core ESLint rules: + +- [no-func-assign] +- [no-class-assign] + +[no-func-assign]: https://eslint.org/docs/rules/no-func-assign +[no-class-assign]: https://eslint.org/docs/rules/no-class-assign + +## When Not To Use It + +If your environment correctly implements mutable export bindings. diff --git a/docs/description/import_no-named-default.md b/docs/description/import_no-named-default.md new file mode 100644 index 000000000..2f3d54b80 --- /dev/null +++ b/docs/description/import_no-named-default.md @@ -0,0 +1,33 @@ +# import/no-named-default + + + +Reports use of a default export as a locally named import. + +Rationale: the syntax exists to import default exports expressively, let's use it. + +Note that type imports, as used by [Flow], are always ignored. + +[Flow]: https://flow.org/ + +## Rule Details + +Given: +```js +// foo.js +export default 'foo'; +export const bar = 'baz'; +``` + +...these would be valid: +```js +import foo from './foo.js'; +import foo, { bar } from './foo.js'; +``` + +...and these would be reported: +```js +// message: Using exported name 'bar' as identifier for default export. +import { default as foo } from './foo.js'; +import { default as foo, bar } from './foo.js'; +``` diff --git a/docs/description/import_no-named-export.md b/docs/description/import_no-named-export.md new file mode 100644 index 000000000..13ea63ad7 --- /dev/null +++ b/docs/description/import_no-named-export.md @@ -0,0 +1,79 @@ +# import/no-named-export + + + +Prohibit named exports. Mostly an inverse of [`no-default-export`]. + +[`no-default-export`]: ./no-default-export.md + +## Rule Details + +The following patterns are considered warnings: + +```javascript +// bad1.js + +// There is only a single module export and it's a named export. +export const foo = 'foo'; +``` + +```javascript +// bad2.js + +// There is more than one named export in the module. +export const foo = 'foo'; +export const bar = 'bar'; +``` + +```javascript +// bad3.js + +// There is more than one named export in the module. +const foo = 'foo'; +const bar = 'bar'; +export { foo, bar } +``` + +```javascript +// bad4.js + +// There is more than one named export in the module. +export * from './other-module' +``` + +```javascript +// bad5.js + +// There is a default and a named export. +export const foo = 'foo'; +const bar = 'bar'; +export default 'bar'; +``` + +The following patterns are not warnings: + +```javascript +// good1.js + +// There is only a single module export and it's a default export. +export default 'bar'; +``` + +```javascript +// good2.js + +// There is only a single module export and it's a default export. +const foo = 'foo'; +export { foo as default } +``` + +```javascript +// good3.js + +// There is only a single module export and it's a default export. +export default from './other-module'; +``` + +## When Not To Use It + +If you don't care if named imports are used, or if you prefer named imports over default imports. diff --git a/docs/description/import_no-namespace.md b/docs/description/import_no-namespace.md new file mode 100644 index 000000000..5545bce22 --- /dev/null +++ b/docs/description/import_no-namespace.md @@ -0,0 +1,45 @@ +# import/no-namespace + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports. + ++(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule, provided that the namespace object is only used for direct member access, e.g. `namespace.a`. +The `--fix` functionality for this rule requires ESLint 5 or newer. + +### Options + +This rule supports the following options: + +- `ignore`: array of glob strings for modules that should be ignored by the rule. + +## Rule Details + +Valid: + +```js +import defaultExport from './foo' +import { a, b } from './bar' +import defaultExport, { a, b } from './foobar' +``` + +```js +/* eslint import/no-namespace: ["error", {ignore: ['*.ext']}] */ +import * as bar from './ignored-module.ext'; +``` + +Invalid: + +```js +import * as foo from 'foo'; +``` + +```js +import defaultExport, * as foo from 'foo'; +``` + +## When Not To Use It + +If you want to use namespaces, you don't want to use this rule. diff --git a/docs/description/import_no-nodejs-modules.md b/docs/description/import_no-nodejs-modules.md new file mode 100644 index 000000000..624c27e05 --- /dev/null +++ b/docs/description/import_no-nodejs-modules.md @@ -0,0 +1,42 @@ +# import/no-nodejs-modules + + + +Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to those modules. + +### Options + +This rule supports the following options: + +- `allow`: Array of names of allowed modules. Defaults to an empty array. + +## Rule Details + +### Fail + +```js +import fs from 'fs'; +import path from 'path'; + +var fs = require('fs'); +var path = require('path'); +``` + +### Pass + +```js +import _ from 'lodash'; +import foo from 'foo'; +import foo from './foo'; + +var _ = require('lodash'); +var foo = require('foo'); +var foo = require('./foo'); + +/* eslint import/no-nodejs-modules: ["error", {"allow": ["path"]}] */ +import path from 'path'; +``` + +## When Not To Use It + +If you have a project that is run mainly or partially using Node.js. diff --git a/docs/description/import_no-relative-packages.md b/docs/description/import_no-relative-packages.md new file mode 100644 index 000000000..4919de94e --- /dev/null +++ b/docs/description/import_no-relative-packages.md @@ -0,0 +1,71 @@ +# import/no-relative-packages + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Use this rule to prevent importing packages through relative paths. + +It's useful in Yarn/Lerna workspaces, were it's possible to import a sibling +package using `../package` relative path, while direct `package` is the correct one. + ++(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. + +### Examples + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ packages +β”‚ β”œβ”€β”€ foo +β”‚ β”‚ β”œβ”€β”€ index.js +β”‚ β”‚ └── package.json +β”‚ └── bar +β”‚ β”œβ”€β”€ index.js +β”‚ └── package.json +└── entry.js +``` + +And the .eslintrc file: +``` +{ + ... + "rules": { + "import/no-relative-packages": "error" + } +} +``` + +The following patterns are considered problems: + +```js +/** + * in my-project/packages/foo.js + */ + +import bar from '../bar'; // Import sibling package using relative path +import entry from '../../entry.js'; // Import from parent package using relative path + +/** + * in my-project/entry.js + */ + +import bar from './packages/bar'; // Import child package using relative path +``` + +The following patterns are NOT considered problems: + +```js +/** + * in my-project/packages/foo.js + */ + +import bar from 'bar'; // Import sibling package using package name + +/** + * in my-project/entry.js + */ + +import bar from 'bar'; // Import sibling package using package name +``` diff --git a/docs/description/import_no-relative-parent-imports.md b/docs/description/import_no-relative-parent-imports.md new file mode 100644 index 000000000..e5684eb1c --- /dev/null +++ b/docs/description/import_no-relative-parent-imports.md @@ -0,0 +1,122 @@ +# import/no-relative-parent-imports + + + +Use this rule to prevent imports to folders in relative parent paths. + +This rule is useful for enforcing tree-like folder structures instead of complex graph-like folder structures. While this restriction might be a departure from Node's default resolution style, it can lead large, complex codebases to be easier to maintain. If you've ever had debates over "where to put files" this rule is for you. + +To fix violations of this rule there are three general strategies. Given this example: + +``` +numbers +└── three.js +add.js +``` + +```js +// ./add.js +export default function (numbers) { + return numbers.reduce((sum, n) => sum + n, 0); +} + +// ./numbers/three.js +import add from '../add'; // violates import/no-relative-parent-imports + +export default function three() { + return add([1, 2]); +} +``` + +You can, + +1. Move the file to be in a sibling folder (or higher) of the dependency. + +`three.js` could be be in the same folder as `add.js`: + +``` +three.js +add.js +``` + +or since `add` doesn't have any imports, it could be in it's own directory (namespace): + +``` +math +└── add.js +three.js +``` + +2. Pass the dependency as an argument at runtime (dependency injection) + +```js +// three.js +export default function three(add) { + return add([1, 2]); +} + +// somewhere else when you use `three.js`: +import add from './add'; +import three from './numbers/three'; +console.log(three(add)); +``` + +3. Make the dependency a package so it's globally available to all files in your project: + +```js +import add from 'add'; // from https://www.npmjs.com/package/add +export default function three() { + return add([1,2]); +} +``` + +These are (respectively) static, dynamic & global solutions to graph-like dependency resolution. + +### Examples + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ lib +β”‚ β”œβ”€β”€ a.js +β”‚ └── b.js +└── main.js +``` + +And the .eslintrc file: +``` +{ + ... + "rules": { + "import/no-relative-parent-imports": "error" + } +} +``` + +The following patterns are considered problems: + +```js +/** + * in my-project/lib/a.js + */ + +import bar from '../main'; // Import parent file using a relative path +``` + +The following patterns are NOT considered problems: + +```js +/** + * in my-project/main.js + */ + +import foo from 'foo'; // Import package using module path +import a from './lib/a'; // Import child file using relative path + +/** + * in my-project/lib/a.js + */ + +import b from './b'; // Import sibling file using relative path +``` diff --git a/docs/description/import_no-restricted-paths.md b/docs/description/import_no-restricted-paths.md new file mode 100644 index 000000000..344c33bb6 --- /dev/null +++ b/docs/description/import_no-restricted-paths.md @@ -0,0 +1,198 @@ +# import/no-restricted-paths + + + +Some projects contain files which are not always meant to be executed in the same environment. +For example consider a web application that contains specific code for the server and some specific code for the browser/client. In this case you don’t want to import server-only files in your client code. + +In order to prevent such scenarios this rule allows you to define restricted zones where you can forbid files from imported if they match a specific path. + +## Rule Details + +This rule has one option. The option is an object containing the definition of all restricted `zones` and the optional `basePath` which is used to resolve relative paths within. +The default value for `basePath` is the current working directory. + +Each zone consists of the `target` paths, a `from` paths, and an optional `except` and `message` attribute. +- `target` contains the paths where the restricted imports should be applied. It can be expressed by + - directory string path that matches all its containing files + - glob pattern matching all the targeted files + - an array of multiple of the two types above +- `from` paths define the folders that are not allowed to be used in an import. It can be expressed by + - directory string path that matches all its containing files + - glob pattern matching all the files restricted to be imported + - an array of multiple directory string path + - an array of multiple glob patterns +- `except` may be defined for a zone, allowing exception paths that would otherwise violate the related `from`. Note that it does not alter the behaviour of `target` in any way. + - in case `from` contains only glob patterns, `except` must be an array of glob patterns as well + - in case `from` contains only directory path, `except` is relative to `from` and cannot backtrack to a parent directory +- `message` - will be displayed in case of the rule violation. + +### Examples + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ client +β”‚ └── foo.js +β”‚ └── baz.js +└── server + └── bar.js +``` + +and the current file being linted is `my-project/client/foo.js`. + +The following patterns are considered problems when configuration set to `{ "zones": [ { "target": "./client", "from": "./server" } ] }`: + +```js +import bar from '../server/bar'; +``` + +The following patterns are not considered problems when configuration set to `{ "zones": [ { "target": "./client", "from": "./server" } ] }`: + +```js +import baz from '../client/baz'; +``` + +--------------- + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ client +β”‚ └── foo.js +β”‚ └── baz.js +└── server + β”œβ”€β”€ one + β”‚ └── a.js + β”‚ └── b.js + └── two +``` + +and the current file being linted is `my-project/server/one/a.js`. + +and the current configuration is set to: + +``` +{ "zones": [ { + "target": "./tests/files/restricted-paths/server/one", + "from": "./tests/files/restricted-paths/server", + "except": ["./one"] +} ] } +``` + +The following pattern is considered a problem: + +```js +import a from '../two/a' +``` + +The following pattern is not considered a problem: + +```js +import b from './b' + +``` + +--------------- + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ client + └── foo.js + └── sub-module + └── bar.js + └── baz.js + +``` + +and the current configuration is set to: + +``` +{ "zones": [ { + "target": "./tests/files/restricted-paths/client/!(sub-module)/**/*", + "from": "./tests/files/restricted-paths/client/sub-module/**/*", +} ] } +``` + +The following import is considered a problem in `my-project/client/foo.js`: + +```js +import a from './sub-module/baz' +``` + +The following import is not considered a problem in `my-project/client/sub-module/bar.js`: + +```js +import b from './baz' +``` + +--------------- + +Given the following folder structure: + +``` +my-project +└── one + └── a.js + └── b.js +└── two + └── a.js + └── b.js +└── three + └── a.js + └── b.js +``` + +and the current configuration is set to: + +``` +{ + "zones": [ + { + "target": ["./tests/files/restricted-paths/two/*", "./tests/files/restricted-paths/three/*"], + "from": ["./tests/files/restricted-paths/one", "./tests/files/restricted-paths/three"], + } + ] +} +``` + +The following patterns are not considered a problem in `my-project/one/b.js`: + +```js +import a from '../three/a' +``` + +```js +import a from './a' +``` + +The following pattern is not considered a problem in `my-project/two/b.js`: + +```js +import a from './a' +``` + +The following patterns are considered a problem in `my-project/two/a.js`: + +```js +import a from '../one/a' +``` + +```js +import a from '../three/a' +``` + +The following patterns are considered a problem in `my-project/three/b.js`: + +```js +import a from '../one/a' +``` + +```js +import a from './a' +``` + diff --git a/docs/description/import_no-self-import.md b/docs/description/import_no-self-import.md new file mode 100644 index 000000000..8d8491c50 --- /dev/null +++ b/docs/description/import_no-self-import.md @@ -0,0 +1,32 @@ +# import/no-self-import + + + +Forbid a module from importing itself. This can sometimes happen during refactoring. + +## Rule Details + +### Fail + +```js +// foo.js +import foo from './foo'; + +const foo = require('./foo'); +``` + +```js +// index.js +import index from '.'; + +const index = require('.'); +``` + +### Pass + +```js +// foo.js +import bar from './bar'; + +const bar = require('./bar'); +``` diff --git a/docs/description/import_no-unassigned-import.md b/docs/description/import_no-unassigned-import.md new file mode 100644 index 000000000..6f763e973 --- /dev/null +++ b/docs/description/import_no-unassigned-import.md @@ -0,0 +1,61 @@ +# import/no-unassigned-import + + + +With both CommonJS' `require` and the ES6 modules' `import` syntax, it is possible to import a module but not to use its result. This can be done explicitly by not assigning the module to as variable. Doing so can mean either of the following things: +- The module is imported but not used +- The module has side-effects (like [`should`](https://www.npmjs.com/package/should)). Having side-effects, makes it hard to know whether the module is actually used or can be removed. It can also make it harder to test or mock parts of your application. + +This rule aims to remove modules with side-effects by reporting when a module is imported but not assigned. + +### Options + +This rule supports the following option: + +`allow`: An Array of globs. The files that match any of these patterns would be ignored/allowed by the linter. This can be useful for some build environments (e.g. css-loader in webpack). + +Note that the globs start from the where the linter is executed (usually project root), but not from each file that includes the source. Learn more in both the pass and fail examples below. + + +## Fail + +```js +import 'should' +require('should') + +// In /src/app.js +import '../styles/app.css' +// {"allow": ["styles/*.css"]} +``` + + +## Pass + +```js +import _ from 'foo' +import _, {foo} from 'foo' +import _, {foo as bar} from 'foo' +import {foo as bar} from 'foo' +import * as _ from 'foo' + +const _ = require('foo') +const {foo} = require('foo') +const {foo: bar} = require('foo') +const [a, b] = require('foo') +const _ = require('foo') + +// Module is not assigned, but it is used +bar(require('foo')) +require('foo').bar +require('foo').bar() +require('foo')() + +// With allow option set +import './style.css' // {"allow": ["**/*.css"]} +import 'babel-register' // {"allow": ["babel-register"]} + +// In /src/app.js +import './styles/app.css' +import '../scripts/register.js' +// {"allow": ["src/styles/**", "**/scripts/*.js"]} +``` diff --git a/docs/description/import_no-unresolved.md b/docs/description/import_no-unresolved.md new file mode 100644 index 000000000..13f792887 --- /dev/null +++ b/docs/description/import_no-unresolved.md @@ -0,0 +1,110 @@ +# import/no-unresolved + +πŸ’Ό This rule is enabled in the following configs: ❗ `errors`, β˜‘οΈ `recommended`. + + + +Ensures an imported module can be resolved to a module on the local filesystem, +as defined by standard Node `require.resolve` behavior. + +See [settings](../../README.md#settings) for customization options for the resolution (i.e. +additional filetypes, `NODE_PATH`, etc.) + +This rule can also optionally report on unresolved modules in CommonJS `require('./foo')` calls and AMD `require(['./foo'], function (foo) {...})` and `define(['./foo'], function (foo) {...})`. + +To enable this, send `{ commonjs: true/false, amd: true/false }` as a rule option. +Both are disabled by default. + +If you are using Webpack, see the section on [resolvers](../../README.md#resolvers). + +## Rule Details + +### Options + +By default, only ES6 imports will be resolved: + +```js +/*eslint import/no-unresolved: 2*/ +import x from './foo' // reports if './foo' cannot be resolved on the filesystem +``` + +If `{commonjs: true}` is provided, single-argument `require` calls will be resolved: + +```js +/*eslint import/no-unresolved: [2, { commonjs: true }]*/ +const { default: x } = require('./foo') // reported if './foo' is not found + +require(0) // ignored +require(['x', 'y'], function (x, y) { /*...*/ }) // ignored +``` + +Similarly, if `{ amd: true }` is provided, dependency paths for `define` and `require` +calls will be resolved: + +```js +/*eslint import/no-unresolved: [2, { amd: true }]*/ +define(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found +require(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found + +const { default: x } = require('./foo') // ignored +``` + +Both may be provided, too: +```js +/*eslint import/no-unresolved: [2, { commonjs: true, amd: true }]*/ +const { default: x } = require('./foo') // reported if './foo' is not found +define(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found +require(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found +``` + +#### `ignore` + +This rule has its own ignore list, separate from [`import/ignore`]. This is because you may want to know whether a module can be located, regardless of whether it can be parsed for exports: `node_modules`, CoffeeScript files, etc. are all good to resolve properly, but will not be parsed if configured as such via [`import/ignore`]. + +To suppress errors from files that may not be properly resolved by your [resolver settings](../../README.md#resolver-plugins), you may add an `ignore` key with an array of `RegExp` pattern strings: + +```js +/*eslint import/no-unresolved: [2, { ignore: ['\\.img$'] }]*/ + +import { x } from './mod' // may be reported, if not resolved to a module + +import coolImg from '../../img/coolImg.img' // will not be reported, even if not found +``` + +#### `caseSensitive` + +By default, this rule will report paths whose case do not match the underlying filesystem path, if the FS is not case-sensitive. To disable this behavior, set the `caseSensitive` option to `false`. + +```js +/*eslint import/no-unresolved: [2, { caseSensitive: true (default) | false }]*/ +const { default: x } = require('./foo') // reported if './foo' is actually './Foo' and caseSensitive: true +``` + +#### `caseSensitiveStrict` + +The `caseSensitive` option does not detect case for the current working directory. The `caseSensitiveStrict` option allows checking `cwd` in resolved path. By default, the option is disabled. + + +```js +/*eslint import/no-unresolved: [2, { caseSensitiveStrict: true }]*/ + +// Absolute paths +import Foo from `/Users/fOo/bar/file.js` // reported, /Users/foo/bar/file.js +import Foo from `d:/fOo/bar/file.js` // reported, d:/foo/bar/file.js + +// Relative paths, cwd is Users/foo/ +import Foo from `./../fOo/bar/file.js` // reported +``` + +## When Not To Use It + +If you're using a module bundler other than Node or Webpack, you may end up with a lot of false positive reports of missing dependencies. + +## Further Reading + +- [Resolver plugins](../../README.md#resolvers) +- [Node resolver](https://npmjs.com/package/eslint-import-resolver-node) (default) +- [Webpack resolver](https://npmjs.com/package/eslint-import-resolver-webpack) +- [`import/ignore`] global setting + +[`import/ignore`]: ../../README.md#importignore diff --git a/docs/description/import_no-useless-path-segments.md b/docs/description/import_no-useless-path-segments.md new file mode 100644 index 000000000..c8dc67727 --- /dev/null +++ b/docs/description/import_no-useless-path-segments.md @@ -0,0 +1,84 @@ +# import/no-useless-path-segments + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Use this rule to prevent unnecessary path segments in import and require statements. + +## Rule Details + +Given the following folder structure: + +``` +my-project +β”œβ”€β”€ app.js +β”œβ”€β”€ footer.js +β”œβ”€β”€ header.js +└── helpers.js +└── helpers + └── index.js +β”œβ”€β”€ index.js +└── pages + β”œβ”€β”€ about.js + β”œβ”€β”€ contact.js + └── index.js +``` + +The following patterns are considered problems: + +```js +/** + * in my-project/app.js + */ + +import "./../my-project/pages/about.js"; // should be "./pages/about.js" +import "./../my-project/pages/about"; // should be "./pages/about" +import "../my-project/pages/about.js"; // should be "./pages/about.js" +import "../my-project/pages/about"; // should be "./pages/about" +import "./pages//about"; // should be "./pages/about" +import "./pages/"; // should be "./pages" +import "./pages/index"; // should be "./pages" (except if there is a ./pages.js file) +import "./pages/index.js"; // should be "./pages" (except if there is a ./pages.js file) +``` + +The following patterns are NOT considered problems: + +```js +/** + * in my-project/app.js + */ + +import "./header.js"; +import "./pages"; +import "./pages/about"; +import "."; +import ".."; +import fs from "fs"; +``` + +## Options + +### noUselessIndex + +If you want to detect unnecessary `/index` or `/index.js` (depending on the specified file extensions, see below) imports in your paths, you can enable the option `noUselessIndex`. By default it is set to `false`: +```js +"import/no-useless-path-segments": ["error", { + noUselessIndex: true, +}] +``` + +Additionally to the patterns described above, the following imports are considered problems if `noUselessIndex` is enabled: + +```js +// in my-project/app.js +import "./helpers/index"; // should be "./helpers/" (not auto-fixable to `./helpers` because this would lead to an ambiguous import of `./helpers.js` and `./helpers/index.js`) +import "./pages/index"; // should be "./pages" (auto-fixable) +import "./pages/index.js"; // should be "./pages" (auto-fixable) +``` + +Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/import-js/eslint-plugin-import#importextensions) for details. + +### commonjs + +When set to `true`, this rule checks CommonJS imports. Default to `false`. diff --git a/docs/description/import_no-webpack-loader-syntax.md b/docs/description/import_no-webpack-loader-syntax.md new file mode 100644 index 000000000..e1b7a4bd9 --- /dev/null +++ b/docs/description/import_no-webpack-loader-syntax.md @@ -0,0 +1,38 @@ +# import/no-webpack-loader-syntax + + + +Forbid Webpack loader syntax in imports. + +[Webpack](https://webpack.js.org) allows specifying the [loaders](https://webpack.js.org/concepts/loaders/) to use in the import source string using a special syntax like this: +```js +var moduleWithOneLoader = require("my-loader!./my-awesome-module"); +``` + +This syntax is non-standard, so it couples the code to Webpack. The recommended way to specify Webpack loader configuration is in a [Webpack configuration file](https://webpack.js.org/concepts/loaders/#configuration). + +## Rule Details + +### Fail + +```js +import myModule from 'my-loader!my-module'; +import theme from 'style!css!./theme.css'; + +var myModule = require('my-loader!./my-module'); +var theme = require('style!css!./theme.css'); +``` + +### Pass + +```js +import myModule from 'my-module'; +import theme from './theme.css'; + +var myModule = require('my-module'); +var theme = require('./theme.css'); +``` + +## When Not To Use It + +If you have a project that doesn't use Webpack you can safely disable this rule. diff --git a/docs/description/import_order.md b/docs/description/import_order.md new file mode 100644 index 000000000..e3deacaf2 --- /dev/null +++ b/docs/description/import_order.md @@ -0,0 +1,361 @@ +# import/order + +πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +Enforce a convention in the order of `require()` / `import` statements. ++(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. + +With the [`groups`](#groups-array) option set to `["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"]` the order is as shown in the following example: + +```ts +// 1. node "builtin" modules +import fs from 'fs'; +import path from 'path'; +// 2. "external" modules +import _ from 'lodash'; +import chalk from 'chalk'; +// 3. "internal" modules +// (if you have configured your path or webpack to handle your internal paths differently) +import foo from 'src/foo'; +// 4. modules from a "parent" directory +import foo from '../foo'; +import qux from '../../foo/qux'; +// 5. "sibling" modules from the same or a sibling's directory +import bar from './bar'; +import baz from './bar/baz'; +// 6. "index" of the current directory +import main from './'; +// 7. "object"-imports (only available in TypeScript) +import log = console.log; +// 8. "type" imports (only available in Flow and TypeScript) +import type { Foo } from 'foo'; +``` + +Unassigned imports are ignored, as the order they are imported in may be important. + +Statements using the ES6 `import` syntax must appear before any `require()` statements. + + +## Fail + +```ts +import _ from 'lodash'; +import path from 'path'; // `path` import should occur before import of `lodash` + +// ----- + +var _ = require('lodash'); +var path = require('path'); // `path` import should occur before import of `lodash` + +// ----- + +var path = require('path'); +import foo from './foo'; // `import` statements must be before `require` statement +``` + + +## Pass + +```ts +import path from 'path'; +import _ from 'lodash'; + +// ----- + +var path = require('path'); +var _ = require('lodash'); + +// ----- + +// Allowed as Μ€`babel-register` is not assigned. +require('babel-register'); +var path = require('path'); + +// ----- + +// Allowed as `import` must be before `require` +import foo from './foo'; +var path = require('path'); +``` + +## Options + +This rule supports the following options: + +### `groups: [array]`: + +How groups are defined, and the order to respect. `groups` must be an array of `string` or [`string`]. The only allowed `string`s are: +`"builtin"`, `"external"`, `"internal"`, `"unknown"`, `"parent"`, `"sibling"`, `"index"`, `"object"`, `"type"`. +The enforced order is the same as the order of each element in a group. Omitted types are implicitly grouped together as the last element. Example: +```ts +[ + 'builtin', // Built-in types are first + ['sibling', 'parent'], // Then sibling and parent types. They can be mingled together + 'index', // Then the index file + 'object', + // Then the rest: internal and external type +] +``` +The default value is `["builtin", "external", "parent", "sibling", "index"]`. + +You can set the options like this: + +```ts +"import/order": [ + "error", + { + "groups": [ + "index", + "sibling", + "parent", + "internal", + "external", + "builtin", + "object", + "type" + ] + } +] +``` + +### `pathGroups: [array of objects]`: + +To be able to group by paths mostly needed with aliases pathGroups can be defined. + +Properties of the objects + +| property | required | type | description | +|----------------|:--------:|--------|---------------| +| pattern | x | string | minimatch pattern for the paths to be in this group (will not be used for builtins or externals) | +| patternOptions | | object | options for minimatch, default: { nocomment: true } | +| group | x | string | one of the allowed groups, the pathGroup will be positioned relative to this group | +| position | | string | defines where around the group the pathGroup will be positioned, can be 'after' or 'before', if not provided pathGroup will be positioned like the group | + +```json +{ + "import/order": ["error", { + "pathGroups": [ + { + "pattern": "~/**", + "group": "external" + } + ] + }] +} +``` + +### `distinctGroup: [boolean]`: + +This changes how `pathGroups[].position` affects grouping. The property is most useful when `newlines-between` is set to `always` and at least 1 `pathGroups` entry has a `position` property set. + +By default, in the context of a particular `pathGroup` entry, when setting `position`, a new "group" will silently be created. That is, even if the `group` is specified, a newline will still separate imports that match that `pattern` with the rest of the group (assuming `newlines-between` is `always`). This is undesirable if your intentions are to use `position` to position _within_ the group (and not create a new one). Override this behavior by setting `distinctGroup` to `false`; this will keep imports within the same group as intended. + +Note that currently, `distinctGroup` defaults to `true`. However, in a later update, the default will change to `false` + +Example: +```json +{ + "import/order": ["error", { + "newlines-between": "always", + "pathGroups": [ + { + "pattern": "@app/**", + "group": "external", + "position": "after" + } + ], + "distinctGroup": false + }] +} +``` + +### `pathGroupsExcludedImportTypes: [array]`: + +This defines import types that are not handled by configured pathGroups. +This is mostly needed when you want to handle path groups that look like external imports. + +Example: +```json +{ + "import/order": ["error", { + "pathGroups": [ + { + "pattern": "@app/**", + "group": "external", + "position": "after" + } + ], + "pathGroupsExcludedImportTypes": ["builtin"] + }] +} +``` + +You can also use `patterns`(e.g., `react`, `react-router-dom`, etc). + +Example: +```json +{ + "import/order": [ + "error", + { + "pathGroups": [ + { + "pattern": "react", + "group": "builtin", + "position": "before" + } + ], + "pathGroupsExcludedImportTypes": ["react"] + } + ] +} +``` +The default value is `["builtin", "external", "object"]`. + +### `newlines-between: [ignore|always|always-and-inside-groups|never]`: + +Enforces or forbids new lines between import groups: + +- If set to `ignore`, no errors related to new lines between import groups will be reported. +- If set to `always`, at least one new line between each group will be enforced, and new lines inside a group will be forbidden. To prevent multiple lines between imports, core `no-multiple-empty-lines` rule can be used. +- If set to `always-and-inside-groups`, it will act like `always` except newlines are allowed inside import groups. +- If set to `never`, no new lines are allowed in the entire import section. + +The default value is `"ignore"`. + +With the default group setting, the following will be invalid: + +```ts +/* eslint import/order: ["error", {"newlines-between": "always"}] */ +import fs from 'fs'; +import path from 'path'; +import index from './'; +import sibling from './foo'; +``` + +```ts +/* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */ +import fs from 'fs'; + +import path from 'path'; +import index from './'; +import sibling from './foo'; +``` + +```ts +/* eslint import/order: ["error", {"newlines-between": "never"}] */ +import fs from 'fs'; +import path from 'path'; + +import index from './'; + +import sibling from './foo'; +``` + +while those will be valid: + +```ts +/* eslint import/order: ["error", {"newlines-between": "always"}] */ +import fs from 'fs'; +import path from 'path'; + +import index from './'; + +import sibling from './foo'; +``` + +```ts +/* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */ +import fs from 'fs'; + +import path from 'path'; + +import index from './'; + +import sibling from './foo'; +``` + +```ts +/* eslint import/order: ["error", {"newlines-between": "never"}] */ +import fs from 'fs'; +import path from 'path'; +import index from './'; +import sibling from './foo'; +``` + +### `alphabetize: {order: asc|desc|ignore, orderImportKind: asc|desc|ignore, caseInsensitive: true|false}`: + +Sort the order within each group in alphabetical manner based on **import path**: + +- `order`: use `asc` to sort in ascending order, and `desc` to sort in descending order (default: `ignore`). +- `orderImportKind`: use `asc` to sort in ascending order various import kinds, e.g. imports prefixed with `type` or `typeof`, with same import path. Use `desc` to sort in descending order (default: `ignore`). +- `caseInsensitive`: use `true` to ignore case, and `false` to consider case (default: `false`). + +Example setting: +```ts +alphabetize: { + order: 'asc', /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */ + caseInsensitive: true /* ignore case. Options: [true, false] */ +} +``` + +This will fail the rule check: + +```ts +/* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */ +import React, { PureComponent } from 'react'; +import aTypes from 'prop-types'; +import { compose, apply } from 'xcompose'; +import * as classnames from 'classnames'; +import blist from 'BList'; +``` + +While this will pass: + +```ts +/* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */ +import blist from 'BList'; +import * as classnames from 'classnames'; +import aTypes from 'prop-types'; +import React, { PureComponent } from 'react'; +import { compose, apply } from 'xcompose'; +``` + +### `warnOnUnassignedImports: true|false`: + +* default: `false` + +Warns when unassigned imports are out of order. These warning will not be fixed +with `--fix` because unassigned imports are used for side-effects and changing the +import of order of modules with side effects can not be done automatically in a +way that is safe. + +This will fail the rule check: + +```ts +/* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */ +import fs from 'fs'; +import './styles.css'; +import path from 'path'; +``` + +While this will pass: + +```ts +/* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */ +import fs from 'fs'; +import path from 'path'; +import './styles.css'; +``` + +## Related + +- [`import/external-module-folders`] setting + +- [`import/internal-regex`] setting + +[`import/external-module-folders`]: ../../README.md#importexternal-module-folders + +[`import/internal-regex`]: ../../README.md#importinternal-regex diff --git a/docs/description/import_prefer-default-export.md b/docs/description/import_prefer-default-export.md new file mode 100644 index 000000000..5d335f4c1 --- /dev/null +++ b/docs/description/import_prefer-default-export.md @@ -0,0 +1,186 @@ +# import/prefer-default-export + + + +In exporting files, this rule checks if there is default export or not. + +## Rule Details + +##### rule schema: + +```javascript +"import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "single" | "any" } // default is "single" +] +``` + +### Config Options + +There are two options available: `single` and `any`. By default, if you do not specify the option, rule will assume it is `single`. + +#### single + +**Definition**: When there is only a single export from a module, prefer using default export over named export. + +How to setup config file for this rule: + +```javascript +// you can manually specify it +"rules": { + "import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "single" } + ] +} + +// config setup below will also work +"rules": { + "import/prefer-default-export": "off" | "warn" | "error" +} +``` + +The following patterns are considered warnings: + +```javascript +// bad.js + +// There is only a single module export and it's a named export. +export const foo = 'foo'; + +``` + +The following patterns are not warnings: + +```javascript +// good1.js + +// There is a default export. +export const foo = 'foo'; +const bar = 'bar'; +export default bar; +``` + +```javascript +// good2.js + +// There is more than one named export in the module. +export const foo = 'foo'; +export const bar = 'bar'; +``` + +```javascript +// good3.js + +// There is more than one named export in the module +const foo = 'foo'; +const bar = 'bar'; +export { foo, bar } +``` + +```javascript +// good4.js + +// There is a default export. +const foo = 'foo'; +export { foo as default } +``` + +```javascript +// export-star.js + +// Any batch export will disable this rule. The remote module is not inspected. +export * from './other-module' +``` + +#### any + +**Definition**: any exporting file must contain a default export. + +How to setup config file for this rule: + +```javascript +// you have to manually specify it +"rules": { + "import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "any" } + ] +} +``` + + +The following patterns are *not* considered warnings: + +```javascript +// good1.js + +//has default export +export default function bar() {}; +``` + +```javascript +// good2.js + +// has default export +let foo; +export { foo as default } +``` + +```javascript +// good3.js + +//contains multiple exports AND default export +export const a = 5; +export function bar(){}; +let foo; +export { foo as default } +``` + +```javascript +// good4.js + +// does not contain any exports => file is not checked by the rule +import * as foo from './foo';ο»Ώ +``` + +```javascript +// export-star.js + +// Any batch export will disable this rule. The remote module is not inspected. +export * from './other-module' +``` + +The following patterns are considered warnings: + +```javascript +// bad1.js + +//has 2 named exports, but no default export +export const foo = 'foo'; +export const bar = 'bar'; +``` + +```javascript +// bad2.js + +// does not have default export +let foo, bar; +export { foo, bar } +``` + +```javascript +// bad3.js + +// does not have default export +export { a, b } from "foo.js"ο»Ώ +``` + +```javascript +// bad4.js + +// does not have default export +let item; +export const foo = item; +export { item }; +``` diff --git a/docs/description/import_unambiguous.md b/docs/description/import_unambiguous.md new file mode 100644 index 000000000..da77a7453 --- /dev/null +++ b/docs/description/import_unambiguous.md @@ -0,0 +1,56 @@ +# import/unambiguous + + + +Warn if a `module` could be mistakenly parsed as a `script` by a consumer leveraging +[Unambiguous JavaScript Grammar] to determine correct parsing goal. + +Will respect the [`parserOptions.sourceType`] from ESLint config, i.e. files parsed +as `script` per that setting will not be reported. + +This plugin uses [Unambiguous JavaScript Grammar] internally to decide whether +dependencies should be parsed as modules and searched for exports matching the +`import`ed names, so it may be beneficial to keep this rule on even if your application +will run in an explicit `module`-only environment. + +## Rule Details + +For files parsed as `module` by ESLint, the following are valid: + +```js +import 'foo' +function x() { return 42 } +``` + +```js +export function x() { return 42 } +``` + +```js +(function x() { return 42 })() +export {} // simple way to mark side-effects-only file as 'module' without any imports/exports +``` + +...whereas the following file would be reported: +```js +(function x() { return 42 })() +``` + +## When Not To Use It + +If your application environment will always know via [some other means](https://github.com/nodejs/node-eps/issues/13) +how to parse, regardless of syntax, you may not need this rule. + +Remember, though, that this plugin uses this strategy internally, so if you were +to `import` from a module with no `import`s or `export`s, this plugin would not +report it as it would not be clear whether it should be considered a `script` or +a `module`. + +## Further Reading + +- [Unambiguous JavaScript Grammar] +- [`parserOptions.sourceType`] +- [node-eps#13](https://github.com/nodejs/node-eps/issues/13) + +[`parserOptions.sourceType`]: https://eslint.org/docs/user-guide/configuring#specifying-parser-options +[Unambiguous JavaScript Grammar]: https://github.com/nodejs/node-eps/blob/HEAD/002-es-modules.md#32-determining-if-source-is-an-es-module diff --git a/docs/description/jsdoc_match-description.md b/docs/description/jsdoc_match-description.md index a2f02187b..ebbd9beaa 100644 --- a/docs/description/jsdoc_match-description.md +++ b/docs/description/jsdoc_match-description.md @@ -89,8 +89,6 @@ some content: - `@example` - `@see` - `@todo` -- `@throws`/`@exception` -- `@yields`/`@yield` If you supply your own tag description for any of the above tags in `tags`, your description will take precedence. diff --git a/docs/description/max-len.md b/docs/description/max-len.md index be883a8ca..eabd3efc4 100644 --- a/docs/description/max-len.md +++ b/docs/description/max-len.md @@ -22,7 +22,7 @@ This rule enforces a maximum line length to increase code readability and mainta ## Options -This rule has a number or object option: +This rule can have up to two numbers as positional arguments (for `code` and `tabWidth` options), followed by an object option (provided positional arguments have priority): * `"code"` (default `80`) enforces a maximum line length * `"tabWidth"` (default `4`) specifies the character width for tab characters diff --git a/docs/description/no-extra-parens.md b/docs/description/no-extra-parens.md index dd2b46420..0476e6280 100644 --- a/docs/description/no-extra-parens.md +++ b/docs/description/no-extra-parens.md @@ -52,6 +52,7 @@ This rule has an object option for exceptions to the `"all"` option: * `"conditionalAssign": false` allows extra parentheses around assignments in conditional test expressions * `"returnAssign": false` allows extra parentheses around assignments in `return` statements * `"nestedBinaryExpressions": false` allows extra parentheses in nested binary expressions +* `"ternaryOperandBinaryExpressions": false` allows extra parentheses around binary expressions that are operands of ternary `?:` * `"ignoreJSX": "none|all|multi-line|single-line"` allows extra parentheses around no/all/multi-line/single-line JSX components. Defaults to `none`. * `"enforceForArrowConditionals": false` allows extra parentheses around ternary expressions which are the body of an arrow function * `"enforceForSequenceExpressions": false` allows extra parentheses around sequence expressions @@ -189,6 +190,26 @@ x = (a * b) / c; ::: +### ternaryOperandBinaryExpressions + +Examples of **correct** code for this rule with the `"all"` and `{ "ternaryOperandBinaryExpressions": false }` options: + +::: correct + +```js +/* eslint no-extra-parens: ["error", "all", { "ternaryOperandBinaryExpressions": false }] */ + +(a && b) ? foo : bar; + +(a - b > a) ? foo : bar; + +foo ? (bar || baz) : qux; + +foo ? bar : (baz || qux); +``` + +::: + ### ignoreJSX Examples of **correct** code for this rule with the `all` and `{ "ignoreJSX": "all" }` options: diff --git a/docs/description/vue_no-use-v-if-with-v-for.md b/docs/description/vue_no-use-v-if-with-v-for.md index 4e93ea46a..49535f2c1 100644 --- a/docs/description/vue_no-use-v-if-with-v-for.md +++ b/docs/description/vue_no-use-v-if-with-v-for.md @@ -2,12 +2,12 @@ pageClass: rule-details sidebarDepth: 0 title: vue/no-use-v-if-with-v-for -description: disallow use v-if on the same element as v-for +description: disallow using `v-if` on the same element as `v-for` since: v4.6.0 --- # vue/no-use-v-if-with-v-for -> disallow use v-if on the same element as v-for +> disallow using `v-if` on the same element as `v-for` - :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`. @@ -88,6 +88,10 @@ There are two common cases where this can be tempting: +## :couple: Related Rules + +- [vue/no-use-v-else-with-v-for](./no-use-v-else-with-v-for.md) + ## :books: Further Reading - [Style guide - Avoid v-if with v-for](https://vuejs.org/style-guide/rules-essential.html#avoid-v-if-with-v-for) diff --git a/docs/multiple-tests/all-patterns-typescript/patterns.xml b/docs/multiple-tests/all-patterns-typescript/patterns.xml index f584074b8..ebe2f28e5 100644 --- a/docs/multiple-tests/all-patterns-typescript/patterns.xml +++ b/docs/multiple-tests/all-patterns-typescript/patterns.xml @@ -398,7 +398,6 @@ - @@ -1013,6 +1012,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/multiple-tests/all-patterns-typescript/results.xml b/docs/multiple-tests/all-patterns-typescript/results.xml index b0f213a01..f5667dffe 100644 --- a/docs/multiple-tests/all-patterns-typescript/results.xml +++ b/docs/multiple-tests/all-patterns-typescript/results.xml @@ -38,6 +38,7 @@ + diff --git a/docs/multiple-tests/all-patterns/patterns.xml b/docs/multiple-tests/all-patterns/patterns.xml index f584074b8..ebe2f28e5 100644 --- a/docs/multiple-tests/all-patterns/patterns.xml +++ b/docs/multiple-tests/all-patterns/patterns.xml @@ -398,7 +398,6 @@ - @@ -1013,6 +1012,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/multiple-tests/all-patterns/results.xml b/docs/multiple-tests/all-patterns/results.xml index 1299166c7..9dc812c45 100644 --- a/docs/multiple-tests/all-patterns/results.xml +++ b/docs/multiple-tests/all-patterns/results.xml @@ -38,6 +38,7 @@ + diff --git a/docs/multiple-tests/blacklist-patterns/results.xml b/docs/multiple-tests/blacklist-patterns/results.xml index bc4a25948..3b2977ac7 100644 --- a/docs/multiple-tests/blacklist-patterns/results.xml +++ b/docs/multiple-tests/blacklist-patterns/results.xml @@ -1,3 +1,6 @@ + + + diff --git a/docs/multiple-tests/react-without-config/results.xml b/docs/multiple-tests/react-without-config/results.xml index a732b2bff..914622cc2 100644 --- a/docs/multiple-tests/react-without-config/results.xml +++ b/docs/multiple-tests/react-without-config/results.xml @@ -1,9 +1,10 @@ - - - - - - + + + + + + + diff --git a/docs/patterns.json b/docs/patterns.json index 4579f4e71..78135ceb4 100644 --- a/docs/patterns.json +++ b/docs/patterns.json @@ -1,6 +1,6 @@ { "name": "eslint-8", - "version": "8.43.0", + "version": "8.44.0", "patterns": [ { "patternId": "accessor-pairs", @@ -3756,34 +3756,6 @@ "parameters": [], "enabled": false }, - { - "patternId": "@typescript-eslint_indent", - "level": "Info", - "category": "CodeStyle", - "parameters": [ - { - "name": "unnamedParam", - "default": 2 - }, - { - "name": "SwitchCase", - "default": 0 - }, - { - "name": "flatTernaryExpressions", - "default": false - }, - { - "name": "offsetTernaryExpressions", - "default": false - }, - { - "name": "ignoreComments", - "default": false - } - ], - "enabled": false - }, { "patternId": "@typescript-eslint_init-declarations", "level": "Info", @@ -8360,6 +8332,288 @@ "parameters": [], "enabled": true }, + { + "patternId": "import_no-unresolved", + "level": "Info", + "category": "CodeStyle", + "parameters": [ + { + "name": "caseSensitive", + "default": true + }, + { + "name": "caseSensitiveStrict", + "default": false + } + ], + "enabled": false + }, + { + "patternId": "import_no-namespace", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_export", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-mutable-exports", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_extensions", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-restricted-paths", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-internal-modules", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_group-exports", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-relative-packages", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-relative-parent-imports", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_consistent-type-specifier-style", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-self-import", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": true + }, + { + "patternId": "import_no-named-default", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-anonymous-default-export", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-commonjs", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-amd", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-duplicates", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_first", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_max-dependencies", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-extraneous-dependencies", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-absolute-path", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-nodejs-modules", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-webpack-loader-syntax", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_order", + "level": "Info", + "category": "CodeStyle", + "parameters": [ + { + "name": "distinctGroup", + "default": true + }, + { + "name": "warnOnUnassignedImports", + "default": false + } + ], + "enabled": false + }, + { + "patternId": "import_newline-after-import", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_prefer-default-export", + "level": "Info", + "category": "CodeStyle", + "parameters": [ + { + "name": "target", + "default": "single" + } + ], + "enabled": false + }, + { + "patternId": "import_no-default-export", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-named-export", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-dynamic-require", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_unambiguous", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-unassigned-import", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-useless-path-segments", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_dynamic-import-chunkname", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_no-import-module-exports", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": true + }, + { + "patternId": "import_no-empty-named-blocks", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_exports-last", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, + { + "patternId": "import_imports-first", + "level": "Info", + "category": "CodeStyle", + "parameters": [], + "enabled": false + }, { "patternId": "import-alias_import-alias", "level": "Error", diff --git a/package-lock.json b/package-lock.json index 0f040b838..2c8850f06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,22 +40,22 @@ "@nrwl/nx-cloud": "^16.0.5", "@nuxtjs/eslint-config": "^12.0.0", "@nuxtjs/eslint-config-typescript": "^12.0.0", - "@nx/cypress": "^16.4.0", - "@nx/devkit": "^16.4.0", - "@nx/eslint-plugin": "^16.4.0", - "@nx/express": "^16.4.0", - "@nx/jest": "^16.4.0", - "@nx/linter": "^16.4.0", - "@nx/nest": "^16.4.0", - "@nx/next": "^16.4.0", - "@nx/node": "^16.4.0", - "@nx/react": "^16.4.0", - "@nx/storybook": "^16.4.0", - "@nx/web": "^16.4.0", - "@nx/workspace": "^16.4.0", + "@nx/cypress": "^16.4.2", + "@nx/devkit": "^16.4.2", + "@nx/eslint-plugin": "^16.4.2", + "@nx/express": "^16.4.2", + "@nx/jest": "^16.4.2", + "@nx/linter": "^16.4.2", + "@nx/nest": "^16.4.2", + "@nx/next": "^16.4.2", + "@nx/node": "^16.4.2", + "@nx/react": "^16.4.2", + "@nx/storybook": "^16.4.2", + "@nx/web": "^16.4.2", + "@nx/workspace": "^16.4.2", "@prodigy/eslint-config-prodigy": "^0.0.7", "@react-native-community/eslint-config": "^3.2.0", - "@remix-run/eslint-config": "^1.18.0", + "@remix-run/eslint-config": "^1.18.1", "@salesforce/eslint-config-lwc": "^3.5.0", "@salesforce/eslint-plugin-aura": "^2.1.0", "@salesforce/eslint-plugin-lightning": "^1.0.0", @@ -66,12 +66,12 @@ "@tailwindcss/line-clamp": "^0.4.4", "@tanstack/eslint-plugin-query": "^4.29.9", "@teambit/eslint-config-bit-react": "^0.0.367", - "@teambit/react.eslint-config-bit-react": "^0.0.806", + "@teambit/react.eslint-config-bit-react": "^0.0.808", "@types/eslint": "^8.40.2", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.5.2", "@types/mocha": "^10.0.1", - "@types/node": "^18.16.18", + "@types/node": "^18.16.19", "@types/node-fetch": "^2.6.4", "@types/simple-mock": "^0.8.2", "@typescript-eslint/eslint-plugin": "^5.60.1", @@ -98,7 +98,7 @@ "codacy-seed": "^2.2.0", "confusing-browser-globals": "^1.0.11", "dotenv-webpack": "^8.0.1", - "eslint": "^8.43.0", + "eslint": "^8.44.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", @@ -130,11 +130,11 @@ "eslint-config-standard": "^17.1.0", "eslint-config-standard-jsx": "^11.0.0", "eslint-config-standard-react": "^13.0.0", - "eslint-config-standard-with-typescript": "^35.0.0", + "eslint-config-standard-with-typescript": "^36.0.0", "eslint-config-strongloop": "^2.1.0", "eslint-config-ts-important-stuff": "^1.1.0", "eslint-config-ts-react-important-stuff": "^3.0.0", - "eslint-config-turbo": "^1.10.6", + "eslint-config-turbo": "^1.10.7", "eslint-config-universe": "^11.3.0", "eslint-config-vue": "^2.0.2", "eslint-config-winedirect": "^1.1.0", @@ -179,14 +179,14 @@ "eslint-plugin-i18next": "^6.0.3", "eslint-plugin-import": "^2.27.5", "eslint-plugin-import-alias": "^1.2.0", - "eslint-plugin-import-newlines": "^1.3.1", + "eslint-plugin-import-newlines": "^1.3.3", "eslint-plugin-jasmine": "^4.1.3", "eslint-plugin-jest": "^27.2.2", "eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-jest-extended": "^2.0.0", "eslint-plugin-jest-formatting": "^3.1.0", "eslint-plugin-jira-ticket-todo-comment": "^1.0.4", - "eslint-plugin-jsdoc": "^46.4.2", + "eslint-plugin-jsdoc": "^46.4.3", "eslint-plugin-json": "^3.1.0", "eslint-plugin-jsonc": "^2.9.0", "eslint-plugin-jsx": "^0.1.0", @@ -236,12 +236,12 @@ "eslint-plugin-test-selectors": "^2.0.4", "eslint-plugin-testing-library": "^5.11.0", "eslint-plugin-tsdoc": "^0.2.17", - "eslint-plugin-turbo": "^1.10.3", + "eslint-plugin-turbo": "^1.10.7", "eslint-plugin-typescript-sort-keys": "^2.3.0", "eslint-plugin-unicorn": "^47.0.0", "eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-vue": "^9.15.1", - "eslint-plugin-vue-scoped-css": "^2.4.0", + "eslint-plugin-vue-scoped-css": "^2.5.0", "eslint-plugin-vuejs-accessibility": "^2.1.0", "eslint-plugin-wdio": "^8.0.14", "eslint-plugin-xss": "^0.1.12", @@ -257,14 +257,14 @@ "mini-css-extract-plugin": "^2.7.6", "mocha": "^10.2.0", "next": "^13.4.7", - "node-fetch": "^2.6.11", + "node-fetch": "^2.6.12", "npm": "^9.7.2", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.3.0", "react-hot-loader": "^4.13.1", "redux-saga": "^1.2.3", "simple-mock": "^0.8.0", - "sort-package-json": "^2.4.1", + "sort-package-json": "^2.5.0", "source-map-support": "^0.5.21", "standard": "^17.1.0", "stylelint-config-idiomatic-order": "^9.0.0", @@ -436,6 +436,14 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -3683,13 +3691,13 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -3786,9 +3794,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", - "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -7277,83 +7285,83 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nrwl/cypress": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/cypress/-/cypress-16.4.0.tgz", - "integrity": "sha512-3xkbwfFF8RUKcXY39Mj7Eu8QIqkW3i+tDTibMLltNaOTqS58FPRU0j/VbwWJEsKjDF0HSCqH+t0ApjZD3fHmdw==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/cypress/-/cypress-16.4.2.tgz", + "integrity": "sha512-gxQOcfUeU1irM8zRGi6RlMqrzBxV1WapUPYAN+nirPnyl0YoyjbMchjQIO9ZwvHuwDPHYjxYBOqnzmxMHotPew==", "dependencies": { - "@nx/cypress": "16.4.0" + "@nx/cypress": "16.4.2" } }, "node_modules/@nrwl/devkit": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.4.0.tgz", - "integrity": "sha512-KUu9oNrMB8DP78BAO8XWJC5HOSS6dO6ocMWj2DtuNVgMgABviy+ih/TmrGKxQQBH0Ib4cxTeMIQVRdAak5c1UA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.4.2.tgz", + "integrity": "sha512-joT3zkEgyiAbPU4fySv32+bKSdI92mY7QIkdM3I/urgh7f4ztMx6vens+dGwW+rVEfHK23r0zuvx77VkoMg6iQ==", "dependencies": { - "@nx/devkit": "16.4.0" + "@nx/devkit": "16.4.2" } }, "node_modules/@nrwl/eslint-plugin-nx": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-16.4.0.tgz", - "integrity": "sha512-oS2ZbmdmuFPENT2jjK86nmhc6fr3J0AESH2RcimHAEId685h1HC3aEVrk0Fw0tnSb8O6x8yJuJ9KVwYy2yFbNw==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-16.4.2.tgz", + "integrity": "sha512-HfOWWx8o7Tl8+WWPFKAqBF9v0KgUDONUCPeBb6Vq9k9SCHORvl25kwLoAsdMuphxUuV2EHj+qUeR0p+1vtuzAQ==", "dependencies": { - "@nx/eslint-plugin": "16.4.0" + "@nx/eslint-plugin": "16.4.2" } }, "node_modules/@nrwl/express": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/express/-/express-16.4.0.tgz", - "integrity": "sha512-YO6qNdhOalfniHVTBW6dTuYDg5b3TmMuLpluJrNSNCHXZf48PzDXeB/r+OZT/MzkZkNBugWi/RYHG+FjZSnYCw==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/express/-/express-16.4.2.tgz", + "integrity": "sha512-W/Ioj8JO/oSl9wPtYWGBqTCNNV9H4ZUyMIwWwqJsbsCnMPSrVqixMr5llB83SrIhVLbW/3O5ALFScVsW20AUEg==", "dependencies": { - "@nx/express": "16.4.0" + "@nx/express": "16.4.2" } }, "node_modules/@nrwl/jest": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-16.4.0.tgz", - "integrity": "sha512-/UlZNC/e80p0X5fKkc5yeaG8b4sYwQLtUsjy+ZZF403cx2gwWLbcGTXmuPbkR4377j8nyKdyFwNXqYureGwg3Q==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/jest/-/jest-16.4.2.tgz", + "integrity": "sha512-660C9GaXT+yBwdmN3/UogxUZaECxZpX5QpfvFO25q3wT99E5BmM90mbELQXlnHoSframI5wPlM/xaDHeK0qJrg==", "dependencies": { - "@nx/jest": "16.4.0" + "@nx/jest": "16.4.2" } }, "node_modules/@nrwl/js": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-16.4.0.tgz", - "integrity": "sha512-8q7uOoPWVDKxTb4Vveo2aS1ULRhE+NTQfcXRsDUINKUaIHN60dkinpcuBJHQqKdeXgi/5kIM4ht9vJ7ctQ0tCw==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-16.4.2.tgz", + "integrity": "sha512-sOB+2MBLkYsX3Sk4g1IZSc9bK8kM4ZuZ6zjmQVv9M4DYlph5aPHorZOcN4vR/s+ZMWzK0aZLjSq5JAEU0VJYKw==", "dependencies": { - "@nx/js": "16.4.0" + "@nx/js": "16.4.2" } }, "node_modules/@nrwl/linter": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-16.4.0.tgz", - "integrity": "sha512-Difx1XkTmeTRg+EhU5JCAMeL3gZotVFvhUvQ6Vevmk6Xuj5Pp5LAGAxTj3P2O3A60UTb28ANPtjqD/DztJDTfA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-16.4.2.tgz", + "integrity": "sha512-QKR964hp1jiNZqrLRaDHueeSCwZxn6wJLXrQRLH5zyePyTBNIuR1s8xH1W1bU1wGmXC6rbBjF6QNaT+nl7RdwQ==", "dependencies": { - "@nx/linter": "16.4.0" + "@nx/linter": "16.4.2" } }, "node_modules/@nrwl/nest": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/nest/-/nest-16.4.0.tgz", - "integrity": "sha512-x6psWUTTPwJJYegch7xUp1K4ZB9ZegnwqEpGu3MMDRMFpB5Rj99POQz2FA2dgvMcEZBhgnZJSTXLNbgb+EC1/Q==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/nest/-/nest-16.4.2.tgz", + "integrity": "sha512-MSrUeFOwjXLKpY1mzzF+JUxvHTNKwld1l2iO21J36aCJCebtjhNkd64/uIcw2iFSSmkNR/8KEDgmQtOr56dGOA==", "dependencies": { - "@nx/nest": "16.4.0" + "@nx/nest": "16.4.2" } }, "node_modules/@nrwl/next": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/next/-/next-16.4.0.tgz", - "integrity": "sha512-XBJdnUi0UR03G0aphf+ThxiDKnwlL3wBItUcUMODogDCGy1uVwwtD39tNRZ5Oz7d0WLtK+8xhaODu/13a4tyaQ==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/next/-/next-16.4.2.tgz", + "integrity": "sha512-Y6wGd+Gl8DChDD+WVO2cjnoLbYlHzAj8+eZTLC5MZMWoAm0SOGRCxnMmtkAAI6hX/LIzJFw76sQdc1hvt1jgDg==", "dependencies": { - "@nx/next": "16.4.0" + "@nx/next": "16.4.2" } }, "node_modules/@nrwl/node": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/node/-/node-16.4.0.tgz", - "integrity": "sha512-TMFdqpPdyUI8fevGpUm1B/Hr9Qniq/nXCPl2yNS5vOvsZU7G7RUPADwxKFySWnqp7Ls0YL+1a4CNR/b2yn+NoA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/node/-/node-16.4.2.tgz", + "integrity": "sha512-XsJhNWZXu62P176kFxF7AXxEhvcD4LJoSz2aNlR//2WKrsDtayg5HvE7zJGs/QS08bxHTBVIBc3UqIqipb/wkg==", "dependencies": { - "@nx/node": "16.4.0" + "@nx/node": "16.4.2" } }, "node_modules/@nrwl/nx-cloud": { @@ -7500,19 +7508,19 @@ } }, "node_modules/@nrwl/react": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/react/-/react-16.4.0.tgz", - "integrity": "sha512-qDMxBEdYjpHmARIDsz370vqChBLZCsppva59v0wOTNvv6AD2OdgwnGbO72JrsA8xqjFpDjXyaaGQPDLZzxP58A==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/react/-/react-16.4.2.tgz", + "integrity": "sha512-LuiSnHyCzKyerwuDkzb6yMp7eVu794KcHzMhrdIjlufVEdgUgjUWsois2PZ1/6B2Yxjpkwmxv92L44CAEjqq8Q==", "dependencies": { - "@nx/react": "16.4.0" + "@nx/react": "16.4.2" } }, "node_modules/@nrwl/storybook": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/storybook/-/storybook-16.4.0.tgz", - "integrity": "sha512-5g0sGa7DB6NfJ06wf5TV6h64cI5wTlzEAERj3nTTO1852aLvCfPOxE/T96vv82vH0bAK/9fQsaYwYvTTfILY2Q==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/storybook/-/storybook-16.4.2.tgz", + "integrity": "sha512-h64+KsH2YPEWhQ29pH9MhPQl/GnaoZnYrQEYpGJ0v+lz/mvt9CsQ9NUa3YUxSosoG7cVdfUuiHT9hxibG19AZg==", "dependencies": { - "@nx/storybook": "16.4.0" + "@nx/storybook": "16.4.2" } }, "node_modules/@nrwl/tao": { @@ -7527,19 +7535,19 @@ } }, "node_modules/@nrwl/web": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/web/-/web-16.4.0.tgz", - "integrity": "sha512-Eb4LRlRObMaQlgPkK5qCVzyIxuH+4XyPP+kkwE6WmtO0Wozse0Z5hbZAIj7kzo1f8xr5FbCX7Do6yK2ILSItEA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/web/-/web-16.4.2.tgz", + "integrity": "sha512-WgD6G+Cl54/RywzYTnphQCQuNdDrGGdivcyd3AZey9yA1Avvi/CI5+mU75pQAMrqsb2oxylZVk6lnN5iLJcAwA==", "dependencies": { - "@nx/web": "16.4.0" + "@nx/web": "16.4.2" } }, "node_modules/@nrwl/workspace": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-16.4.0.tgz", - "integrity": "sha512-iu2GgzoEQYn7IzJe2m69YqftajFJpce5jcE5d6OV2Idgq228Lb0j7aCw4W4fK7bsCeqZGhVGpiBjE+Cyw1GxGw==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-16.4.2.tgz", + "integrity": "sha512-FftJH0sBPcC27YSqRjgKjfusCjTCVfh/QxkyWXEqqlLqhSSFZaYlAsJM1LBeEfOd8EKDaSSM+G3heq//jYBfBQ==", "dependencies": { - "@nx/workspace": "16.4.0" + "@nx/workspace": "16.4.2" } }, "node_modules/@nuxtjs/eslint-config": { @@ -7645,14 +7653,14 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/cypress": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/cypress/-/cypress-16.4.0.tgz", - "integrity": "sha512-B0IouuC22atN+qucr8AVbyJZ0OgGkrHTLqoF6E6NNQOX5fHkcEGLwsFfRkkCa+QV/HuB+Vs9BQRQyqpb+G3Ogw==", - "dependencies": { - "@nrwl/cypress": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/cypress/-/cypress-16.4.2.tgz", + "integrity": "sha512-h9y/o5NmtKK5J/x/5jOMHcWi1bZDPKEyDaKn+uYKXL2alkjItm632sK+ZCCENJGGUMqcoyB5EuKFbTvxWb8gOg==", + "dependencies": { + "@nrwl/cypress": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "detect-port": "^1.5.1", "dotenv": "~10.0.0", @@ -7698,11 +7706,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/devkit": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.4.0.tgz", - "integrity": "sha512-/Y+tC2IBxVEf3EKB80G9mF27ZBAFEBBmDMn1MPzfGX9AB2GGNCqgvSkSHT5DlkyxJOMqbE7DpMyHxubALyenEA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.4.2.tgz", + "integrity": "sha512-THg3H/HKsE/o+KffT8BGMADLh3mlGMQvN+Tg60QMEBOWzzVAZRUAs+9LQX5MHOGh88jP9fjb+c4UrShQ2e5w8g==", "dependencies": { - "@nrwl/devkit": "16.4.0", + "@nrwl/devkit": "16.4.2", "ejs": "^3.1.7", "ignore": "^5.0.4", "semver": "7.5.3", @@ -7744,13 +7752,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/eslint-plugin": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-16.4.0.tgz", - "integrity": "sha512-5+IYjlcxdX6oKwJgQ9m8t8vW8ZHhP40hd4Ws9nndJ4SXRoUqA/GXyxHGjIfMfeKzYBllGB1jM17Br2AILi/9hA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-16.4.2.tgz", + "integrity": "sha512-Nee91lmFuq5cs148DqVIwnylamuKySnmVIIV2WMxivQUP0V/Nh/0JZOq5ZTjk/rrA8v+0AznMSLCsC9KkGGmBA==", "dependencies": { - "@nrwl/eslint-plugin-nx": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", + "@nrwl/eslint-plugin-nx": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", "@typescript-eslint/type-utils": "^5.58.0", "@typescript-eslint/utils": "^5.58.0", "chalk": "^4.1.0", @@ -7863,13 +7871,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/express": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/express/-/express-16.4.0.tgz", - "integrity": "sha512-TkmSMYYHrjwBD5bfaWxbrneNDlfYLBgzbdE2l6REQe/5mfvFgphra6n5VBPRUVMo0d4A3ly89e2AqQmG/SE3bA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/express/-/express-16.4.2.tgz", + "integrity": "sha512-BhUaM/wiPNVtugkEb5KY3YTVcgkGEkv+bchAbzHwAnJmoHO1f2VS3WFIcnbaRacXq7vRj0Q6QuuhTwgSxhfBBw==", "dependencies": { - "@nrwl/express": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/node": "16.4.0" + "@nrwl/express": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/node": "16.4.2" }, "peerDependencies": { "express": "^4.18.1" @@ -7881,15 +7889,15 @@ } }, "node_modules/@nx/jest": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/jest/-/jest-16.4.0.tgz", - "integrity": "sha512-ns2l3ww1ppGRVw5ngW6GWzTeouDqtfzO2ZjixZ8mq46IDHrMeuBrS1W5L6C1gWtKo3HDdlnaWcDj6RZtUw5UPA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/jest/-/jest-16.4.2.tgz", + "integrity": "sha512-P4Pw8v/a+SRzP9fpbyLGcUoBt5pbcUJTQsUDTUulMHBpVCYGaH4Z7BKld9ygHD9DUcdHX1aMWQc6NMOJZBFbRQ==", "dependencies": { "@jest/reporters": "^29.4.1", "@jest/test-result": "^29.4.1", - "@nrwl/jest": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", + "@nrwl/jest": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "chalk": "^4.1.0", "dotenv": "~10.0.0", @@ -7966,9 +7974,9 @@ } }, "node_modules/@nx/js": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/js/-/js-16.4.0.tgz", - "integrity": "sha512-yIxVv4B2DF4XFgkZ1UvUiXtk9o62wTRc0MzScgnoeqir/J9do+YR9pCIDVQEThBOROKdIFjlhQ/CEz5JhiRLEQ==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-16.4.2.tgz", + "integrity": "sha512-l8D88fIOfIttyDOQpNqxUWzBAwX5pEHAP1QJAl6FRToQq+iDcwgun2IMaKnt48M6GG2SGNqdhFLRyFY2NME13A==", "dependencies": { "@babel/core": "^7.15.0", "@babel/plugin-proposal-class-properties": "^7.14.5", @@ -7977,9 +7985,9 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@babel/runtime": "^7.14.8", - "@nrwl/js": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/workspace": "16.4.0", + "@nrwl/js": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/workspace": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "babel-plugin-const-enum": "^1.0.1", "babel-plugin-macros": "^2.8.0", @@ -8136,13 +8144,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/linter": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-16.4.0.tgz", - "integrity": "sha512-YFfHQMHWUBfGr6jAKXhqTH25Qnq86+h1hgrGxEwB+5n0YndDGhwlBFqoE368tVGJ1YDtXnK+kSegEu7HB2h9OQ==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-16.4.2.tgz", + "integrity": "sha512-h30yGTOZWs2s4uig4Odkymm20VoiFt3oWKuK4AJ2WHOJmWJ40wfOv2HZJO94Al7CuoBdI/GRIJddX/snVDYgKQ==", "dependencies": { - "@nrwl/linter": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", + "@nrwl/linter": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "tmp": "~0.2.1", "tslib": "^2.3.0" @@ -8157,33 +8165,33 @@ } }, "node_modules/@nx/nest": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nest/-/nest-16.4.0.tgz", - "integrity": "sha512-bsKLBEWNOdtseHjLECrSknsXWxjxS6OgxCRtMwGrquuLGP0vFdLMblSYyNOv+xSPSS3VinTBLoiGHqAtI6fZlg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nest/-/nest-16.4.2.tgz", + "integrity": "sha512-Y/rrqgTog1gJ3N8Osu1AOeEvPn6dd/txmGsSAz5D42Kzqj9IlqAjhhfr3ssGkY3WAqj/QqR/p4GVKbmsTa+bEQ==", "dependencies": { "@nestjs/schematics": "^9.1.0", - "@nrwl/nest": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", - "@nx/node": "16.4.0", + "@nrwl/nest": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", + "@nx/node": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "enquirer": "~2.3.6" } }, "node_modules/@nx/next": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/next/-/next-16.4.0.tgz", - "integrity": "sha512-BOPioCKcySEMBEPbJ9inReUICkZdoqZYvM18X4wD7DhArEk9iEBuWUJmaw7nQ7D+3m4CSdD19+FV+CKGqUUgoA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/next/-/next-16.4.2.tgz", + "integrity": "sha512-wQ5GtFbifRHjjHuNWe2T6lxCE4hQc9OC9JrIGLYtpm75SO8HEMEbo9++jXt54f5iNL1Xr2/r+bxd4fxxveWogQ==", "dependencies": { "@babel/plugin-proposal-decorators": "^7.14.5", - "@nrwl/next": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", - "@nx/react": "16.4.0", - "@nx/web": "16.4.0", - "@nx/workspace": "16.4.0", + "@nrwl/next": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", + "@nx/react": "16.4.2", + "@nx/web": "16.4.2", + "@nx/workspace": "16.4.2", "@svgr/webpack": "^8.0.1", "chalk": "^4.1.0", "copy-webpack-plugin": "^10.2.4", @@ -8195,7 +8203,6 @@ "semver": "7.5.3", "ts-node": "10.9.1", "tsconfig-paths": "^4.1.2", - "tsconfig-paths-webpack-plugin": "4.0.0", "url-loader": "^4.1.1", "webpack-merge": "^5.8.0" }, @@ -8298,16 +8305,16 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/node": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/node/-/node-16.4.0.tgz", - "integrity": "sha512-Px04P47k3CsKabWPjmeVI4AQ1hvkfJ/JRqAPJTWe6L8Unyf9ZghReLbi2vzjWe0NMa8ZJ6KpZ8H8P+5i+ZuDfA==", - "dependencies": { - "@nrwl/node": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/jest": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", - "@nx/workspace": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/node/-/node-16.4.2.tgz", + "integrity": "sha512-KsJBIO80VbKQeiJD6TleH5LD1Be9BrB3pfyJETYsu1TcQhBf2LeTkzN4Es/7pJwHFO84kHWV7kHgi0C4mKLtfQ==", + "dependencies": { + "@nrwl/node": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/jest": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", + "@nx/workspace": "16.4.2", "tslib": "^2.3.0" } }, @@ -8342,9 +8349,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.4.0.tgz", - "integrity": "sha512-Qoes/NifE4zb5Gb6ZdC32HvxZBzO0xo74j7EozUV5rZEm3bCtKbKqThPV9Uuu+8S4j718r5vlob/IMXqRcWK4g==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.4.2.tgz", + "integrity": "sha512-V5z3eFymTP4AodIMQXTCZwZcJnoxaHw2QAbiCluZYVN22QQU+mAWNStbw9spJhdDBRkHeLfMOiZ/aL2zxjNFmw==", "cpu": [ "x64" ], @@ -8462,15 +8469,15 @@ } }, "node_modules/@nx/react": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/react/-/react-16.4.0.tgz", - "integrity": "sha512-R+kNYfFRn2b4UJ4aM6irs/DRVP1T3wSH/DyCUqmjFcQt8SZqQwdqxXmt6RGzMm/Se8nO7RAoV8wcm4dU2GWwSg==", - "dependencies": { - "@nrwl/react": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", - "@nx/web": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/react/-/react-16.4.2.tgz", + "integrity": "sha512-I5BAdU/nJHxd+4v4ebcHFE4VahO53+tYwHcAJnfBMV84iGCbjLOZlGpJw8UIPNGIrCEKldH+Qj7MkufLoA8Qsg==", + "dependencies": { + "@nrwl/react": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", + "@nx/web": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "@svgr/webpack": "^8.0.1", "chalk": "^4.1.0", @@ -8563,16 +8570,16 @@ } }, "node_modules/@nx/storybook": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/storybook/-/storybook-16.4.0.tgz", - "integrity": "sha512-rYtNIcBlGxcneHXLAYilm24U0G0nqvHMkqwMvMbeUtnn3g/nAP7jBjTQ7uR4ENs7454Xyef0A4R20KS8i8C+Gg==", - "dependencies": { - "@nrwl/storybook": "16.4.0", - "@nx/cypress": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", - "@nx/linter": "16.4.0", - "@nx/workspace": "16.4.0", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/storybook/-/storybook-16.4.2.tgz", + "integrity": "sha512-oQVXrE950fM4JI1tF4Bd21pqs7ObIeaCUfnZT4zXnGvLgJS+NvHOD4sIA/cdQV1TACz5nbPaBlObEZpbh8rUUg==", + "dependencies": { + "@nrwl/storybook": "16.4.2", + "@nx/cypress": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", + "@nx/linter": "16.4.2", + "@nx/workspace": "16.4.2", "@phenomnomnominal/tsquery": "~5.0.1", "dotenv": "~10.0.0", "semver": "7.5.3" @@ -8609,13 +8616,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nx/web": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/web/-/web-16.4.0.tgz", - "integrity": "sha512-CS5wAppKFwX658sf1q4v34PtYiybrZFhue+BHEtmod1V1AdRahypGQYkIZtxd33O8WOpPWX4S5Rv7XWfLdaSTg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/web/-/web-16.4.2.tgz", + "integrity": "sha512-rjARmJESboplfa3kI0ncUMBKJGJO1cV9Rsp1HzIeAAq7Zo614lPnUA/lE6Q+lD+GbfJu0y5t7ENmQv2E/61Rxw==", "dependencies": { - "@nrwl/web": "16.4.0", - "@nx/devkit": "16.4.0", - "@nx/js": "16.4.0", + "@nrwl/web": "16.4.2", + "@nx/devkit": "16.4.2", + "@nx/js": "16.4.2", "chalk": "^4.1.0", "chokidar": "^3.5.1", "detect-port": "^1.5.1", @@ -8689,12 +8696,12 @@ } }, "node_modules/@nx/workspace": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-16.4.0.tgz", - "integrity": "sha512-nuFlhrl9FI6Tb2RvSNRGTVl/X3Cvf/vV2DO1MiyMjZWasZLhAr9rjtLYgTrJW4uQLJOn6MXJzP97w/Boa4pfRQ==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-16.4.2.tgz", + "integrity": "sha512-r+QAXdSrQAMN4fE1M8pkVa/vWKQ6OdCOzGLQmPhxsTtCHjm/ZyNBGbs3+8FhYm0+dqB+Vt3DiHK4bWyTSJNymw==", "dependencies": { - "@nrwl/workspace": "16.4.0", - "@nx/devkit": "16.4.0", + "@nrwl/workspace": "16.4.2", + "@nx/devkit": "16.4.2", "@parcel/watcher": "2.0.4", "chalk": "^4.1.0", "chokidar": "^3.5.1", @@ -8706,7 +8713,7 @@ "ignore": "^5.0.4", "minimatch": "3.0.5", "npm-run-path": "^4.0.1", - "nx": "16.4.0", + "nx": "16.4.2", "open": "^8.4.0", "rxjs": "^7.8.0", "tmp": "~0.2.1", @@ -8716,20 +8723,20 @@ } }, "node_modules/@nx/workspace/node_modules/@nrwl/tao": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.4.0.tgz", - "integrity": "sha512-6n4chOOv6jqact07NvIDRQfsnaiYYhi+mrqSuJKs6fL+c5kx/VCryndTP0MDTBbazfL6H7vwiQUkTja2sQDuwA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.4.2.tgz", + "integrity": "sha512-7hbrXocJ64IkdQuZOroUM/602QOLJNVzmLkyj9TouefcBkxL8CzDRQGf4w3UWrK6NDBpg/H8DMc8MT6ssOY4sQ==", "dependencies": { - "nx": "16.4.0" + "nx": "16.4.2" }, "bin": { "tao": "index.js" } }, "node_modules/@nx/workspace/node_modules/@nx/nx-darwin-arm64": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.4.0.tgz", - "integrity": "sha512-/ZXuF8M3u8DSNmjYstQKorzo7uIETNhnFinwWlO8mzz+SyR+Xs5G6penJ4+cB1ju3Hf3lZkXd5U6pEiW4OAAkA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.4.2.tgz", + "integrity": "sha512-VM8y01zGo4wkLuyFrz5jUvSGkWIOGcLmcXms5Oa2jVyoWPbV20MWYmgj/rmd06c8FGVvcVbex/cjsPoYPny5xg==", "cpu": [ "arm64" ], @@ -8742,9 +8749,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-darwin-x64": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.4.0.tgz", - "integrity": "sha512-0Fo58qZzHgRs4SRVaAOBipdJQNew57YQbpFaLHKhCTyKc0Pe6THEYaaT/x9QVkcFO0x4AzNr9T7iJTrneNwcKg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.4.2.tgz", + "integrity": "sha512-wEsNN29SKen+uC6A8bxIUzZ/n972hKgTz/pi+bz/TcRGu1f1MYTemN3MzxOzSzvfVRsA4jqml1PhUF1jo/ETkg==", "cpu": [ "x64" ], @@ -8757,9 +8764,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.4.0.tgz", - "integrity": "sha512-m8uklbettj8RnLtasjQPiYxqJotDSfO3LO1II8Bds53C7OT8TDnTkW68MEx+CxuSCQFy2Aa0Oih3jSvDzfnZzA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.4.2.tgz", + "integrity": "sha512-JJP0JDa/K/+Axbn74i/1sGCCnhzfKOZ2/J/0bRpMdq8QjxVUuOgMW6IUkpKMD+raf7XQKjmgOurxsxK4LFB4zw==", "cpu": [ "arm" ], @@ -8772,9 +8779,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.4.0.tgz", - "integrity": "sha512-bAs2T/zZQDTCzzhciE8kCrkwgXbeX3K83cGRacB7PDZZl/O4jr5TRO4zYHi6doytyLONjqhvWNLbIo4cEEcfZA==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.4.2.tgz", + "integrity": "sha512-rGAHQYEm1Qct1CqYEhdxT+dwFBLP7tOM+DCOd6/zK+v7qdbzl8Y7AgmXs/JCpJP4eLz/Q9R+6ZPvWmvEfKC7jw==", "cpu": [ "arm64" ], @@ -8787,9 +8794,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.4.0.tgz", - "integrity": "sha512-K1D8j4lRZDBVuW8iomeJjCznFz7rfP3qaB3RHjKZU5qrZBq1uYohhdfT7dzwWFNWEvt6WytfhGCl2S9PsQ37Wg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.4.2.tgz", + "integrity": "sha512-qDgsUffjM5a1P7sKpqoffVtc9Z6K4f3FOxHZ+exhNUV+a6vFdPQ594zNjomUYYlY6i1oj6Yl3+peFOb5tI/UfQ==", "cpu": [ "arm64" ], @@ -8802,9 +8809,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.4.0.tgz", - "integrity": "sha512-v1NJ3ESaw5bdSeuh5Xslq1dXGWztf0mSLwZP510Rt9+ulr5LQ/X1Rri8zefU0gZNLcmJL0G2Qq7UTnppYGRTEg==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.4.2.tgz", + "integrity": "sha512-waqigyyBA0svrFmPmXFzjxYfeaudzVcm/DntH2ksowguOdF67cvB3yI783hVJiy1GwWX25neqty+fCLaY+s6tg==", "cpu": [ "x64" ], @@ -8817,9 +8824,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-linux-x64-musl": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.4.0.tgz", - "integrity": "sha512-+8YLVWZFq+k6YJ2ZDwR5sGaRnZhUVYtR8aPbGyonMnJ8VEQJNEqsm1KT6nt0gd3JJdxyphm3VsMQWBMo42jM+w==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.4.2.tgz", + "integrity": "sha512-idf800gH3RHKGxJfsmSAZ+EhW2rfpIQu2gBhgvHc3D4sQ1s8A8KN/Ht0w0ddB4Pa3iPzfDTYAlMq9VWCNN2I4A==", "cpu": [ "x64" ], @@ -8832,9 +8839,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.4.0.tgz", - "integrity": "sha512-HwE6AxlrfWvODT49vVX6NGMYc3zdMVXETCdZb0jZ/oz28XXTAPvVb/8DJgKSyCs0DPirEeCHiPwbdcJA1Bqw8A==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.4.2.tgz", + "integrity": "sha512-r6/0SvzNcZ9+Ihw9M+sHnX8wrws1cQ3PB3R3y5dEKp/VZ1s0TkYKqmw/yfgYfMVQp05mIM+tIHOK9Ra0I+fB2Q==", "cpu": [ "arm64" ], @@ -8847,9 +8854,9 @@ } }, "node_modules/@nx/workspace/node_modules/@nx/nx-win32-x64-msvc": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.4.0.tgz", - "integrity": "sha512-ISL3c6i/v+JOsUHEbngDHaobmbgu6oSY0htKas1RjLWGkWXDLgEXMRjQ/xDbNVYH00Mto7mmq+nrjkNNbqOrfQ==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.4.2.tgz", + "integrity": "sha512-BEejvjogyF+YfRQuors1JTKio/qbS69LGHDESXIu/Lb4PRzTpzN4Nr4U7Fbl8OPZm9lZhB/sPd19S/ZoR0zZkg==", "cpu": [ "x64" ], @@ -8978,15 +8985,15 @@ } }, "node_modules/@nx/workspace/node_modules/nx": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/nx/-/nx-16.4.0.tgz", - "integrity": "sha512-HhJnOAm2wlaIVMmxK1HcdcKfX5DlnQc1RAHFf+QostvQQ/SmUg9f7LoStxpNm01JhQTehb01tH9zAsXKcKzO4A==", + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-16.4.2.tgz", + "integrity": "sha512-jF+0v6LowwRMbY+rUo1L8FiOn6hRg5lJc3TUK5fu9fbqBpqG4lUDjp0Fuk1WDFlKWPWtFnqxo0wAzdIgJS8+SQ==", "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "16.4.0", + "@nrwl/tao": "16.4.2", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", - "@yarnpkg/parsers": "^3.0.0-rc.18", + "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.6", "axios": "^1.0.0", "chalk": "^4.1.0", @@ -9022,16 +9029,16 @@ "nx": "bin/nx.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "16.4.0", - "@nx/nx-darwin-x64": "16.4.0", - "@nx/nx-freebsd-x64": "16.4.0", - "@nx/nx-linux-arm-gnueabihf": "16.4.0", - "@nx/nx-linux-arm64-gnu": "16.4.0", - "@nx/nx-linux-arm64-musl": "16.4.0", - "@nx/nx-linux-x64-gnu": "16.4.0", - "@nx/nx-linux-x64-musl": "16.4.0", - "@nx/nx-win32-arm64-msvc": "16.4.0", - "@nx/nx-win32-x64-msvc": "16.4.0" + "@nx/nx-darwin-arm64": "16.4.2", + "@nx/nx-darwin-x64": "16.4.2", + "@nx/nx-freebsd-x64": "16.4.2", + "@nx/nx-linux-arm-gnueabihf": "16.4.2", + "@nx/nx-linux-arm64-gnu": "16.4.2", + "@nx/nx-linux-arm64-musl": "16.4.2", + "@nx/nx-linux-x64-gnu": "16.4.2", + "@nx/nx-linux-x64-musl": "16.4.2", + "@nx/nx-win32-arm64-msvc": "16.4.2", + "@nx/nx-win32-x64-msvc": "16.4.2" }, "peerDependencies": { "@swc-node/register": "^1.4.2", @@ -9289,9 +9296,9 @@ "integrity": "sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==" }, "node_modules/@remix-run/eslint-config": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@remix-run/eslint-config/-/eslint-config-1.18.0.tgz", - "integrity": "sha512-QOHGfHG8AbXnEFXMUIjPYNcN/Z4EGZ9AR6vBrZ2k5fV1m0YhxbR9Y0OXHkHn/T9F2ek7sAHmuuVF66ppNn2mjQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@remix-run/eslint-config/-/eslint-config-1.18.1.tgz", + "integrity": "sha512-r0vjv+//isRseRShZ6RbX2bJSjQzfE7R2KOf4v1v+EVQZ59Vk0cR6UPwlxHN4Wc3jtTa2yBlLCm1H24ImKLQ4Q==", "dependencies": { "@babel/core": "^7.21.8", "@babel/eslint-parser": "^7.21.8", @@ -10443,9 +10450,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@teambit/react.eslint-config-bit-react": { - "version": "0.0.806", - "resolved": "https://registry.npmjs.org/@teambit/react.eslint-config-bit-react/-/react.eslint-config-bit-react-0.0.806.tgz", - "integrity": "sha512-s8J1tGBgKtadu/FQiA5GLzAPIkvxYIB+14ROMTEUdg8H+9EMR5hoXulSRWXi9u3COaP/G/c7thEI/BoHmsQXpQ==", + "version": "0.0.808", + "resolved": "https://registry.npmjs.org/@teambit/react.eslint-config-bit-react/-/react.eslint-config-bit-react-0.0.808.tgz", + "integrity": "sha512-lr9Xlxhsd91repe8uKrRChpwoJL+FOSiAs9qh0VwvkVOcYy8pbaLdCz3W0o1jjJ1xEGSGP/CzkQTaBBzE+Mrgw==", "dependencies": { "@typescript-eslint/eslint-plugin": "5.35.1", "@typescript-eslint/parser": "5.35.1", @@ -10456,7 +10463,7 @@ "node": ">=12.22.0" }, "peerDependencies": { - "@teambit/legacy": "1.0.514", + "@teambit/legacy": "1.0.516", "eslint": "> 7.0.0" } }, @@ -11265,9 +11272,9 @@ "integrity": "sha512-MUSpfpW0yZbTgjekDbH0shMYBUD+X/uJJJMm9LXN1d5yjl5lCY1vN/eWKD6D1tOtjA6206K0zcIPnUaFMurdNA==" }, "node_modules/@types/node": { - "version": "18.16.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", - "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==" + "version": "18.16.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.19.tgz", + "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==" }, "node_modules/@types/node-fetch": { "version": "2.6.4", @@ -12396,9 +12403,9 @@ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" }, "node_modules/@yarnpkg/parsers": { - "version": "3.0.0-rc.45", - "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.45.tgz", - "integrity": "sha512-Aj0aHBV/crFQTpKQvL6k1xNiOhnlfVLu06LunelQAvl1MTeWrSi8LD9UJJDCFJiG4kx8NysUE6Tx0KZyPQUzIw==", + "version": "3.0.0-rc.46", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz", + "integrity": "sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==", "dependencies": { "js-yaml": "^3.10.0", "tslib": "^2.4.0" @@ -16309,14 +16316,14 @@ } }, "node_modules/eslint": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", - "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", + "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.43.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -16328,7 +16335,7 @@ "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "espree": "^9.6.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -16348,7 +16355,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -18988,9 +18995,9 @@ } }, "node_modules/eslint-config-standard-with-typescript": { - "version": "35.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-35.0.0.tgz", - "integrity": "sha512-Xa7DY9GgduZyp0qmXxBF0/dB+Vm4/DgWu1lGpNLJV2d46aCaUxTKDEnkzjUWX/1O9S0a+Dhnw7A4oI0JpYzwtw==", + "version": "36.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-36.0.0.tgz", + "integrity": "sha512-8ZSEskfrDAkUF2lTQLMT0CBzgRNlx1uIM7l2I7L683dKAXUdHuEL2x+GxuGAsdsoWbx7W7Zv0xF67VCEZXIk0Q==", "dependencies": { "@typescript-eslint/parser": "^5.50.0", "eslint-config-standard": "17.0.0" @@ -19051,11 +19058,11 @@ } }, "node_modules/eslint-config-turbo": { - "version": "1.10.6", - "resolved": "https://registry.npmjs.org/eslint-config-turbo/-/eslint-config-turbo-1.10.6.tgz", - "integrity": "sha512-iZ63etePRUdEIDY5MxdUhU2ekV9TDbVdHg0BK00QqVFgQTXUYuJ7rsQj/wUKTsw3jwhbLfaY6H5sknAgYyWZ2g==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/eslint-config-turbo/-/eslint-config-turbo-1.10.7.tgz", + "integrity": "sha512-0yHt5UlXVph8S4SOvP6gYehLvYjJj6XFKTYOG/WUQbjlcF0OU4pOT1a1juqmmBPWYlvJ0evt7v+RekY4tOopPQ==", "dependencies": { - "eslint-plugin-turbo": "1.10.6" + "eslint-plugin-turbo": "1.10.7" }, "peerDependencies": { "eslint": ">6.6.0" @@ -21097,9 +21104,9 @@ "integrity": "sha512-hxhpWtaXgBTeCUmQa6EzjKI8vnrk7uej9e+ln2etTMPFAM7Q8xNPdBywSGrWf2mSB018D66sR1ZfdThonXCplg==" }, "node_modules/eslint-plugin-import-newlines": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.3.1.tgz", - "integrity": "sha512-7vyhwliGm+CTwteRw2ym+IO9OaksGYmSt63elPPBM0QJ3zwRwMKtgHOSHVtdHlrSERRTVCsWtMO8dDdAdmHMXg==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.3.3.tgz", + "integrity": "sha512-WBLhJdbh7QJKupF//BFDEIzwg2rfcWJegIDBwz79j0w7lQnfrOkAY6YBIQ/oIZ1+S5NZugG9TfRd/n0VWz+deA==", "bin": { "import-linter": "lib/index.js" }, @@ -21264,9 +21271,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.4.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.2.tgz", - "integrity": "sha512-fmIgOe7irf9otkMtsPjr5P39wC5LzA6aEU/nydfUlc8JaEiS93uhPaxI+x/v5s1Ckm+IZeP3006do2n2ehZcNQ==", + "version": "46.4.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.3.tgz", + "integrity": "sha512-Prc7ol+vCIghPeECpwZq5+P+VZfoi87suywvbYCiCnkI1kTmVSdcOC2M8mioglWxBbd28wbb1OVjg/8OzGzatA==", "dependencies": { "@es-joy/jsdoccomment": "~0.39.4", "are-docs-informative": "^0.0.2", @@ -22625,9 +22632,9 @@ } }, "node_modules/eslint-plugin-turbo": { - "version": "1.10.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-1.10.6.tgz", - "integrity": "sha512-jlzfxYaK8hcz1DTk8Glxxi1r0kgdy85191a4CbFOTiiBulmKHMLJgzhsyE9Ong796MA62n91KFpc20BiKjlHwg==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-1.10.7.tgz", + "integrity": "sha512-YikBHc75DY9VV1vAFUIBekHLQlxqVT5zTNibK8zBQInCUhF7PvyPJc0xXw5FSz8EYtt4uOV3r0Km3CmFRclS4Q==", "dependencies": { "dotenv": "16.0.3" }, @@ -22797,9 +22804,9 @@ } }, "node_modules/eslint-plugin-vue-scoped-css": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue-scoped-css/-/eslint-plugin-vue-scoped-css-2.4.0.tgz", - "integrity": "sha512-H2GdGyaNuz58gMwJYrPAyok2ZZFklb1wnI4jqLyQZf17gvZeTOpYzCxqhhcT5hBeaCUHhjxU5akCI7A4AtBHew==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue-scoped-css/-/eslint-plugin-vue-scoped-css-2.5.0.tgz", + "integrity": "sha512-vR+raYNE1aQ69lS1lZGiKoz8rXFI3MWf2fxrfns/XCQ0XT5sIguhDtQS+9JmUQJClenLDEe2CQx7P+eeSdF4cA==", "dependencies": { "eslint-utils": "^3.0.0", "lodash": "^4.17.21", @@ -23204,11 +23211,11 @@ } }, "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz", + "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, @@ -23219,6 +23226,17 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/espree/node_modules/acorn": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/espree/node_modules/eslint-visitor-keys": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", @@ -34279,9 +34297,9 @@ "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -37836,16 +37854,16 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -40428,12 +40446,13 @@ "integrity": "sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==" }, "node_modules/sort-package-json": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-2.4.1.tgz", - "integrity": "sha512-Nd3rgLBJcZ4iw7tpuOhwBupG6SvUDU0Fy1cZGAMorA2JmDUb+29Dg5phJK9gapa2Ak9d15w/RuMl/viwX+nKwQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-2.5.0.tgz", + "integrity": "sha512-KIsqEi/ameVyhhatpzwialQVSMP1mFzRLJgTBKJDz0duQmhnBDjf8MFyFoIoVnW69SqjH3/bziCSlgiuz2KbHg==", "dependencies": { "detect-indent": "^7.0.1", "detect-newline": "^4.0.0", + "get-stdin": "^9.0.0", "git-hooks-list": "^3.0.0", "globby": "^13.1.2", "is-plain-obj": "^4.1.0", @@ -40469,6 +40488,17 @@ "node": ">=8.6.0" } }, + "node_modules/sort-package-json/node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/sort-package-json/node_modules/globby": { "version": "13.1.4", "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", @@ -42293,83 +42323,6 @@ "node": ">=6" } }, - "node_modules/tsconfig-paths-webpack-plugin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.0.0.tgz", - "integrity": "sha512-fw/7265mIWukrSHd0i+wSwx64kYUSAKPfxRDksjKIYTxSAp9W9/xcZVBF4Kl0eqQd5eBpAQ/oQrc5RyM/0c1GQ==", - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.7.0", - "tsconfig-paths": "^4.0.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/tsconfig-paths-webpack-plugin/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", diff --git a/package.json b/package.json index 3f79106aa..1120ac5b9 100644 --- a/package.json +++ b/package.json @@ -89,22 +89,22 @@ "@nrwl/nx-cloud": "^16.0.5", "@nuxtjs/eslint-config": "^12.0.0", "@nuxtjs/eslint-config-typescript": "^12.0.0", - "@nx/cypress": "^16.4.0", - "@nx/devkit": "^16.4.0", - "@nx/eslint-plugin": "^16.4.0", - "@nx/express": "^16.4.0", - "@nx/jest": "^16.4.0", - "@nx/linter": "^16.4.0", - "@nx/nest": "^16.4.0", - "@nx/next": "^16.4.0", - "@nx/node": "^16.4.0", - "@nx/react": "^16.4.0", - "@nx/storybook": "^16.4.0", - "@nx/web": "^16.4.0", - "@nx/workspace": "^16.4.0", + "@nx/cypress": "^16.4.2", + "@nx/devkit": "^16.4.2", + "@nx/eslint-plugin": "^16.4.2", + "@nx/express": "^16.4.2", + "@nx/jest": "^16.4.2", + "@nx/linter": "^16.4.2", + "@nx/nest": "^16.4.2", + "@nx/next": "^16.4.2", + "@nx/node": "^16.4.2", + "@nx/react": "^16.4.2", + "@nx/storybook": "^16.4.2", + "@nx/web": "^16.4.2", + "@nx/workspace": "^16.4.2", "@prodigy/eslint-config-prodigy": "^0.0.7", "@react-native-community/eslint-config": "^3.2.0", - "@remix-run/eslint-config": "^1.18.0", + "@remix-run/eslint-config": "^1.18.1", "@salesforce/eslint-config-lwc": "^3.5.0", "@salesforce/eslint-plugin-aura": "^2.1.0", "@salesforce/eslint-plugin-lightning": "^1.0.0", @@ -115,12 +115,12 @@ "@tailwindcss/line-clamp": "^0.4.4", "@tanstack/eslint-plugin-query": "^4.29.9", "@teambit/eslint-config-bit-react": "^0.0.367", - "@teambit/react.eslint-config-bit-react": "^0.0.806", + "@teambit/react.eslint-config-bit-react": "^0.0.808", "@types/eslint": "^8.40.2", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.5.2", "@types/mocha": "^10.0.1", - "@types/node": "^18.16.18", + "@types/node": "^18.16.19", "@types/node-fetch": "^2.6.4", "@types/simple-mock": "^0.8.2", "@typescript-eslint/eslint-plugin": "^5.60.1", @@ -147,7 +147,7 @@ "codacy-seed": "^2.2.0", "confusing-browser-globals": "^1.0.11", "dotenv-webpack": "^8.0.1", - "eslint": "^8.43.0", + "eslint": "^8.44.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", @@ -179,11 +179,11 @@ "eslint-config-standard": "^17.1.0", "eslint-config-standard-jsx": "^11.0.0", "eslint-config-standard-react": "^13.0.0", - "eslint-config-standard-with-typescript": "^35.0.0", + "eslint-config-standard-with-typescript": "^36.0.0", "eslint-config-strongloop": "^2.1.0", "eslint-config-ts-important-stuff": "^1.1.0", "eslint-config-ts-react-important-stuff": "^3.0.0", - "eslint-config-turbo": "^1.10.6", + "eslint-config-turbo": "^1.10.7", "eslint-config-universe": "^11.3.0", "eslint-config-vue": "^2.0.2", "eslint-config-winedirect": "^1.1.0", @@ -228,14 +228,14 @@ "eslint-plugin-i18next": "^6.0.3", "eslint-plugin-import": "^2.27.5", "eslint-plugin-import-alias": "^1.2.0", - "eslint-plugin-import-newlines": "^1.3.1", + "eslint-plugin-import-newlines": "^1.3.3", "eslint-plugin-jasmine": "^4.1.3", "eslint-plugin-jest": "^27.2.2", "eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-jest-extended": "^2.0.0", "eslint-plugin-jest-formatting": "^3.1.0", "eslint-plugin-jira-ticket-todo-comment": "^1.0.4", - "eslint-plugin-jsdoc": "^46.4.2", + "eslint-plugin-jsdoc": "^46.4.3", "eslint-plugin-json": "^3.1.0", "eslint-plugin-jsonc": "^2.9.0", "eslint-plugin-jsx": "^0.1.0", @@ -285,12 +285,12 @@ "eslint-plugin-test-selectors": "^2.0.4", "eslint-plugin-testing-library": "^5.11.0", "eslint-plugin-tsdoc": "^0.2.17", - "eslint-plugin-turbo": "^1.10.3", + "eslint-plugin-turbo": "^1.10.7", "eslint-plugin-typescript-sort-keys": "^2.3.0", "eslint-plugin-unicorn": "^47.0.0", "eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-vue": "^9.15.1", - "eslint-plugin-vue-scoped-css": "^2.4.0", + "eslint-plugin-vue-scoped-css": "^2.5.0", "eslint-plugin-vuejs-accessibility": "^2.1.0", "eslint-plugin-wdio": "^8.0.14", "eslint-plugin-xss": "^0.1.12", @@ -306,14 +306,14 @@ "mini-css-extract-plugin": "^2.7.6", "mocha": "^10.2.0", "next": "^13.4.7", - "node-fetch": "^2.6.11", + "node-fetch": "^2.6.12", "npm": "^9.7.2", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.3.0", "react-hot-loader": "^4.13.1", "redux-saga": "^1.2.3", "simple-mock": "^0.8.0", - "sort-package-json": "^2.4.1", + "sort-package-json": "^2.5.0", "source-map-support": "^0.5.21", "standard": "^17.1.0", "stylelint-config-idiomatic-order": "^9.0.0", diff --git a/src/blacklist.ts b/src/blacklist.ts index 7064f7e1b..63ea85eb6 100644 --- a/src/blacklist.ts +++ b/src/blacklist.ts @@ -2,6 +2,7 @@ const blacklistRegexes: RegExp[] = [ /@nx\/enforce-module-boundaries/, /@shopify\/eslint-plugin\/no-debugger/, /@typescript-eslint\/await-thenable/, + /@typescript-eslint\/indent*/, /angular\/service-name/, /babel\/generator-star-spacing/, /babel\/array-bracket-spacing/, @@ -11,8 +12,16 @@ const blacklistRegexes: RegExp[] = [ /babel\/flow-object-type/, /canonical\/id-match/, /ember\/no-restricted-property-modifications/, + /eslint\/indent/, /header\/header/, - /import\/.+/, + /import\/named/, + /import\/namespace/, + /import\/default/, + /import\/no-named-as-default-member/, + /import\/no-named-as-default/, + /import\/no-cycle/, + /import\/no-unused-modules/, + /import\/no-deprecated/, /jest\/unbound-method/, /jsdoc\/newline-after-description/, /mongodb\/.+/, diff --git a/src/docGeneratorMain.ts b/src/docGeneratorMain.ts index 52ebe3b7b..cbf010d11 100644 --- a/src/docGeneratorMain.ts +++ b/src/docGeneratorMain.ts @@ -148,7 +148,7 @@ async function main() { console.log("Generate import description files") await docGenerator.downloadDocs( (pattern) => - `${githubBaseUrl}/benmosher/eslint-plugin-import/master/docs/rules/${pattern}.md`, + `${githubBaseUrl}/import-js/eslint-plugin-import/main/docs/rules/${pattern}.md`, "import", false ) diff --git a/src/eslintDefaultOptions.ts b/src/eslintDefaultOptions.ts index 66409c358..f54b3f4d0 100644 --- a/src/eslintDefaultOptions.ts +++ b/src/eslintDefaultOptions.ts @@ -15,6 +15,9 @@ const baseConfigs: string[] = [ "plugin:eslint-plugin/recommended", "plugin:flowtype/recommended", "plugin:fp/recommended", + "plugin:i18next/recommended", + "plugin:import/recommended", + "plugin:import/typescript", "plugin:jest-dom/recommended", "plugin:jest-formatting/recommended", "plugin:json/recommended", @@ -57,6 +60,7 @@ export const defaultOptions: ESLint.Options = { worker: true, qunit: true, }, + ignorePatterns: ["node_modules/*", "dist/*", "bin/*", "build/*", "docs/tests/*"], plugins: pluginsNames, parser: "@typescript-eslint/parser", parserOptions: {