mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
## Summary This PR reduces clutter at the repository root to improve navigation on GitHub. The README is now visible much sooner when browsing the repo. ## Changes ### Deleted from root - `nx` wrapper script → use `npx nx` instead - `render.yaml` → no longer used - `jest.preset.js` → inlined `@nx/jest/preset` directly in each package's jest.config - `.prettierrc` → moved config to `package.json` - `.prettierignore` → patterns already covered by `.gitignore` ### Moved/Consolidated | From | To | |------|-----| | `Makefile` | `packages/twenty-docker/Makefile` (merged) | | `crowdin-app.yml` | `.github/crowdin-app.yml` | | `crowdin-docs.yml` | `.github/crowdin-docs.yml` | | `.vale.ini` | `.github/vale.ini` | | `tools/eslint-rules/` | `packages/twenty-eslint-rules/` | | `eslint.config.react.mjs` | `packages/twenty-front/eslint.config.react.mjs` | ## Result Root items reduced from ~32 to ~22 (folders + files). ## Files updated - GitHub workflow files updated to reference new crowdin config paths - Jest configs updated to use `@nx/jest/preset` directly - ESLint configs updated with new import paths - `nx.json` updated with new paths - `package.json` now includes prettier config and updated workspace paths - Dockerfile updated with new eslint-rules path
76 lines
1.8 KiB
JavaScript
76 lines
1.8 KiB
JavaScript
import typescriptParser from '@typescript-eslint/parser';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const config = [
|
|
// Extend shared React configuration
|
|
...reactConfig,
|
|
|
|
// Global ignores
|
|
{
|
|
ignores: [
|
|
'**/node_modules/**',
|
|
'**/mockServiceWorker.js',
|
|
'**/generated*/**',
|
|
'**/build/**',
|
|
'**/coverage/**',
|
|
'**/storybook-static/**',
|
|
'**/*config.js',
|
|
'**/__mocks__/**',
|
|
'src/testing/mock-data/**',
|
|
],
|
|
},
|
|
|
|
// CommonJS files configuration
|
|
{
|
|
files: ['**/*.cjs'],
|
|
languageOptions: {
|
|
globals: {
|
|
process: 'readonly',
|
|
__dirname: 'readonly',
|
|
__filename: 'readonly',
|
|
module: 'readonly',
|
|
require: 'readonly',
|
|
exports: 'writable',
|
|
global: 'readonly',
|
|
Buffer: 'readonly',
|
|
},
|
|
sourceType: 'commonjs',
|
|
},
|
|
},
|
|
|
|
// TypeScript project-specific configuration
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
parser: typescriptParser,
|
|
parserOptions: {
|
|
project: [
|
|
path.resolve(__dirname, 'tsconfig.dev.json'),
|
|
path.resolve(__dirname, 'tsconfig.storybook.json'),
|
|
path.resolve(__dirname, 'tsconfig.spec.json'),
|
|
],
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
];
|
|
|
|
// Add CI-specific rules if in CI environment
|
|
// eslint-disable-next-line no-undef
|
|
if (process.env.NX_TASK_TARGET_CONFIGURATION === 'ci') {
|
|
config.push({
|
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
rules: {
|
|
'no-console': 'error',
|
|
},
|
|
});
|
|
}
|
|
|
|
export default config;
|