Skip to content

Commit

Permalink
Merge pull request #32 from grommet/recommended-config-defaults
Browse files Browse the repository at this point in the history
Rules updated to default to 'warn'
  • Loading branch information
taysea authored Sep 9, 2022
2 parents 9648622 + 95074a0 commit 6cdc188
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ module.exports.configs = {
plugins: ['grommet'],
rules: {
'grommet/anchor-label': 'warn',
'grommet/button-icon-a11ytitle': 'error',
'grommet/button-single-kind': 'error',
'grommet/datatable-aria-describedby': 'error',
'grommet/datatable-groupby-onmore': 'error',
'grommet/formfield-htmlfor-id': 'error',
'grommet/formfield-name': 'error',
'grommet/formfield-prefer-children': 'error',
'grommet/image-alt-text': 'error',
'grommet/spinner-message': 'error',
'grommet/button-icon-a11ytitle': 'warn',
'grommet/button-single-kind': 'warn',
'grommet/datatable-aria-describedby': 'warn',
'grommet/datatable-groupby-onmore': 'warn',
'grommet/formfield-htmlfor-id': 'warn',
'grommet/formfield-name': 'warn',
'grommet/formfield-prefer-children': 'warn',
'grommet/image-alt-text': 'warn',
'grommet/spinner-message': 'warn',
},
},
};
1 change: 1 addition & 0 deletions lib/rules/anchor-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Rule to enforce descriptive anchor label',
category: 'Best Practices',
Expand Down
1 change: 1 addition & 0 deletions lib/rules/button-icon-a11ytitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Rule to enforce a11yTitle on icon-only buttons',
category: 'Best Practices',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/button-single-kind.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module.exports = {
meta: {
type: 'problem',
type: 'suggestion',
docs: {
description: 'Rule to ensure Button does not have multiple kinds applied',
category: 'Best Practices',
Expand Down
1 change: 1 addition & 0 deletions lib/rules/formfield-htmlfor-id.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module.exports = {
meta: {
type: 'problem',
docs: {
description:
'Rule to enforce matching htmlFor and id on FormField and its child input, respectively',
Expand Down
1 change: 1 addition & 0 deletions lib/rules/formfield-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Rule to enforce name on FormField and its child input',
category: 'Best Practices',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/formfield-prefer-children.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module.exports = {
meta: {
type: 'suggestion',
docs: {
description:
'Recommend use of children with FormField as opposed to component property',
Expand All @@ -22,7 +23,6 @@ module.exports = {
'formfield-prefer-children': `It is not recommended to use the 'component' property. Instead,
implement the input as a child of FormField.`,
},
type: 'suggestion',
},

create: function (context) {
Expand Down

0 comments on commit 6cdc188

Please sign in to comment.