Skip to content

Commit

Permalink
[ESLint plugin] Add a rule to enforce folder architecture on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
gitstart-twenty committed Oct 7, 2024
1 parent 491fe80 commit 6a42d58
Show file tree
Hide file tree
Showing 4 changed files with 582 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-project-structure": "^3.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
Expand Down
5 changes: 5 additions & 0 deletions packages/twenty-front/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const folderStructureConfig = require('./project-structure.cjs');
module.exports = {
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
ignorePatterns: [
Expand All @@ -15,6 +16,10 @@ module.exports = {
'tsup.ui.index.tsx',
'__mocks__',
],
plugins: ['project-structure'],
rules: {
'project-structure/folder-structure': ['warn', folderStructureConfig],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
Expand Down
Loading

0 comments on commit 6a42d58

Please sign in to comment.