2024-02-25 19:32:08 +03:00
|
|
|
// eslint-disable-next-line
|
|
|
|
const path = require('path');
|
|
|
|
|
2024-02-12 14:30:23 +03:00
|
|
|
module.exports = {
|
|
|
|
extends: [
|
2024-02-25 19:32:08 +03:00
|
|
|
'plugin:@nx/react',
|
|
|
|
'plugin:react/recommended',
|
2024-02-12 14:30:23 +03:00
|
|
|
'plugin:react-hooks/recommended',
|
2024-02-25 19:32:08 +03:00
|
|
|
'plugin:storybook/recommended',
|
|
|
|
'../../.eslintrc.js',
|
2024-02-12 14:30:23 +03:00
|
|
|
],
|
2024-02-25 19:32:08 +03:00
|
|
|
plugins: ['react-hooks', 'react-refresh'],
|
2024-03-26 16:37:36 +03:00
|
|
|
ignorePatterns: ['!**/*', 'node_modules', 'dist', 'src/generated/*.tsx'],
|
2024-02-12 14:30:23 +03:00
|
|
|
rules: {
|
2024-02-25 19:32:08 +03:00
|
|
|
'@nx/workspace-effect-components': 'error',
|
|
|
|
'@nx/workspace-no-hardcoded-colors': 'error',
|
|
|
|
'@nx/workspace-matching-state-variable': 'error',
|
|
|
|
'@nx/workspace-sort-css-properties-alphabetically': 'error',
|
|
|
|
'@nx/workspace-styled-components-prefixed-with-styled': 'error',
|
|
|
|
'@nx/workspace-no-state-useref': 'error',
|
|
|
|
'@nx/workspace-component-props-naming': 'error',
|
|
|
|
|
|
|
|
'react/no-unescaped-entities': 'off',
|
|
|
|
'react/prop-types': 'off',
|
|
|
|
'react/jsx-key': 'off',
|
|
|
|
'react/display-name': 'off',
|
|
|
|
'react/jsx-uses-react': 'off',
|
|
|
|
'react/react-in-jsx-scope': 'off',
|
|
|
|
'react/jsx-no-useless-fragment': 'off',
|
|
|
|
'react/jsx-props-no-spreading': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
explicitSpread: 'ignore',
|
|
|
|
},
|
2024-02-12 14:30:23 +03:00
|
|
|
],
|
|
|
|
},
|
2024-02-25 19:32:08 +03:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
|
|
parserOptions: {
|
|
|
|
project: ['packages/twenty-chrome-extension/tsconfig.*?.json'],
|
|
|
|
},
|
|
|
|
rules: {},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['.storybook/main.@(js|cjs|mjs|ts)'],
|
|
|
|
rules: {
|
|
|
|
'storybook/no-uninstalled-addons': [
|
|
|
|
'error',
|
|
|
|
{ packageJsonLocation: path.resolve('../../package.json') },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['.storybook/**/*', '**/*.stories.tsx', '**/*.test.@(ts|tsx)'],
|
|
|
|
rules: {
|
|
|
|
'no-console': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|