Skip to content

Commit e1512cd

Browse files
committed
Style(eslint-config-react): Reformat code with prettier
1 parent 4bdb1b1 commit e1512cd

2 files changed

Lines changed: 37 additions & 33 deletions

File tree

packages/eslint-config-react/rules/react-a11y.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ module.exports = {
33
rules: {
44
// Enforce all anchors are valid, navigable elements
55
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
6-
"jsx-a11y/anchor-is-valid": [
7-
"warn",
6+
'jsx-a11y/anchor-is-valid': [
7+
'warn',
88
{
9-
"components": ["Link"],
10-
"specialLink": ["to", "hrefLeft", "hrefRight"],
11-
"aspects": ["noHref", "invalidHref", "preferButton"]
12-
}
9+
components: ['Link'],
10+
specialLink: ['to', 'hrefLeft', 'hrefRight'],
11+
aspects: ['noHref', 'invalidHref', 'preferButton'],
12+
},
1313
],
1414

1515
// Enforce that a label tag has a text label and an associated control.
1616
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md
17-
"jsx-a11y/label-has-associated-control": [
17+
'jsx-a11y/label-has-associated-control': [
1818
'error',
1919
{
20-
"components": ["Label"],
21-
"required": {
22-
"some": ["nesting", "id"]
20+
components: ['Label'],
21+
required: {
22+
some: ['nesting', 'id'],
2323
},
24-
"allowChildren": false
25-
}
24+
allowChildren: false,
25+
},
2626
],
2727
},
2828
};

packages/eslint-config-react/rules/react.js

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = {
2-
extends: [
3-
'eslint-config-airbnb/rules/react',
4-
].map(require.resolve),
2+
extends: ['eslint-config-airbnb/rules/react'].map(require.resolve),
53
rules: {
64
// This rule allows you to enforce curly braces or disallow unnecessary curly braces
75
// in JSX props and/or children
@@ -10,7 +8,7 @@ module.exports = {
108

119
// Prevent missing displayName in a React component definition
1210
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
13-
"react/display-name": ["warn", { "ignoreTranspilerName": true }],
11+
'react/display-name': ['warn', { ignoreTranspilerName: true }],
1412

1513
// PropTypes improve the reusability of your component by validating the received data
1614
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
@@ -27,17 +25,20 @@ module.exports = {
2725
// Restrict file extensions that may contain JSX
2826
// JSX belongs to .js files.
2927
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
30-
"react/jsx-filename-extension": ['error', { "extensions": [".js", ".jsx"] }],
28+
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }],
3129

3230
// Disallow JSX props spreading
3331
// Used inside HOC, that is fine.
3432
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
35-
"react/jsx-props-no-spreading": ['warn', {
36-
html: 'enforce',
37-
custom: 'enforce',
38-
explicitSpread: 'ignore',
39-
exceptions: [],
40-
}],
33+
'react/jsx-props-no-spreading': [
34+
'warn',
35+
{
36+
html: 'enforce',
37+
custom: 'enforce',
38+
explicitSpread: 'ignore',
39+
exceptions: [],
40+
},
41+
],
4142

4243
// Enforce consistent usage of destructuring assignment of props, state, and context
4344
'react/destructuring-assignment': [
@@ -83,14 +84,17 @@ module.exports = {
8384

8485
// Prevent missing parentheses around multilines JSX
8586
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md
86-
'react/jsx-wrap-multilines': ['warn', {
87-
declaration: 'parens-new-line',
88-
assignment: 'parens-new-line',
89-
return: 'parens-new-line',
90-
arrow: 'parens-new-line',
91-
condition: 'parens-new-line',
92-
logical: 'parens-new-line',
93-
prop: 'parens-new-line',
94-
}],
95-
}
87+
'react/jsx-wrap-multilines': [
88+
'warn',
89+
{
90+
declaration: 'parens-new-line',
91+
assignment: 'parens-new-line',
92+
return: 'parens-new-line',
93+
arrow: 'parens-new-line',
94+
condition: 'parens-new-line',
95+
logical: 'parens-new-line',
96+
prop: 'parens-new-line',
97+
},
98+
],
99+
},
96100
};

0 commit comments

Comments
 (0)