Skip to content

Commit

Permalink
Update files to match tailormap-viewer repo
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsln committed Sep 26, 2024
1 parent 4cf1273 commit c532780
Show file tree
Hide file tree
Showing 10 changed files with 603 additions and 26 deletions.
26 changes: 18 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
],
"plugins": [
"rxjs",
"import"
"import",
"@stylistic/ts"
],
"extends": [
"eslint:recommended",
Expand All @@ -30,7 +31,16 @@
]
},
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "tm",
"style": "kebab-case"
}
],
"@typescript-eslint/no-explicit-any": "off",
"@stylistic/ts/no-explicit-any": "off",
"@angular-eslint/directive-selector": [
"error",
{
Expand Down Expand Up @@ -62,7 +72,7 @@
"always"
],
"comma-dangle": "off",
"@typescript-eslint/comma-dangle": [
"@stylistic/ts/comma-dangle": [
"error",
"always-multiline"
],
Expand All @@ -73,8 +83,8 @@
"import/order": "off",
"arrow-body-style": "off",
"semi": "off",
"@typescript-eslint/semi": "error",
"@typescript-eslint/member-ordering": "off",
"@stylistic/ts/semi": "error",
"@stylistic/ts/member-ordering": "off",
"@typescript-eslint/naming-convention": [
"error",
{
Expand All @@ -98,7 +108,7 @@
}
],
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": [
"@stylistic/ts/space-before-function-paren": [
"error",
{
"anonymous": "always",
Expand Down Expand Up @@ -152,7 +162,7 @@
"variables": true
}
],
"@typescript-eslint/member-delimiter-style": [
"@stylistic/ts/member-delimiter-style": [
"error",
{
"multiline": {
Expand All @@ -179,8 +189,8 @@
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"rxjs/finnish": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off"
"@stylistic/ts/ban-ts-comment": "off",
"@stylistic/ts/no-empty-function": "off"
}
},
{
Expand Down
17 changes: 15 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
"node_modules/@tailormap-viewer/shared/assets/locale/messages.shared.nl.xlf",
"node_modules/@tailormap-admin/admin-core/assets/locale/messages.admin-core.nl.xlf"
]
},
"de": {
"translation": [
"node_modules/@tailormap-viewer/core/assets/locale/messages.core.de.xlf",
"node_modules/@tailormap-viewer/shared/assets/locale/messages.shared.de.xlf",
"node_modules/@tailormap-admin/admin-core/assets/locale/messages.admin-core.de.xlf"
]
}
}
},
Expand All @@ -38,7 +45,7 @@
"outputPath": "dist/app",
"index": "projects/app/src/index.html",
"main": "projects/app/src/main.ts",
"polyfills": ["projects/app/src/polyfills.ts"],
"polyfills": ["projects/app/src/polyfills.ts", "@angular/localize/init"],
"tsConfig": "projects/app/tsconfig.app.json",
"assets": [
{
Expand Down Expand Up @@ -79,7 +86,10 @@
"earcut",
"svgpath",
"lerc",
"color-name"
"color-name",
"localforage",
"fastpriorityqueue",
"color-convert"
],
"i18nMissingTranslation": "error"
},
Expand Down Expand Up @@ -134,6 +144,9 @@
},
"nl": {
"buildTarget": "app:build:development,nl"
},
"de": {
"buildTarget": "app:build:development,de"
}
},
"options": {
Expand Down
4 changes: 3 additions & 1 deletion jest.base.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
process.env.TZ = 'GMT';

module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/../../setup-jest.ts'],
Expand All @@ -11,5 +13,5 @@ module.exports = {
},
],
},
transformIgnorePatterns: ['node_modules/(?!(.*\\.mjs$|ol|observable-fns|quick-lru|nanoid))'],
transformIgnorePatterns: ['node_modules/(?!(.*\\.mjs$|ol|observable-fns|quick-lru|nanoid|earcut|pbf|rbush|@tinyhttp/|@stardazed|color-(space|parse|rgba|name)/))'],
};
7 changes: 3 additions & 4 deletions projects/app/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
Expand Down Expand Up @@ -55,3 +51,6 @@ import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

// Drag-drop polyfill to support HTML5 drag and drop on touch devices. Used to reorder tree nodes.
import './polyfills/drag-drop-touch/DragDropTouch.js';
Loading

0 comments on commit c532780

Please sign in to comment.