Skip to content

Commit 4430270

Browse files
committedJan 4, 2018
[Docs] make eslint rule names consistent
1 parent bfda3c0 commit 4430270

31 files changed

+31
-31
lines changed
 

‎docs/rules/default.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# default
1+
# import/default
22

33
If a default import is requested, this rule will report if there is no default
44
export in the imported module.

‎docs/rules/export.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# export
1+
# import/export
22

33
Reports funny business with exports, like repeated exports of names or defaults.
44

‎docs/rules/exports-last.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# exports-last
1+
# import/exports-last
22

33
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.
44

‎docs/rules/extensions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# extensions - Ensure consistent use of file extension within the import path
1+
# import/extensions - Ensure consistent use of file extension within the import path
22

33
Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default. Depending on the resolver you can configure more extensions to get resolved automatically.
44

‎docs/rules/first.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# first
1+
# import/first
22

33
This rule reports any imports that come after non-import
44
statements.

‎docs/rules/group-exports.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# group-exports
1+
# import/group-exports
22

33
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.
44

‎docs/rules/max-dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# max-dependencies
1+
# import/max-dependencies
22

33
Forbid modules to have too many dependencies (`import` or `require` statements).
44

‎docs/rules/named.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# named
1+
# import/named
22

33
Verifies that all named imports are part of the set of named exports in the referenced module.
44

‎docs/rules/namespace.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# namespace
1+
# import/namespace
22

33
Enforces names exist at the time they are dereferenced, when imported as a full namespace (i.e. `import * as foo from './foo'; foo.bar();` will report if `bar` is not exported by `./foo`.).
44

‎docs/rules/newline-after-import.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# newline-after-import
1+
# import/newline-after-import
22

33
Enforces having one or more empty lines after the last top-level import statement or require call.
44
+(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule.

‎docs/rules/no-absolute-path.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Forbid import of modules using absolute paths
1+
# import/no-absolute-path: Forbid import of modules using absolute paths
22

33
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.
44

‎docs/rules/no-amd.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-amd
1+
# import/no-amd
22

33
Reports `require([array], ...)` and `define([array], ...)` function calls at the
44
module scope. Will not report if !=2 arguments, or first argument is not a literal array.

‎docs/rules/no-anonymous-default-export.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-anonymous-default-export
1+
# import/no-anonymous-default-export
22

33
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.
44

‎docs/rules/no-commonjs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-commonjs
1+
# import/no-commonjs
22

33
Reports `require([string])` function calls. Will not report if >1 argument,
44
or single argument is not a literal string.

‎docs/rules/no-deprecated.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-deprecated
1+
# import/no-deprecated
22

33
**Stage: 0**
44

‎docs/rules/no-duplicates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-duplicates
1+
# import/no-duplicates
22

33
Reports if a resolved path is imported more than once.
44

‎docs/rules/no-dynamic-require.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Forbid `require()` calls with expressions
1+
# import/no-dynamic-require: Forbid `require()` calls with expressions
22

33
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.
44

‎docs/rules/no-extraneous-dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Forbid the use of extraneous packages
1+
# import/no-extraneous-dependencies: Forbid the use of extraneous packages
22

33
Forbid the import of external modules that are not declared in the `package.json`'s `dependencies`, `devDependencies`, `optionalDependencies` or `peerDependencies`.
44
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behaviour can be changed with the rule option `packageDir`.

‎docs/rules/no-internal-modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-internal-modules
1+
# import/no-internal-modules
22

33
Use this rule to prevent importing the submodules of other modules.
44

‎docs/rules/no-mutable-exports.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-mutable-exports
1+
# import/no-mutable-exports
22

33
Forbids the use of mutable exports with `var` or `let`.
44

‎docs/rules/no-named-as-default-member.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-named-as-default-member
1+
# import/no-named-as-default-member
22

33
Reports use of an exported name as a property on the default export.
44

‎docs/rules/no-named-as-default.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-named-as-default
1+
# import/no-named-as-default
22

33
Reports use of an exported name as the locally imported name of a default export.
44

‎docs/rules/no-named-default.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-named-default
1+
# import/no-named-default
22

33
Reports use of a default export as a locally named import.
44

‎docs/rules/no-namespace.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-namespace
1+
# import/no-namespace
22

33
Reports if namespace import is used.
44

‎docs/rules/no-nodejs-modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# No Node.js builtin modules
1+
# import/no-nodejs-modules: No Node.js builtin modules
22

33
Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to those modules.
44

‎docs/rules/no-restricted-paths.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-restricted-paths - Restrict which files can be imported in a given folder
1+
# import/no-restricted-paths: Restrict which files can be imported in a given folder
22

33
Some projects contain files which are not always meant to be executed in the same environment.
44
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.

‎docs/rules/no-unassigned-import.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Forbid unassigned imports
1+
# import/no-unassigned-import: Forbid unassigned imports
22

33
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:
44
- The module is imported but not used

‎docs/rules/no-unresolved.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-unresolved
1+
# import/no-unresolved
22

33
Ensures an imported module can be resolved to a module on the local filesystem,
44
as defined by standard Node `require.resolve` behavior.

‎docs/rules/no-webpack-loader-syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-webpack-loader-syntax
1+
# import/no-webpack-loader-syntax
22

33
Forbid Webpack loader syntax in imports.
44

‎docs/rules/order.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Enforce a convention in module import order
1+
# import/order: Enforce a convention in module import order
22

33
Enforce a convention in the order of `require()` / `import` statements. The order is as shown in the following example:
44

‎docs/rules/unambiguous.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# unambiguous
1+
# import/unambiguous
22

33
Warn if a `module` could be mistakenly parsed as a `script` by a consumer leveraging
44
[Unambiguous JavaScript Grammar] to determine correct parsing goal.

0 commit comments

Comments
 (0)
Please sign in to comment.