Skip to content

Commit

Permalink
docs: update documentation #48
Browse files Browse the repository at this point in the history
  • Loading branch information
ernscht committed Aug 2, 2023
1 parent b479e7a commit 5dd0112
Show file tree
Hide file tree
Showing 12 changed files with 251 additions and 324 deletions.
8 changes: 4 additions & 4 deletions bin/write-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ var data;
function getESLintUrl(name, groupName) {
switch (groupName) {
case 'imports':
return 'https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/' + name + '.md';
return 'https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/' + name + '.md';
case 'react':
return 'https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/' + name + '.md';
return 'https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/' + name + '.md';
case 'react-a11y':
return 'https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/' + name + '.md';
return 'https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/' + name + '.md';
case 'react-hooks':
return 'https://reactjs.org/docs/hooks-rules.html';
case 'typescript':
return (
'https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/' +
'https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/' +
name.replace(/.ts$/, '') +
'.md'
);
Expand Down
40 changes: 20 additions & 20 deletions documentation/imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Imports


### [Default](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md)
### [Default](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/default.md)

> ensure default import coupled with default export
Expand All @@ -13,7 +13,7 @@



### [Export](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md)
### [Export](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/export.md)

> disallow invalid exports, e.g. multiple defaults
Expand All @@ -24,7 +24,7 @@



### [Extensions](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md)
### [Extensions](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/extensions.md)

> Ensure consistent use of file extension within the import path
Expand All @@ -35,7 +35,7 @@



### [Imports first](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md)
### [Imports first](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/imports-first.md)

> disallow non-import statements appearing before import statements
Expand All @@ -61,7 +61,7 @@ initWith(foo);



### [Named](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md)
### [Named](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/named.md)

> ensure named imports coupled with named exports
Expand All @@ -72,7 +72,7 @@ initWith(foo);



### [Namespace](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md)
### [Namespace](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/namespace.md)

> enforces names exist at the time they are dereferenced, when imported as a full namespace
Expand All @@ -83,7 +83,7 @@ initWith(foo);



### [Newline after import](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md)
### [Newline after import](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/newline-after-import.md)

> Require a newline after the last import/require in a group
Expand All @@ -94,7 +94,7 @@ initWith(foo);



### [No amd](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md)
### [No amd](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-amd.md)

> disallow AMD require/define
Expand All @@ -105,7 +105,7 @@ initWith(foo);



### [No commonjs](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md)
### [No commonjs](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-commonjs.md)

> disallow require()
Expand All @@ -116,7 +116,7 @@ initWith(foo);



### [No deprecated](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md)
### [No deprecated](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-deprecated.md)

> disallow use of jsdoc-marked-deprecated imports
Expand All @@ -127,7 +127,7 @@ initWith(foo);



### [No duplicates](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md)
### [No duplicates](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-duplicates.md)

> disallow duplicate imports
Expand All @@ -149,7 +149,7 @@ import { something } from './mod.js';



### [No extraneous dependencies](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md)
### [No extraneous dependencies](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-extraneous-dependencies.md)

> Forbid the use of extraneous packages
Expand All @@ -160,7 +160,7 @@ import { something } from './mod.js';



### [No mutable exports](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md)
### [No mutable exports](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-mutable-exports.md)

> Forbid mutable exports
Expand All @@ -181,7 +181,7 @@ export { count };



### [No named as default member](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md)
### [No named as default member](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-named-as-default-member.md)

> warn on accessing default export property names that are also named exports
Expand All @@ -192,7 +192,7 @@ export { count };



### [No named as default](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md)
### [No named as default](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-named-as-default.md)

> do not allow a default import name to match a named export
Expand All @@ -203,7 +203,7 @@ export { count };



### [No namespace](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md)
### [No namespace](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-namespace.md)

> disallow namespace imports
Expand All @@ -214,7 +214,7 @@ export { count };



### [No nodejs modules](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md)
### [No nodejs modules](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-nodejs-modules.md)

> No Node.js builtin modules
Expand All @@ -225,7 +225,7 @@ export { count };



### [No unresolved](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md)
### [No unresolved](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/no-unresolved.md)

> ensure imports point to files/modules that can be resolved
Expand All @@ -236,7 +236,7 @@ export { count };



### [Order](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md)
### [Order](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/order.md)

> Enforce a convention in module import order
Expand All @@ -247,7 +247,7 @@ export { count };



### [Prefer default export](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md)
### [Prefer default export](https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules/prefer-default-export.md)

> Require modules with a single export to use a default export
Expand Down
32 changes: 16 additions & 16 deletions documentation/react-a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## React a11y


### [Alt tag](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-tag.md)
### [Alt tag](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-tag.md)

> Require <img> to have a non-empty `alt` prop, or role="presentation"
Expand All @@ -28,7 +28,7 @@ function Foo({ alt, src }) {



### [Aria props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md)
### [Aria props](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-props.md)

> Enforce all aria-* props are valid.
Expand All @@ -52,7 +52,7 @@ function Foo({ alt, src }) {



### [Aria proptypes](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md)
### [Aria proptypes](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md)

> Enforce ARIA state and property values are valid.
Expand All @@ -74,7 +74,7 @@ function Foo({ alt, src }) {



### [Aria role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md)
### [Aria role](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-role.md)

> Require ARIA roles to be valid and non-abstract
Expand All @@ -100,7 +100,7 @@ function Foo({ alt, src }) {



### [Aria unsupported elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md)
### [Aria unsupported elements](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md)

> Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
Expand All @@ -122,7 +122,7 @@ function Foo({ alt, src }) {



### [Href no hash](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/href-no-hash.md)
### [Href no hash](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/href-no-hash.md)

> disallow href "#"
Expand All @@ -147,7 +147,7 @@ function Foo({ alt, src }) {



### [Img redundant alt](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md)
### [Img redundant alt](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md)

> Prevent img alt text from containing redundant words like "image", "picture", or "photo"
Expand Down Expand Up @@ -177,7 +177,7 @@ function Foo({ alt, src }) {



### [Label has for](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md)
### [Label has for](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-for.md)

> require that JSX labels use "htmlFor"
Expand All @@ -203,7 +203,7 @@ function Foo({ htmlFor, props }) {



### [Mouse events have key events](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md)
### [Mouse events have key events](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md)

> require that mouseover/out come with focus/blur, for keyboard-only users
Expand All @@ -229,7 +229,7 @@ function Foo({ htmlFor, props }) {



### [No access key](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md)
### [No access key](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-access-key.md)

> Prevent use of `accessKey`
Expand All @@ -251,7 +251,7 @@ function Foo({ htmlFor, props }) {



### [No onchange](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md)
### [No onchange](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md)

> require onBlur instead of onChange
Expand Down Expand Up @@ -281,7 +281,7 @@ function Foo({ htmlFor, props }) {



### [Onclick has focus](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/onclick-has-focus.md)
### [Onclick has focus](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/onclick-has-focus.md)

> Enforce that elements with onClick handlers must be focusable.
Expand All @@ -305,7 +305,7 @@ function Foo({ htmlFor, props }) {



### [Onclick has role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/onclick-has-role.md)
### [Onclick has role](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/onclick-has-role.md)

> require things with onClick to have an aria role
Expand Down Expand Up @@ -342,7 +342,7 @@ function Foo({ htmlFor, props }) {



### [Role has required aria props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md)
### [Role has required aria props](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-has-required-aria-props.md)

> Enforce that elements with ARIA roles must have all required attributes for that role.
Expand Down Expand Up @@ -375,7 +375,7 @@ function Foo({ htmlFor, props }) {



### [Role supports aria props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md)
### [Role supports aria props](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md)

> Enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role.
Expand Down Expand Up @@ -409,7 +409,7 @@ function Foo({ htmlFor, props }) {



### [Tabindex no positive](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md)
### [Tabindex no positive](https://github.com/devsenexx/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md)

> Enforce tabIndex value is not greater than zero.
Expand Down
Loading

0 comments on commit 5dd0112

Please sign in to comment.