Skip to content

Commit

Permalink
[FEATURE][BCMI-407] Modify project structure to incorporate a CMS (#411)
Browse files Browse the repository at this point in the history
* Refactor folder structure

* Update to Angular 10

* Fix deprecated code

* Update to Angular 18, Node 20

* Minor styling fixes

* Update Strapi

* Minor cosmetic changes

* Add content types, refactor leaflet, minor linting

* More linting

* Update build config

* Replace Karma with Jest, fix tests

* Sonar lint fixes

* Fix security hotspot: rel=noopener

* Sonar lint fixes

* Lint fixes, disabled any rule temporarily

* Cleanup console.log, TODO
  • Loading branch information
sggerard authored Sep 20, 2024
1 parent 4b64339 commit 3389e36
Show file tree
Hide file tree
Showing 306 changed files with 50,463 additions and 14,670 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
Expand All @@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: npm install, and test
run: |
npm install
npm run test-ci
npm --prefix bcmi install
npm run --prefix bcmi test-ci
env:
CI: true
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [10.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
Expand All @@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run lint
npm --prefix bcmi install
npm run --prefix bcmi lint
env:
CI: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

# compiled output
/dist
/bcmi/dist
/tmp
/out-tsc
/cms/dist
/cms/.tmp

# dependencies
/node_modules
/bcmi/node_modules
/cms/node_modules

# IDEs and editors
/.idea
Expand All @@ -21,6 +26,7 @@
.vscode/*

# misc
/bcmi/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
214 changes: 214 additions & 0 deletions bcmi/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
*/
module.exports = {
"env": {
"browser": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-import",
"@angular-eslint/eslint-plugin",
"@typescript-eslint",
"@typescript-eslint/tslint"
],
"root": true,
"rules": {
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/component-selector": [
"off",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/directive-selector": [
"off",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/indent": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/quotes": [
"error",
"single"
],
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"brace-style": [
"error",
"1tbs"
],
"curly": "error",
"dot-notation": "off",
"eol-last": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-denylist": "off",
"id-match": "off",
"import/no-deprecated": "warn",
"indent": "off",
"max-len": [
"off",
{
"code": 140
}
],
"no-bitwise": "error",
"no-caller": "error",
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"error",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"dirxml",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context",
"createTask"
]
}
],
"no-debugger": "error",
"no-empty": "off",
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-restricted-imports": "off",
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "error",
"prefer-const": "off",
"quotes": "off",
"radix": "error",
"semi": "off",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"import-spacing": true,
"use-life-cycle-interface": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}
]
}
};
File renamed without changes.
2 changes: 0 additions & 2 deletions README.md → bcmi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ ng g module admin --routing
## Running Tests

### Unit tests

Set up via [Karma](https://karma-runner.github.io), [Jasmine](https://jasmine.github.io/).
1. Run `ng test` to execute the unit tests.

### End-to-end functional tests
Expand Down
Loading

0 comments on commit 3389e36

Please sign in to comment.