Skip to content

Commit

Permalink
fix(gatsby): Add allowNamespace option to ESLint config (#30023)
Browse files Browse the repository at this point in the history
* Add allowNamespace option to PascalCase eslint rule

* update package

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
LekoArts and gatsbybot committed Mar 25, 2021
1 parent 5c9b744 commit 98001eb
Show file tree
Hide file tree
Showing 3 changed files with 266 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Expand Up @@ -64,7 +64,7 @@
"eslint-plugin-graphql": "^4.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-webpack-plugin": "^2.5.2",
"event-source-polyfill": "^1.0.15",
Expand Down
7 changes: 6 additions & 1 deletion packages/gatsby/src/utils/eslint-config.ts
Expand Up @@ -84,7 +84,12 @@ export const eslintConfig = (
tagName: `graphql`,
},
],
"react/jsx-pascal-case": `warn`,
"react/jsx-pascal-case": [
`warn`,
{
allowNamespace: true,
},
],
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/master/docs/rules
"jsx-a11y/accessible-emoji": `warn`,
"jsx-a11y/alt-text": `warn`,
Expand Down

0 comments on commit 98001eb

Please sign in to comment.