diff --git a/.markdownlint.json b/.markdownlint.json index 1d5a8a66a8..8598e15388 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -2,5 +2,9 @@ "line-length": false, "ul-style": { "style": "dash" + }, + "ul-indent": { + "start_indented": true, + "start_indent": 1 } } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a79e7139e..871e90ad8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,15 +6,15 @@ Thanks for your interest in helping out! Here are a **few** _weird_ tricks to ~~ When opening an [issue](#issues): -- [ ] search open/closed issues -- [ ] discuss bug/enhancement in new or old issue + - [ ] search open/closed issues + - [ ] discuss bug/enhancement in new or old issue [PR](#prs) time: -- [ ] write tests -- [ ] implement feature/fix bug -- [ ] update docs -- [ ] make a note in change log + - [ ] write tests + - [ ] implement feature/fix bug + - [ ] update docs + - [ ] make a note in change log Remember, you don't need to do it all yourself; any of these are helpful! 😎 @@ -22,10 +22,10 @@ Remember, you don't need to do it all yourself; any of these are helpful! 😎 If you are new to `eslint`, below are a few resources that will help you to familiarize yourself with the project. -- Watch [this presentation](https://www.youtube.com/watch?v=2W9tUnALrLg) to learn the fundamental concept of Abstract Syntax Trees (AST) and the way `eslint` works under the hood. -- Familiarize yourself with the [AST explorer](https://astexplorer.net/) tool. Look into rules in `docs/rules`, create patterns in the rules, then analyze its AST. -- Explore the blog posts on how to create a custom rule. [One blog post](https://blog.yonatan.dev/writing-a-custom-eslint-rule-to-spot-undeclared-props/). [Second blog post](https://betterprogramming.pub/creating-custom-eslint-rules-cdc579694608). -- Read the official `eslint` [developer guide](https://eslint.org/docs/latest/developer-guide/architecture/). + - Watch [this presentation](https://www.youtube.com/watch?v=2W9tUnALrLg) to learn the fundamental concept of Abstract Syntax Trees (AST) and the way `eslint` works under the hood. + - Familiarize yourself with the [AST explorer](https://astexplorer.net/) tool. Look into rules in `docs/rules`, create patterns in the rules, then analyze its AST. + - Explore the blog posts on how to create a custom rule. [One blog post](https://blog.yonatan.dev/writing-a-custom-eslint-rule-to-spot-undeclared-props/). [Second blog post](https://betterprogramming.pub/creating-custom-eslint-rules-cdc579694608). + - Read the official `eslint` [developer guide](https://eslint.org/docs/latest/developer-guide/architecture/). ## Issues diff --git a/README.md b/README.md index 861bcdf7e3..1baa0069b3 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ resolvers are just npm packages, so [third party packages are supported](https:/ You can reference resolvers in several ways (in order of precedence): -- as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`: + - as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`: ```yaml # .eslintrc.yml @@ -195,7 +195,7 @@ module.exports = { } ``` -- with a full npm module name, like `my-awesome-npm-module`: + - with a full npm module name, like `my-awesome-npm-module`: ```yaml # .eslintrc.yml @@ -214,7 +214,7 @@ module.exports = { } ``` -- with a filesystem path to resolver, defined in this example as a `computed property` name: + - with a filesystem path to resolver, defined in this example as a `computed property` name: ```js // .eslintrc.js @@ -336,11 +336,11 @@ If you are using `yarn` PnP as your package manager, add the `.yarn` folder and Each item in this array is either a folder's name, its subpath, or its absolute prefix path: -- `jspm_modules` will match any file or folder named `jspm_modules` or which has a direct or non-direct parent named `jspm_modules`, e.g. `/home/me/project/jspm_modules` or `/home/me/project/jspm_modules/some-pkg/index.js`. + - `jspm_modules` will match any file or folder named `jspm_modules` or which has a direct or non-direct parent named `jspm_modules`, e.g. `/home/me/project/jspm_modules` or `/home/me/project/jspm_modules/some-pkg/index.js`. -- `packages/core` will match any path that contains these two segments, for example `/home/me/project/packages/core/src/utils.js`. + - `packages/core` will match any path that contains these two segments, for example `/home/me/project/packages/core/src/utils.js`. -- `/home/me/project/packages` will only match files and directories inside this directory, and the directory itself. + - `/home/me/project/packages` will only match files and directories inside this directory, and the directory itself. Please note that incomplete names are not allowed here so `components` won't match `bower_components` and `packages/ui` won't match `packages/ui-utils` (but will match `packages/ui/utils`). diff --git a/docs/rules/consistent-type-specifier-style.md b/docs/rules/consistent-type-specifier-style.md index 54c09049ef..41d98e4e1f 100644 --- a/docs/rules/consistent-type-specifier-style.md +++ b/docs/rules/consistent-type-specifier-style.md @@ -37,8 +37,8 @@ This rule includes a fixer that will automatically convert your specifiers to th 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. + - `'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. diff --git a/docs/rules/default.md b/docs/rules/default.md index be02ca3c3a..9f8c919bf3 100644 --- a/docs/rules/default.md +++ b/docs/rules/default.md @@ -63,9 +63,9 @@ either, so such a situation will be reported in the importing module. ## Further Reading -- Lee Byron's [ES7] export proposal -- [`import/ignore`] setting -- [`jsnext:main`] (Rollup) + - Lee Byron's [ES7] export proposal + - [`import/ignore`] setting + - [`jsnext:main`] (Rollup) [ES7]: https://github.com/leebyron/ecmascript-more-export-from [`import/ignore`]: ../../README.md#importignore diff --git a/docs/rules/export.md b/docs/rules/export.md index d15144d748..54a8a39cf3 100644 --- a/docs/rules/export.md +++ b/docs/rules/export.md @@ -32,6 +32,6 @@ intent to rename, etc. ## Further Reading -- Lee Byron's [ES7] export proposal + - Lee Byron's [ES7] export proposal [ES7]: https://github.com/leebyron/ecmascript-more-export-from diff --git a/docs/rules/first.md b/docs/rules/first.md index 7376905fb2..c765a29739 100644 --- a/docs/rules/first.md +++ b/docs/rules/first.md @@ -68,8 +68,8 @@ enable this rule. ## Further Reading -- [`import/order`]: a major step up from `absolute-first` -- Issue [#255] + - [`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/rules/named.md b/docs/rules/named.md index b87729673d..44f8dc6584 100644 --- a/docs/rules/named.md +++ b/docs/rules/named.md @@ -93,9 +93,9 @@ runtime, you will likely see false positives with this rule. ## Further Reading -- [`import/ignore`] setting -- [`jsnext:main`] deprecation -- [`pkg.module`] (Rollup) + - [`import/ignore`] setting + - [`jsnext:main`] deprecation + - [`pkg.module`] (Rollup) [`jsnext:main`]: https://github.com/jsforum/jsforum/issues/5 [`pkg.module`]: https://github.com/rollup/rollup/wiki/pkg.module diff --git a/docs/rules/namespace.md b/docs/rules/namespace.md index 46a6631862..1a177f5819 100644 --- a/docs/rules/namespace.md +++ b/docs/rules/namespace.md @@ -97,9 +97,9 @@ still can't be statically analyzed any further. ## Further Reading -- Lee Byron's [ES7] export proposal -- [`import/ignore`] setting -- [`jsnext:main`](Rollup) + - Lee Byron's [ES7] export proposal + - [`import/ignore`] setting + - [`jsnext:main`](Rollup) [ES7]: https://github.com/leebyron/ecmascript-more-export-from [`import/ignore`]: ../../README.md#importignore diff --git a/docs/rules/newline-after-import.md b/docs/rules/newline-after-import.md index 85b77d4dcd..fec6b23aca 100644 --- a/docs/rules/newline-after-import.md +++ b/docs/rules/newline-after-import.md @@ -10,9 +10,9 @@ Enforces having one or more empty lines after the last top-level import statemen 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`. + - `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`. + - `considerComments` which enforces the rule on comments after the last import-statement as well when set to true. This option defaults to `false`. Valid: diff --git a/docs/rules/no-absolute-path.md b/docs/rules/no-absolute-path.md index a796f9d574..48fb9532bd 100644 --- a/docs/rules/no-absolute-path.md +++ b/docs/rules/no-absolute-path.md @@ -38,9 +38,9 @@ By default, only ES6 imports and CommonJS `require` calls will have this rule en You may provide an options object providing true/false for any of -- `esmodule`: defaults to `true` -- `commonjs`: defaults to `true` -- `amd`: defaults to `false` + - `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: diff --git a/docs/rules/no-amd.md b/docs/rules/no-amd.md index 200726cad4..6e592ba758 100644 --- a/docs/rules/no-amd.md +++ b/docs/rules/no-amd.md @@ -33,5 +33,5 @@ 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: + - [`no-commonjs`](./no-commonjs.md): report CommonJS `require` and `exports` + - Source: diff --git a/docs/rules/no-commonjs.md b/docs/rules/no-commonjs.md index ae11cb9a09..4dc9c8c5d9 100644 --- a/docs/rules/no-commonjs.md +++ b/docs/rules/no-commonjs.md @@ -92,5 +92,5 @@ 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: + - [`no-amd`](./no-amd.md): report on AMD `require`, `define` + - Source: diff --git a/docs/rules/no-cycle.md b/docs/rules/no-cycle.md index 5acfc8e221..76e96f95f2 100644 --- a/docs/rules/no-cycle.md +++ b/docs/rules/no-cycle.md @@ -102,9 +102,9 @@ this rule enabled. ## Further Reading -- [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941) -- Rule to detect that module imports itself: [`no-self-import`] -- [`import/external-module-folders`] setting + - [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941) + - Rule to detect that module imports itself: [`no-self-import`] + - [`import/external-module-folders`] setting [`no-self-import`]: ./no-self-import.md diff --git a/docs/rules/no-deprecated.md b/docs/rules/no-deprecated.md index 3575de6d90..a647d77ad5 100644 --- a/docs/rules/no-deprecated.md +++ b/docs/rules/no-deprecated.md @@ -53,10 +53,10 @@ settings: ## Worklist -- [x] report explicit imports on the import node -- [x] support namespaces - - [x] should bubble up through deep namespaces (#157) -- [x] report explicit imports at reference time (at the identifier) similar to namespace -- [x] mark module deprecated if file JSDoc has a @deprecated tag? -- [ ] don't flag redeclaration of imported, deprecated names -- [ ] flag destructuring + - [x] report explicit imports on the import node + - [x] support namespaces + - [x] should bubble up through deep namespaces (#157) + - [x] report explicit imports at reference time (at the identifier) similar to namespace + - [x] mark module deprecated if file JSDoc has a @deprecated tag? + - [ ] don't flag redeclaration of imported, deprecated names + - [ ] flag destructuring diff --git a/docs/rules/no-import-module-exports.md b/docs/rules/no-import-module-exports.md index 8c0d1f09c1..1c57226495 100644 --- a/docs/rules/no-import-module-exports.md +++ b/docs/rules/no-import-module-exports.md @@ -14,7 +14,7 @@ If you have multiple entry points or are using `js:next` this rule includes an ### `exceptions` -- An array of globs. The rule will be omitted from any file that matches a glob + - 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. @@ -78,4 +78,4 @@ module.exports = foo; ### Further Reading -- [webpack issue #4039](https://github.com/webpack/webpack/issues/4039) + - [webpack issue #4039](https://github.com/webpack/webpack/issues/4039) diff --git a/docs/rules/no-internal-modules.md b/docs/rules/no-internal-modules.md index 4400df4fe8..433b55140d 100644 --- a/docs/rules/no-internal-modules.md +++ b/docs/rules/no-internal-modules.md @@ -8,8 +8,8 @@ Use this rule to prevent importing the submodules of other modules. 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. + - `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 diff --git a/docs/rules/no-mutable-exports.md b/docs/rules/no-mutable-exports.md index f0a6251c19..ce51627858 100644 --- a/docs/rules/no-mutable-exports.md +++ b/docs/rules/no-mutable-exports.md @@ -43,8 +43,8 @@ export function getCount() {} // reported here: exported function is reassigned 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] + - [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 diff --git a/docs/rules/no-named-as-default.md b/docs/rules/no-named-as-default.md index d7e8ef9983..043d699424 100644 --- a/docs/rules/no-named-as-default.md +++ b/docs/rules/no-named-as-default.md @@ -8,8 +8,8 @@ Reports use of an exported name as the locally imported name of a default export Rationale: using an exported name as the name of the default export is likely... -- _misleading_: others familiar with `foo.js` probably expect the name to be `foo` -- _a mistake_: only needed to import `bar` and forgot the brackets (the case that is prompting this) + - _misleading_: others familiar with `foo.js` probably expect the name to be `foo` + - _a mistake_: only needed to import `bar` and forgot the brackets (the case that is prompting this) ## Rule Details @@ -46,8 +46,8 @@ export bar from './foo.js'; ## Further Reading -- ECMAScript Proposal: [export ns from] -- ECMAScript Proposal: [export default from] + - ECMAScript Proposal: [export ns from] + - ECMAScript Proposal: [export default from] [export ns from]: https://github.com/leebyron/ecmascript-export-ns-from [export default from]: https://github.com/leebyron/ecmascript-export-default-from diff --git a/docs/rules/no-namespace.md b/docs/rules/no-namespace.md index 5c900f8100..c7346515a5 100644 --- a/docs/rules/no-namespace.md +++ b/docs/rules/no-namespace.md @@ -12,7 +12,7 @@ The rule is auto-fixable when the namespace object is only used for direct membe This rule supports the following options: -- `ignore`: array of glob strings for modules that should be ignored by the rule. + - `ignore`: array of glob strings for modules that should be ignored by the rule. ## Rule Details diff --git a/docs/rules/no-nodejs-modules.md b/docs/rules/no-nodejs-modules.md index af16424fa1..5cbc907286 100644 --- a/docs/rules/no-nodejs-modules.md +++ b/docs/rules/no-nodejs-modules.md @@ -8,7 +8,7 @@ Forbid the use of Node.js builtin modules. Can be useful for client-side web pro This rule supports the following options: -- `allow`: Array of names of allowed modules. Defaults to an empty array. + - `allow`: Array of names of allowed modules. Defaults to an empty array. ## Rule Details diff --git a/docs/rules/no-restricted-paths.md b/docs/rules/no-restricted-paths.md index 73a984d140..293f3ba009 100644 --- a/docs/rules/no-restricted-paths.md +++ b/docs/rules/no-restricted-paths.md @@ -14,19 +14,19 @@ 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. + - `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 diff --git a/docs/rules/no-unassigned-import.md b/docs/rules/no-unassigned-import.md index e10dfc94e4..617395e2c3 100644 --- a/docs/rules/no-unassigned-import.md +++ b/docs/rules/no-unassigned-import.md @@ -4,8 +4,8 @@ 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. + - 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. diff --git a/docs/rules/no-unresolved.md b/docs/rules/no-unresolved.md index 4a3dd07bf6..ca1da39c00 100644 --- a/docs/rules/no-unresolved.md +++ b/docs/rules/no-unresolved.md @@ -102,9 +102,9 @@ If you're using a module bundler other than Node or Webpack, you may end up with ## 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 + - [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/rules/no-unused-modules.md b/docs/rules/no-unused-modules.md index e6f727c75e..53c2479272 100644 --- a/docs/rules/no-unused-modules.md +++ b/docs/rules/no-unused-modules.md @@ -4,9 +4,9 @@ Reports: -- modules without any exports -- individual exports not being statically `import`ed or `require`ed from other modules in the same project -- dynamic imports are supported if argument is a literal string + - modules without any exports + - individual exports not being statically `import`ed or `require`ed from other modules in the same project + - dynamic imports are supported if argument is a literal string ## Rule Details @@ -27,10 +27,10 @@ Example: This rule takes the following option: -- **`missingExports`**: if `true`, files without any exports are reported (defaults to `false`) -- **`unusedExports`**: if `true`, exports without any static usage within other modules are reported (defaults to `false`) -- `src`: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided -- `ignoreExports`: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package) + - **`missingExports`**: if `true`, files without any exports are reported (defaults to `false`) + - **`unusedExports`**: if `true`, exports without any static usage within other modules are reported (defaults to `false`) + - `src`: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided + - `ignoreExports`: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package) ### Example for missing exports diff --git a/docs/rules/order.md b/docs/rules/order.md index 590fffbb36..2335699e6c 100644 --- a/docs/rules/order.md +++ b/docs/rules/order.md @@ -221,10 +221,10 @@ The default value is `["builtin", "external", "object"]`. 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. + - 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"`. @@ -292,9 +292,9 @@ import sibling from './foo'; 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`). + - `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: @@ -329,7 +329,7 @@ import { compose, apply } from 'xcompose'; ### `warnOnUnassignedImports: true|false` -- default: `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 @@ -356,9 +356,9 @@ import './styles.css'; ## Related -- [`import/external-module-folders`] setting + - [`import/external-module-folders`] setting -- [`import/internal-regex`] setting + - [`import/internal-regex`] setting [`import/external-module-folders`]: ../../README.md#importexternal-module-folders diff --git a/docs/rules/unambiguous.md b/docs/rules/unambiguous.md index 8ce955593e..e9e5bf73da 100644 --- a/docs/rules/unambiguous.md +++ b/docs/rules/unambiguous.md @@ -49,9 +49,9 @@ a `module`. ## Further Reading -- [Unambiguous JavaScript Grammar] -- [`parserOptions.sourceType`] -- [node-eps#13](https://github.com/nodejs/node-eps/issues/13) + - [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/resolvers/README.md b/resolvers/README.md index 9564025ce5..c232dfd891 100644 --- a/resolvers/README.md +++ b/resolvers/README.md @@ -61,8 +61,8 @@ an object provided via the `import/resolver` setting. `my-cool-resolver` will ge The first resolver to return `{found: true}` is considered the source of truth. The returned object has: -- `found`: `true` if the `source` module can be resolved relative to `file`, else `false` -- `path`: an absolute path `String` if the module can be located on the filesystem; else, `null`. + - `found`: `true` if the `source` module can be resolved relative to `file`, else `false` + - `path`: an absolute path `String` if the module can be located on the filesystem; else, `null`. An example of a `null` path is a Node core module, such as `fs` or `crypto`. These modules can always be resolved, but the path need not be provided as the plugin will not attempt to parse core modules at this time.