Skip to content

Commit

Permalink
Merge pull request #973 from CodeForAfrica/fix/civicsignal_lint_issues
Browse files Browse the repository at this point in the history
@/CivicSignalBlog - fix eslint failure due to custom Payload components
  • Loading branch information
koechkevin authored Oct 25, 2024
2 parents 74aeef4 + f628870 commit d27b58c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions apps/civicsignalblog/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ module.exports = {
extends: ["eslint-config-commons-ui/next"],
rules: {
"react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files
// Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
tsx: "never",
},
],
},
settings: {
"import/resolver": {
Expand Down
2 changes: 2 additions & 0 deletions apps/civicsignalblog/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = {
"<rootDir>/../../packages/commons-ui-core/src/$1",
"^@/commons-ui/next/(.*)$":
"<rootDir>/../../packages/commons-ui-next/src/$1",
"^@/commons-ui/payload/(.*)$":
"<rootDir>/../../packages/commons-ui-payload/src/$1",
},
transformIgnorePatterns: ["<rootDir>/node_modules/(?!camelcase-keys)"],
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ exports[`<PageHeader /> renders unchanged 1`] = `
</h2>
<div
class="MuiBox-root css-0"
typographyprops="[object Object]"
>
<h2
class="MuiTypography-root MuiTypography-h2 css-hd3436-MuiTypography-root"
<p
class="MuiTypography-root MuiTypography-body1 css-oo170e-MuiTypography-root"
>
Let's
<strong>
Expand All @@ -27,7 +28,7 @@ exports[`<PageHeader /> renders unchanged 1`] = `
<strong>
together
</strong>
</h2>
</p>
</div>
</div>
</div>
Expand Down

0 comments on commit d27b58c

Please sign in to comment.