Skip to content

Commit

Permalink
Disable react/no-unknown-property rule for Emotion.js' css prop (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Apr 3, 2023
1 parent 2197f0e commit 5c4d73c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-humans-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/foundry': patch
---

Disabled the `react/no-unknown-property` rule for Emotion.js' `css` prop.
32 changes: 32 additions & 0 deletions src/configs/eslint/__snapshots__/config.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ exports[`eslint with options should return a config for {
"object-curly-newline": "off",
"operator-linebreak": "off",
"quote-props": "off",
"react/no-unknown-property": [
"error",
{
"ignore": [
"css",
],
},
],
},
"settings": {
"import/resolver": {
Expand Down Expand Up @@ -1545,6 +1553,14 @@ exports[`eslint with options should return a config for {
"object-curly-newline": "off",
"operator-linebreak": "off",
"quote-props": "off",
"react/no-unknown-property": [
"error",
{
"ignore": [
"css",
],
},
],
},
"settings": {
"import/resolver": {
Expand Down Expand Up @@ -3012,6 +3028,14 @@ exports[`eslint with options should return a config for {
"object-curly-newline": "off",
"operator-linebreak": "off",
"quote-props": "off",
"react/no-unknown-property": [
"error",
{
"ignore": [
"css",
],
},
],
},
"settings": {
"import/resolver": {
Expand Down Expand Up @@ -5117,6 +5141,14 @@ exports[`eslint with options should return a config for {
"object-curly-newline": "off",
"operator-linebreak": "off",
"quote-props": "off",
"react/no-unknown-property": [
"error",
{
"ignore": [
"css",
],
},
],
},
"settings": {
"import/resolver": {
Expand Down
1 change: 1 addition & 0 deletions src/configs/eslint/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ function customizeFramework(frameworks?: Framework[]) {
'@emotion/no-vanilla': 'error',
'@emotion/pkg-renaming': 'error',
'@emotion/styled-import': 'error',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
},
[Framework.JEST]: {
Expand Down

0 comments on commit 5c4d73c

Please sign in to comment.