mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-30 13:42:01 +03:00
627a6bda29
# This PR - Moves dev and ci scripts to the `project.json` file in the twenty-front package - Adds a project.json file in the root of the project with the main start command that start both twenty-server and twenty-front applications concurrently - Updates the script command of the root project with the start:prod command (replacing the start command which will be used in dev with the help of nx) - Add a start:prod command in the twenty-front app, replacing the start command (now used for dev purpose) Issue ref #4645 @charlesBochet @FelixMalfait please let me know how can I improve it --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
85 lines
2.5 KiB
JavaScript
85 lines
2.5 KiB
JavaScript
var path = require('path');
|
|
|
|
module.exports = {
|
|
extends: [
|
|
'plugin:@nx/react',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
'plugin:storybook/recommended',
|
|
],
|
|
plugins: ['react-hooks', 'react-refresh'],
|
|
overrides: [
|
|
{
|
|
files: ['*.ts', '*.tsx'],
|
|
parserOptions: {
|
|
project: ['./tsconfig.base.{json,*.json}'],
|
|
},
|
|
rules: {
|
|
'no-restricted-imports': [
|
|
'error',
|
|
{
|
|
patterns: [
|
|
{
|
|
group: ['@tabler/icons-react'],
|
|
message: 'Please import icons from `twenty-ui`',
|
|
},
|
|
{
|
|
group: ['react-hotkeys-web-hook'],
|
|
importNames: ['useHotkeys'],
|
|
message:
|
|
'Please use the custom wrapper: `useScopedHotkeys` from `twenty-ui`',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
'@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',
|
|
'@nx/workspace-explicit-boolean-predicates-in-if': 'error',
|
|
'@nx/workspace-use-getLoadable-and-getValue-to-get-atoms': 'error',
|
|
'@nx/workspace-useRecoilCallback-has-dependency-array': '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',
|
|
},
|
|
],
|
|
'react-hooks/exhaustive-deps': [
|
|
'warn',
|
|
{
|
|
additionalHooks: 'useRecoilCallback',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['*.stories.@(ts|tsx|js|jsx)'],
|
|
rules: {
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['.storybook/main.@(js|cjs|mjs|ts)'],
|
|
rules: {
|
|
'storybook/no-uninstalled-addons': [
|
|
'error',
|
|
{
|
|
packageJsonLocation: path.resolve(__dirname, './package.json'),
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|