Skip to content

Commit 7f54220

Browse files
committed
Add info into the meta property of rules
1 parent 6d3d0d1 commit 7f54220

16 files changed

+117
-31
lines changed

lib/rules/array-foreach.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'suggestion',
4+
docs: {
5+
description: 'enforce `for..of` loops over `Array.forEach`',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/array-foreach.md'
7+
},
48
schema: []
59
},
610

lib/rules/async-currenttarget.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'problem',
4+
docs: {
5+
description: 'disallow `event.currentTarget` calls inside of async functions',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/async-currenttarget.md'
7+
},
48
schema: []
59
},
610

lib/rules/async-preventdefault.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'problem',
4+
docs: {
5+
description: 'disallow `event.preventDefault` calls inside of async functions',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/async-preventDefault.md'
7+
},
48
schema: []
59
},
610

lib/rules/authenticity-token.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'problem',
4+
docs: {
5+
description: 'disallow usage of CSRF tokens in JavaScript',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/authenticity-token.md'
7+
},
48
schema: []
59
},
610

lib/rules/get-attribute.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ function isValidAttribute(name) {
1919

2020
module.exports = function(context) {
2121
return {
22+
meta: {
23+
type: 'problem',
24+
docs: {
25+
description: 'disallow wrong usage of attribute names',
26+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/get-attribute.md'
27+
},
28+
fixable: 'code',
29+
schema: []
30+
},
2231
CallExpression(node) {
2332
if (!node.callee.property) return
2433

lib/rules/js-class-name.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'suggestion',
4+
docs: {
5+
description: 'enforce a naming convention for js- prefixed classes',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/js-class-name.md'
7+
},
48
schema: []
59
},
610

lib/rules/no-blur.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
module.exports = function(context) {
22
return {
3+
meta: {
4+
type: 'problem',
5+
docs: {
6+
description: 'disallow usage of `Element.prototype.blur()`',
7+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/no-blur.md'
8+
},
9+
schema: []
10+
},
311
CallExpression(node) {
412
if (node.callee.property && node.callee.property.name === 'blur') {
513
context.report(node, 'Do not use element.blur(), instead restore the focus of a previous element.')
614
}
715
}
816
}
917
}
10-
11-
module.exports.schema = []

lib/rules/no-d-none.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
module.exports = {
2+
meta: {
3+
type: 'problem',
4+
docs: {
5+
description: 'disallow usage the `d-none` CSS class',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/no-d-none.md'
7+
},
8+
schema: []
9+
},
210
create(context) {
311
return {
412
CallExpression(node) {

lib/rules/no-dataset.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'problem',
4+
docs: {
5+
description: 'enforce usage of `Element.prototype.getAttribute` instead of `Element.prototype.datalist`',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/no-dataset.md'
7+
},
48
schema: []
59
},
610

lib/rules/no-implicit-buggy-globals.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
meta: {
3-
docs: {},
3+
type: 'problem',
4+
docs: {
5+
description: 'disallow implicit global variables',
6+
url: 'https://github.com/github/eslint-plugin-github/blob/main/docs/rules/no-implicit-buggy-globals.md'
7+
},
48
schema: []
59
},
610

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy