Skip to content

Commit

Permalink
feat: Nx integration for Spartacus (SAP#17311)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgambocjaviniar authored Apr 26, 2023
1 parent 1252bb2 commit 8739c26
Show file tree
Hide file tree
Showing 95 changed files with 15,548 additions and 28,788 deletions.
59 changes: 34 additions & 25 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@
"root": true,
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"parserOptions": {
"project": [
"tsconfig.eslint.json"
],
"project": ["tsconfig.eslint.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": [
"deprecation",
"@spartacus-eslint"
],
"plugins": ["deprecation", "@typescript-eslint", "@nrwl/nx"],
"rules": {
"@angular-eslint/no-host-metadata-property": "off",
"@typescript-eslint/no-empty-interface": "off",
Expand Down Expand Up @@ -74,32 +67,48 @@
"id-blacklist": "off",
"id-match": "off",
"max-len": "off",
"linebreak-style": [
"linebreak-style": ["error", "unix"],
"no-underscore-dangle": "off",
"@nrwl/nx/enforce-module-boundaries": [
"error",
"unix"
],
"no-underscore-dangle": "off"
{
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"],
"notDependOnLibsWithTags": ["type:app"]
},
{
"sourceTag": "type:feature",
"notDependOnLibsWithTags": ["type:integration"]
},
{
"sourceTag": "type:ui",
"notDependOnLibsWithTags": ["type:feature"]
},
{
"sourceTag": "scope:core",
"notDependOnLibsWithTags": ["type:ui", "type:feature"]
}
]
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/eqeqeq": "error"
}
},
{
"files": [
"*.module.ts"
],
"files": ["*.module.ts"],
"rules": {
"@spartacus-eslint/use-default-provide-config": "error"
"@nrwl/nx/workspace/use-default-provide-config": "error"
}
}
]
}
}
6 changes: 0 additions & 6 deletions .github/workflows/ci-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run unit tests for Spartacus libs
Expand All @@ -63,8 +61,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run unit tests for integration libs
Expand Down Expand Up @@ -106,8 +102,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run linting validation
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run unit tests for Spartacus libs
Expand All @@ -88,8 +86,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run unit tests for integration libs
Expand Down Expand Up @@ -133,8 +129,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run linting validation
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:
~/.cache/Cypress
key: nodemodules-${{ github.event.pull_request.base.sha }}
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Run lighthouse score validation
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-ccv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
node_modules
key: nodemodules-${{ steps.branch-to-deploy-commit-id.outputs.commit_hash }}
restore-keys: nodemodules-${{ steps.branch-to-deploy-commit-id.outputs.commit_hash }}
- name: Install angular CLI
run: npm install -g @angular/cli@15
- name: Package installation
run: npm ci
- name: Update ccv2 environment with source
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// The ng lint command uses ESLint under the hood.
"dbaeumer.vscode-eslint",
// Modern CSS/SCSS/Less linter
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
// Nx console - GUI
"nrwl.angular-console"
]
}
Loading

0 comments on commit 8739c26

Please sign in to comment.