Skip to content

Commit

Permalink
Docs: Add indicator for fixable rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Casey Visco authored Sep 17, 2016
1 parent df166ed commit 3c3290a
Showing 1 changed file with 35 additions and 25 deletions.
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,36 +65,46 @@ This plugin provides the `plugin:requirejs/recommended` preset config. Which doe

## List of supported rules

No rules are enabled by default. The `"extends": "plugin:requirejs/recommended"` property in a configuration file enables the marked with a :star:.

The `--fix` option on the command line automatically fixes problems reported by rules marked by a :wrench:.



### Possible Errors

| | Rule | Description |
| :----: | :--- | :---------- |
| :star: | [no-invalid-define](docs/rules/no-invalid-define.md) | Disallow invalid module definitions |
| :star: | [no-invalid-require](docs/rules/no-invalid-require.md) | Disallow invalid `require` or `requirejs` calls |
| :star: | [no-multiple-define](docs/rules/no-multiple-define.md) | Disallow multiple module definitions in one file |
| :star: | [no-assign-exports](docs/rules/no-assign-exports.md) | Disallow assignment to `exports` when using Simplified CommonJS Wrapper |
| :star: | [no-js-extension](docs/rules/no-js-extension.md) | Disallow `.js` extension in dependency paths |
These rules relate to possible syntax or logic errors in your module definition:

| | | Rule | Description |
| :----: | :------: | :--- | :---------- |
| :star: | | [no-invalid-define](docs/rules/no-invalid-define.md) | Disallow invalid module definitions |
| :star: | | [no-invalid-require](docs/rules/no-invalid-require.md) | Disallow invalid `require` or `requirejs` calls |
| :star: | | [no-multiple-define](docs/rules/no-multiple-define.md) | Disallow multiple module definitions in one file |
| :star: | | [no-assign-exports](docs/rules/no-assign-exports.md) | Disallow assignment to `exports` when using Simplified CommonJS Wrapper |
| :star: | | [no-js-extension](docs/rules/no-js-extension.md) | Disallow `.js` extension in dependency paths |

### Stylistic Choices

| | Rule | Description |
| :----: | :--- | :---------- |
| | [no-object-define](docs/rules/no-object-define.md) | Disallow Simple Name/Value Pairs form of `define` |
| | [no-function-define](docs/rules/no-function-define.md) | Disallow Simple Function form of `define` |
| | [no-amd-define](docs/rules/no-amd-define.md) | Disallow AMD (dependency array) form of `define` |
| | [no-named-define](docs/rules/no-named-define.md) | Disallow named module form of `define` |
| | [no-commonjs-wrapper](docs/rules/no-commonjs-wrapper.md) | Disallow use of Simplified CommonJS Wrapper |
| | [no-commonjs-return](docs/rules/no-commonjs-return.md) | Disallow use of `return` statement in a module definition when using Simplified CommonJS Wrapper |
| | [no-commonjs-exports](docs/rules/no-commonjs-exports.md) | Disallow use of `exports` in a module definition when using Simplified CommonJS Wrapper |
| | [no-commonjs-module-exports](docs/rules/no-commonjs-module-exports.md) | Disallow use of `module.exports` in a module definition when using Simplified CommonJS Wrapper |
| | [no-dynamic-require](docs/rules/no-dynamic-require.md) | Disallow use of dynamically generated paths in a `require` call |
| | [no-conditional-require](docs/rules/no-conditional-require.md) | Disallow use of conditional `require` calls |
| | [no-assign-require](docs/rules/no-assign-require.md) | Disallow assignment to `require` or `window.require` |
| | [no-require-tourl](docs/rules/no-require-tourl.md) | Disallow use of `require.toUrl` and `require.nameToUrl` |
| | [enforce-define](docs/rules/enforce-define.md) | Require that all files be wrapped in a `define` call |
| | [one-dependency-per-line](docs/rules/one-dependency-per-line.md) | Enforce line-break rules for AMD dependencies |
| | [amd-function-arity](docs/rules/amd-function-arity.md) | Ensure AMD callbacks have correct number of parameters |
| | [sort-amd-paths](docs/rules/sort-amd-paths.md) | Ensure that required paths are in alphabetical order |
These rules relate to style guidelines, and are therefore quite subjective:

| | | Rule | Description |
| :----: | :------: | :--- | :---------- |
| | | [no-object-define](docs/rules/no-object-define.md) | Disallow Simple Name/Value Pairs form of `define` |
| | | [no-function-define](docs/rules/no-function-define.md) | Disallow Simple Function form of `define` |
| | | [no-amd-define](docs/rules/no-amd-define.md) | Disallow AMD (dependency array) form of `define` |
| | | [no-named-define](docs/rules/no-named-define.md) | Disallow named module form of `define` |
| | | [no-commonjs-wrapper](docs/rules/no-commonjs-wrapper.md) | Disallow use of Simplified CommonJS Wrapper |
| | | [no-commonjs-return](docs/rules/no-commonjs-return.md) | Disallow use of `return` statement in a module definition when using Simplified CommonJS Wrapper |
| | | [no-commonjs-exports](docs/rules/no-commonjs-exports.md) | Disallow use of `exports` in a module definition when using Simplified CommonJS Wrapper |
| | | [no-commonjs-module-exports](docs/rules/no-commonjs-module-exports.md) | Disallow use of `module.exports` in a module definition when using Simplified CommonJS Wrapper |
| | | [no-dynamic-require](docs/rules/no-dynamic-require.md) | Disallow use of dynamically generated paths in a `require` call |
| | | [no-conditional-require](docs/rules/no-conditional-require.md) | Disallow use of conditional `require` calls |
| | | [no-assign-require](docs/rules/no-assign-require.md) | Disallow assignment to `require` or `window.require` |
| | | [no-require-tourl](docs/rules/no-require-tourl.md) | Disallow use of `require.toUrl` and `require.nameToUrl` |
| | | [enforce-define](docs/rules/enforce-define.md) | Require that all files be wrapped in a `define` call |
| | :wrench: | [one-dependency-per-line](docs/rules/one-dependency-per-line.md) | Enforce line-break rules for AMD dependencies |
| | | [amd-function-arity](docs/rules/amd-function-arity.md) | Ensure AMD callbacks have correct number of parameters |
| | | [sort-amd-paths](docs/rules/sort-amd-paths.md) | Ensure that required paths are in alphabetical order |

### Don't see the rule you're looking for?

Expand Down

0 comments on commit 3c3290a

Please sign in to comment.