I got this error, but only on VErsel not in localstore. Why the difference?
./src/pages/acl/index.tsx
20:58:47.129 25:80 Error: `'` can be escaped with `'`, `‘`, `'`, `’`. react/no-unescaped-entities
Shall I scan through all the code for special characters? Why client yarn build
does not raise error locally?
return (
<Grid container spacing={6}>
<Grid item md={6} xs={12}>
<Card>
<CardHeader title='Common' />
<CardContent>
<Typography sx={{ mb: 4 }}>No ability is required to view this card</Typography>
<Typography sx={{ color: 'primary.main' }}>This card is visible to 'user' and 'admin' both</Typography>
</CardContent>
</Card>
</Grid>
{ability?.can('read', 'analytics') ? (
<Grid item md={6} xs={12}>
<Card>
<CardHeader title='Analytics' />
<CardContent>
<Typography sx={{ mb: 4 }}>User with 'Analytics' subject's 'Read' ability can view this card</Typography>
<Typography sx={{ color: 'error.main' }}>This card is visible to 'admin' only</Typography>
</CardContent>
</Card>
</Grid>
) : null}
</Grid>
)
}
You're getting an ESLint error.
You can either:
next.config.js
module.exports = {
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
}
.eslintrc.*
:"rules": {
"react/no-unescaped-entities": "off"
}
1. /* eslint react/no-unescaped-entities */