Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sc0ra committed Nov 3, 2023
0 parents commit 2ffdf17
Show file tree
Hide file tree
Showing 140 changed files with 22,179 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "Sc0ra",
"name": "Axel Fournier",
"avatar_url": "https://avatars.githubusercontent.com/u/25872509?v=4",
"profile": "https://github.com/Sc0ra",
"contributions": [
"code",
"doc",
"ideas"
]
}
],
"contributorsPerLine": 7,
"projectName": "aws-zod-interface-contracts",
"projectOwner": "swarmion",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitConvention": "angular",
"commitType": "docs"
}
207 changes: 207 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
/* eslint-disable max-lines */
module.exports = {
plugins: ['prefer-arrow', 'import'],
extends: ['eslint:recommended', 'plugin:import/recommended'],
ignorePatterns: [
'examples/',
'**/node_modules/',
'**/nx-cache/',
'**/dist/',
'**/cdk.out/',
'**/coverage/',
'**/build/',
'**/public/',
],
rules: {
'import/extensions': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'import/no-duplicates': 'error',
complexity: ['error', 8],
'max-lines': ['error', 200],
'max-depth': ['error', 3],
'max-params': ['error', 4],
eqeqeq: ['error', 'smart'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
},
],
'no-shadow': [
'error',
{
hoist: 'all',
},
],
'prefer-const': 'error',
'import/order': [
'error',
{
pathGroups: [
{ pattern: '@aws-zod-interface-contracts/**', group: 'unknown' },
],
groups: [
['external', 'builtin'],
'unknown',
'internal',
['parent', 'sibling', 'index'],
],
alphabetize: {
order: 'asc',
caseInsensitive: false,
},
'newlines-between': 'always',
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'import/namespace': 'off',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: '*',
next: 'return',
},
],
'prefer-arrow/prefer-arrow-functions': [
'error',
{
disallowPrototype: true,
singleReturnOnly: false,
classPropertiesAllowed: false,
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'lodash',
message: 'Please use lodash/{module} import instead',
},
{
name: 'aws-sdk',
message: 'Please use aws-sdk/{module} import instead',
},
{
name: '.',
message: 'Please use explicit import file',
},
],
},
],
curly: ['error', 'all'],
},
root: true,
env: {
es6: true,
node: true,
browser: true,
},
parserOptions: {
ecmaVersion: 9,
sourceType: 'module',
},
overrides: [
{
files: ['**/*.ts?(x)'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
},
rules: {
'@typescript-eslint/prefer-optional-chain': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/strict-boolean-expressions': [
'error',
{
allowString: false,
allowNumber: false,
allowNullableObject: true,
},
],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
minimumDescriptionLength: 10,
},
],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/ban-types': [
'error',
{
types: {
FC: 'Use `const MyComponent = (props: Props): JSX.Element` instead',
SFC: 'Use `const MyComponent = (props: Props): JSX.Element` instead',
FunctionComponent:
'Use `const MyComponent = (props: Props): JSX.Element` instead',
'React.FC':
'Use `const MyComponent = (props: Props): JSX.Element` instead',
'React.SFC':
'Use `const MyComponent = (props: Props): JSX.Element` instead',
'React.FunctionComponent':
'Use `const MyComponent = (props: Props): JSX.Element` instead',
},
extendDefaults: true,
},
],
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowNumber: true,
allowBoolean: true,
},
],
},
},
{
files: ['**/src/**'],
excludedFiles: [
'**/__tests__/**',
'**/*.test.ts?(x)',
'**/__benches__/**',
],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: true,
},
],
},
},
],
};
2 changes: 2 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pull]
rebase = true
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🐞 Bug report
description: Report an issue with Swarmion
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Please provide a link to [StackBlitz](https://stackblitz.com/fork/github/swarmion/swarmion/tree/main/examples/swarmion-bare) or a github repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label.
placeholder: Reproduction
validations:
required: true
- type: textarea
id: system-info
attributes:
label: System Info
description: "Run the following command in the directory of your project where you encounter the issue and paste its output: `npx envinfo --system --npmPackages 'aws-zod-interface-contracts' --binaries --browsers`"
render: shell
placeholder: System, Binaries, Browsers
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Contributing Guidelines](https://github.com/swarmion/swarmion/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://www.swarmion.dev/docs/).
required: true
- label: Check that there isn't [already an issue](https://github.com/swarmion/swarmion/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🚀 New feature proposal
description: Propose a new feature to be added to aws-zod-interface-contracts
labels: ['enhancement']
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: feature-description
attributes:
label: Clear and concise description of the problem
description: 'As a developer using aws-zod-interface-contracts I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
validations:
required: true
- type: textarea
id: suggested-solution
attributes:
label: Suggested solution
description: We could provide following implementation...
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Alternative
description: Clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Any other context or screenshots about the feature request here.
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Contributing Guidelines](https://github.com/swarmion/aws-zod-interface-contracts/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://www.swarmion.dev/docs/).
required: true
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
16 changes: 16 additions & 0 deletions .github/actions/get-project-changes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Get Project Code Changes'
description: 'Returns which projects have been modified'
outputs:
projects:
description: Names of the affected projects
value: ${{ steps.affected-projects.outputs.projects }}
runs:
using: 'composite'
steps:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
- name: Get affected projects
id: affected-projects
run: |
echo "projects=$(npx nx print-affected | jq -c ".projects")" >> $GITHUB_OUTPUT
shell: bash
14 changes: 14 additions & 0 deletions .github/actions/install-node-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Install Node Dependencies'
description: 'Install monorepo dependencies using pnpm'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2.4.0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
shell: bash
Loading

0 comments on commit 2ffdf17

Please sign in to comment.