-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaf394e
commit 19e6c33
Showing
50 changed files
with
892 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce / see the bug: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen / to see. | ||
|
||
**Videos / screenshots** | ||
If applicable, add a video or screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Problem description** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. How can others profit from the change. What's the main benefit. | ||
|
||
**Desired Solution** | ||
A clear and concise description of what you want to happen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Question | ||
about: Ask something | ||
|
||
--- | ||
|
||
## Main topic | ||
|
||
<!--- Delete topics that do not aply --> | ||
|
||
- Technical understanding | ||
- Missing documentation | ||
- Contributing and community | ||
- ... | ||
|
||
## Precise and short description of your question | ||
_description_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,111 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import jsonc from 'eslint-plugin-jsonc'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import prettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
tseslint.configs.strict, | ||
tseslint.configs.recommended, | ||
); | ||
|
||
/***************************************************************************************** | ||
* IGNORES | ||
* --------------------------------------------------------------------------------------- | ||
* GLOB patterns for files and directories to be ignored by ESLint completely. | ||
* | ||
* @see https://eslint.org/docs/latest/use/configure/ignore | ||
*****************************************************************************************/ | ||
{ | ||
ignores: ['**/.github/*', '**/node_modules/*', '**/dist/*', '**/package-lock.json'] | ||
}, | ||
|
||
/***************************************************************************************** | ||
* PROJECT CONFIGURATION | ||
* --------------------------------------------------------------------------------------- | ||
* These configurations are valid for all files, independent of their type. | ||
* Type-specific adjustments are configured explicitly in specific sections individually. | ||
* | ||
* @see https://eslint.org/docs/latest/use/configure/plugins | ||
* @see https://eslint.org/docs/latest/use/configure/parser | ||
*****************************************************************************************/ | ||
|
||
// Default settings from prettier. | ||
prettierRecommended, | ||
|
||
// Disable deprecated formatting rules. | ||
// @see https://eslint.org/blog/2023/10/deprecating-formatting-rules/ | ||
eslintConfigPrettier, | ||
|
||
// Default settings from eslint. | ||
eslint.configs.recommended, | ||
|
||
// Default settings from TS. | ||
...tseslint.configs.recommended, | ||
|
||
// Default settings from jsonc. | ||
...jsonc.configs['flat/recommended-with-jsonc'], | ||
|
||
/***************************************************************************************** | ||
* DEFAULT CONFIGURATION | ||
* --------------------------------------------------------------------------------------- | ||
* These rules and styles are valid for all code-files, independent of their type. | ||
* Type-specific adjustments are configured explicitly in specific sections individually. | ||
* | ||
* @see https://eslint.org/docs/latest/use/configure/rules | ||
*****************************************************************************************/ | ||
{ | ||
plugins: { | ||
prettier | ||
}, | ||
rules: { | ||
// Prefer const over function. | ||
'func-style': ['error', 'expression'], | ||
// Forbid relative imports. | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: [ | ||
{ | ||
group: ['./', '../'], | ||
message: 'Relative imports are not allowed.' | ||
} | ||
] | ||
} | ||
], | ||
// Disallow unused variables unless they are prefixed with "_" (e.g. _myVar). | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_' | ||
} | ||
], | ||
// Prettier configuration right here rather in a separate file. | ||
// @see https://prettier.io/docs/en/options | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
singleQuote: true, | ||
printWidth: 100, | ||
trailingComma: 'none', | ||
arrowParens: 'avoid' | ||
} | ||
], | ||
// Default 20. Enforce lower cyclomatic complexity. | ||
complexity: ['error', 15], | ||
// Default is 4. Enforce lower value for higher readability. | ||
'max-depth': ['error', 2], | ||
// Default is 3. Allow 2 more parameters. | ||
'max-params': ['error', 5], | ||
// Default is 10. Increase value explicitly. | ||
'max-statements': ['error', 25], | ||
// Enforce the use of the shorthand syntax. | ||
'object-shorthand': 'error', | ||
// Proper logger must be used instead of console.log. | ||
'no-console': 'error' | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"created": "2023-03-23T08:11:12Z", | ||
"generator": { | ||
"name": "CASAGATEWAY", | ||
"version": "0.9" | ||
}, | ||
"properties": [ | ||
{ | ||
"id": "amIuniqueOrAmI", | ||
"referenceId": "kj3kj3kj38ss", | ||
"type": "buy", | ||
"address": { | ||
"countryCode": "CH", | ||
"locality": "Bern", | ||
"postalCode": "3000" | ||
}, | ||
"availability": { | ||
"state": "private", | ||
"start": "2023-03-23T08:11:12Z", | ||
"expiration": "2023-03-23T08:11:12Z" | ||
}, | ||
"localizations": [ | ||
{ | ||
"languageCode": "de", | ||
"title": "Doppelhaushälfte" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
// jest.config.js | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testMatch: ['**/*.spec.ts'], | ||
moduleNameMapper: { | ||
'^src/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
} | ||
'^src/(.*)$': '<rootDir>/src/$1' | ||
} | ||
}; |
Oops, something went wrong.