Skip to content

Commit

Permalink
fix: fix everything
Browse files Browse the repository at this point in the history
  • Loading branch information
SolP-Aleios committed Oct 19, 2023
1 parent 8f6fe25 commit dfdf39e
Show file tree
Hide file tree
Showing 60 changed files with 879 additions and 541 deletions.
180 changes: 90 additions & 90 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,178 +1,178 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:import/recommended",
"plugin:prettier/recommended",
'eslint:recommended',
'plugin:import/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ["**/cdk.out/**", "**/dist/**"],
ignorePatterns: ['**/cdk.out/**', '**/dist/**'],
rules: {
"prettier/prettier": "error",
"import/extensions": 0,
"import/no-unresolved": 0,
"import/prefer-default-export": 0,
"import/no-duplicates": "error",
complexity: ["error", 8],
"max-lines": ["error", { max: 200, skipBlankLines: true }],
"max-depth": ["error", 3],
"max-params": ["error", 6],
eqeqeq: ["error", "smart"],
"import/no-extraneous-dependencies": [
"error",
'prettier/prettier': 'error',
'import/extensions': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'import/no-duplicates': 'error',
complexity: ['error', 8],
'max-lines': ['error', { max: 200, skipBlankLines: true }],
'max-depth': ['error', 3],
'max-params': ['error', 6],
eqeqeq: ['error', 'smart'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
},
],
"no-shadow": [
"error",
'no-shadow': [
'error',
{
hoist: "all",
hoist: 'all',
},
],
"prefer-const": "error",
"import/order": [
"error",
'prefer-const': 'error',
'import/order': [
'error',
{
groups: [
["external", "builtin"],
"unknown",
"internal",
["parent", "sibling", "index"],
['external', 'builtin'],
'unknown',
'internal',
['parent', 'sibling', 'index'],
],
alphabetize: {
order: "asc",
order: 'asc',
caseInsensitive: false,
},
"newlines-between": "always",
pathGroupsExcludedImportTypes: ["builtin"],
'newlines-between': 'always',
pathGroupsExcludedImportTypes: ['builtin'],
},
],
"sort-imports": [
"error",
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
"padding-line-between-statements": [
"error",
'padding-line-between-statements': [
'error',
{
blankLine: "always",
prev: "*",
next: "return",
blankLine: 'always',
prev: '*',
next: 'return',
},
],
"prefer-arrow/prefer-arrow-functions": [
"error",
'prefer-arrow/prefer-arrow-functions': [
'error',
{
disallowPrototype: true,
singleReturnOnly: false,
classPropertiesAllowed: false,
},
],
"no-restricted-imports": [
"error",
'no-restricted-imports': [
'error',
{
paths: [
{
name: "aws-sdk",
message: "Please use aws-sdk/{module} import instead",
name: 'aws-sdk',
message: 'Please use aws-sdk/{module} import instead',
},
{
name: ".",
message: "Please use explicit import file",
name: '.',
message: 'Please use explicit import file',
},
],
},
],
curly: ["error", "all"],
curly: ['error', 'all'],
},
root: true,
env: {
es6: true,
node: true,
browser: true,
},
plugins: ["prefer-arrow", "import"],
plugins: ['prefer-arrow', 'import'],
parserOptions: {
ecmaVersion: 9,
sourceType: "module",
project: ["./tsconfig.eslint.json"],
sourceType: 'module',
project: ['./tsconfig.eslint.json'],
tsconfigRootDir: __dirname,
},
overrides: [
{
files: ["**/*.ts?(x)"],
files: ['**/*.ts?(x)'],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
],
parser: "@typescript-eslint/parser",
parser: '@typescript-eslint/parser',
parserOptions: {
project: "tsconfig.eslint.json",
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",
'@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",
'@typescript-eslint/ban-ts-comment': [
'error',
{
"ts-ignore": "allow-with-description",
'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",
'@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",
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",
'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",
'@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,
},
],
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
},
},
],
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defaults:

jobs:
run-tests:
name: Deploy and Run Tests
name: Deploy and Run Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
id: setup-node
uses: actions/setup-node@v3
with:
cache: "pnpm"
cache: 'pnpm'
- name: Install Top Level Dependencies
run: pnpm install --frozen-lockfile
- name: Configure AWS Credentials
Expand All @@ -46,20 +46,20 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
- name: 🚀 Install Events Dependencies and Deploy
run: |
cd example-architecture/events
cd src/example-architecture/events
pnpm install --frozen-lockfile
pnpm deploy-dev
- name: 🚀 Install Producer Dependencies and Deploy
run: |
cd example-architecture/producer
cd src/example-architecture/producer
pnpm install --frozen-lockfile
pnpm deploy-dev
- name: 🚀 Install Consumer Dependencies and Deploy
run: |
cd example-architecture/consumer
cd src/example-architecture/consumer
pnpm install --frozen-lockfile
pnpm deploy-dev
- name: "🧪 Test unit and integration"
- name: '🧪 Test unit and integration'
run: pnpm test --verbose
- name: '🧪 Test linter'
run: pnpm lint-test
6 changes: 3 additions & 3 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org/'
cache: "pnpm"
cache: 'pnpm'
- name: 💫 Install dependencies
run: pnpm install --frozen-lockfile
- name: 🏡 Build
run: pnpm run build
- name: 📦 Package
run: pnpm package
- name: 🚀 Publish eventbridge-toolbox
run: pnpm publish --access=public --no-git-checks
env:
Expand Down
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.hbs
.next
pnpm-lock.yaml
**/.serverless
**/stack.json
.gitlab-ci.yml
.npm
.webpack
.esbuild
**/coverage
**/dist
**/build
**/public
**/nx-cache
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
}
6 changes: 0 additions & 6 deletions example-architecture/consumer/bin/consumer.ts

This file was deleted.

Loading

0 comments on commit dfdf39e

Please sign in to comment.