2024-04-04 13:05:26 +03:00
|
|
|
module.exports = {
|
|
|
|
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
|
|
|
|
ignorePatterns: ['!**/*'],
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.ts', '*.tsx'],
|
|
|
|
parserOptions: {
|
|
|
|
project: ['packages/twenty-ui/tsconfig.{json,*.json}'],
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'no-restricted-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
patterns: [
|
|
|
|
{
|
|
|
|
group: ['@tabler/icons-react'],
|
2024-04-15 13:05:06 +03:00
|
|
|
message: 'Please import icons from `@ui/display`',
|
2024-04-04 13:05:26 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
group: ['react-hotkeys-web-hook'],
|
|
|
|
importNames: ['useHotkeys'],
|
|
|
|
message:
|
2024-04-15 13:05:06 +03:00
|
|
|
'Please use the custom wrapper: `useScopedHotkeys` from `@ui/utilities`',
|
2024-04-04 13:05:26 +03:00
|
|
|
},
|
2024-05-03 20:19:21 +03:00
|
|
|
{
|
|
|
|
group: ['lodash'],
|
|
|
|
message:
|
|
|
|
"Please use the standalone lodash package (for instance: `import groupBy from 'lodash.groupby'` instead of `import { groupBy } from 'lodash'`)",
|
|
|
|
},
|
2024-04-04 13:05:26 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'@nx/dependency-checks': 'error',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|