Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to nx workspace #1483

Draft
wants to merge 21 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {}
}
86 changes: 0 additions & 86 deletions .eslintrc.js

This file was deleted.

53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
6 changes: 0 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ jobs:
- name: Setup the project
run: |
yarn run setup
npx lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core
npx lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core
npx lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core
npx lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core
npx lerna add @pattern-lab/engine-twig --scope=@pattern-lab/core
npx lerna add @pattern-lab/engine-react --scope=@pattern-lab/core

- name: Run Unit Tests
run: yarn run test
40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
node_modules/
pattern_exports/
.DS_Store
Thumbs.db
.nyc_output/
.idea/
.env
packages/core/test/public
packages/*/public
!packages/core/test/patterns/public/.gitkeep
!packages/core/test/patterns/testDependencyGraph.json
lerna-debug.log
packages/edition-node-gulp/dependencyGraph.json
packages/uikit-workshop/dist
.yarn

yarn-error.log

# compiled output
dist
tmp
/out-tsc

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
.env

# System Files
.DS_Store
Thumbs.db

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# npx --no-install commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install pretty-quick --staged
# npx --no-install pretty-quick --staged
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/*.json
**/README.md
**/node_modules/
**/bower_components/
Expand All @@ -9,9 +8,10 @@ packages/core/scripts/api.handlebars
packages/core/scripts/events.handlebars
packages/core/test/files/annotations.js
packages/**/annotations.js
*.json
*.md
**/reset.scss
**/_meta/_head.*
**/_meta/_foot.*
**/development-edition*/source/_patterns/**
/dist
/coverage
7 changes: 6 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"singleQuote": true,
"endOfLine": "auto"
"endOfLine": "auto",
"trailingComma": "all",
"printWidth": 112,
"arrowParens": "always",
"useTabs": false,
"tabWidth": 2
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["editorconfig.editorconfig", "henrynguyen5-vsc.vsc-nvm"]
"recommendations": ["editorconfig.editorconfig", "henrynguyen5-vsc.vsc-nvm", "firsttris.vscode-jest-runner"]
}
3 changes: 0 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@

# uikit-workshop owner
/packages/uikit-workshop @sghoweri

# engine-nunjucks owner
/packages/engine-nunjucks @danwhite85
27 changes: 0 additions & 27 deletions babel.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
};
7 changes: 7 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
collectCoverage: true,
coverageReporters: ['lcov', 'text'],
};
38 changes: 0 additions & 38 deletions lerna.json

This file was deleted.

Loading