chore: use common eslint config for most packages (#4705)
Split from https://github.com/twentyhq/twenty/pull/4518 Related to #4766 Mutualizes eslint config between projects. I didn't include `twenty-server` in this PR as this was causing too many lint errors.
This commit is contained in:
32
packages/twenty-ui/.eslintrc.cjs
Normal file
32
packages/twenty-ui/.eslintrc.cjs
Normal file
@ -0,0 +1,32 @@
|
||||
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'],
|
||||
message: 'Please import icons from `src/display`',
|
||||
},
|
||||
{
|
||||
group: ['react-hotkeys-web-hook'],
|
||||
importNames: ['useHotkeys'],
|
||||
message:
|
||||
'Please use the custom wrapper: `useScopedHotkeys` from `src/utilities`',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'@nx/dependency-checks': 'error',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user