This repository was archived by the owner on Sep 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: improve handling with crudodb #25
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| *.d.ts | ||
| dist | ||
| node_modules | ||
| .eslintrc.js |
This file contains hidden or 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,14 +1,116 @@ | ||
| /* global module */ | ||
| module.exports = { | ||
| env: { | ||
| browser: true, | ||
| es2021: true | ||
| }, | ||
| extends: ['airbnb-base'], | ||
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| ecmaVersion: 12, | ||
| sourceType: 'module' | ||
| plugins: ['import', 'unused-imports'], | ||
| extends: [ | ||
| 'eslint:recommended', | ||
| 'plugin:@typescript-eslint/recommended', | ||
| 'plugin:eslint-comments/recommended', | ||
| 'plugin:promise/recommended', | ||
| 'prettier', | ||
| 'prettier/@typescript-eslint' | ||
| ], | ||
| root: true, | ||
| env: { | ||
| node: true, | ||
| jest: true | ||
| }, | ||
| plugins: ['@typescript-eslint'], | ||
| rules: {} | ||
| rules: { | ||
| // -- Extra rules -- | ||
| // Reason: Missing curly braces (for example in if statements) are hard to read and may lead to bugs. | ||
| curly: 'warn', | ||
| // Reason: Logs should be only be done with fastify. | ||
| // Some logs are allowed for cli scripts. | ||
| 'no-console': [ | ||
| 'error', | ||
| { | ||
| allow: ['info', 'warn', 'error', 'time', 'timeEnd'] | ||
| } | ||
| ], | ||
| // Reason: "any" disables the type checker and shouldn't be used. | ||
| '@typescript-eslint/no-explicit-any': 'error', | ||
| // Reason: All dependencies that are used in the App should be defined in package.json#dependencies. | ||
| 'import/no-extraneous-dependencies': [ | ||
| 'error', | ||
| { | ||
| devDependencies: ['**/*.spec.ts'], | ||
| optionalDependencies: false, | ||
| peerDependencies: false | ||
| } | ||
| ], | ||
| // Reason: Automatic sorting of imports to avoid unnecessary merge conflicts. | ||
| 'import/order': [ | ||
| 'warn', | ||
| { | ||
| 'newlines-between': 'always', | ||
| alphabetize: { | ||
| order: 'asc', | ||
| caseInsensitive: true | ||
| } | ||
| } | ||
| ], | ||
| // Reason: This leads to bad performance and most of the time Promise.all | ||
| // should be used instead. | ||
| 'no-await-in-loop': 'error', | ||
| // Reason: Improves readability. | ||
| 'no-else-return': ['error', { allowElseIf: false }], | ||
| // Reason: Detects unnecessary code. | ||
| 'no-extra-bind': 'error', | ||
| // Reason: Improves readability. An exception is the !! pattern with booleans | ||
| // as it is very common and well known. | ||
| 'no-implicit-coercion': ['warn', { boolean: false }], | ||
| // Reason: Improves readability. | ||
| 'no-lonely-if': 'warn', | ||
| // Reason: Detects unnecessary code. | ||
| 'no-self-compare': 'error', | ||
| // Reason: Detects possible bugs. | ||
| 'no-template-curly-in-string': 'error', | ||
| // Reason: Improves readability and performance. | ||
| 'no-useless-call': 'error', | ||
| // Reason: Improves readability. | ||
| 'no-useless-computed-key': 'warn', | ||
| // Reason: Improves readability. | ||
| 'no-useless-concat': 'error', | ||
| // Reason: Detects unnecessary code. | ||
| 'no-useless-return': 'error', | ||
| // Reason: Improves readability. | ||
| 'object-shorthand': 'warn', | ||
| // Reason: Improves readability. | ||
| 'prefer-const': ['warn', { ignoreReadBeforeAssign: true }], | ||
| // Reason: Improves readability. | ||
| 'prefer-destructuring': 'warn', | ||
| // Reason: Improves readability and performance. | ||
| 'prefer-numeric-literals': 'error', | ||
| // Reason: Improves readability. | ||
| 'prefer-regex-literals': 'error', | ||
| // Reason: Improves readability. | ||
| 'prefer-template': 'error', | ||
| // Reason: Thrown literal don't have stack traces. | ||
| 'no-throw-literal': 'error', | ||
| // Reason: Detects unnecessary code. | ||
| 'no-return-await': 'error', | ||
| // Reason: Unused imports increase the application size and decrease the performance | ||
| 'unused-imports/no-unused-imports-ts': 'warn', | ||
| // Reason: Unused variables increase the application size and are confusing | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'warn', | ||
| { | ||
| vars: 'all', | ||
| varsIgnorePattern: '^_', | ||
| args: 'after-used', | ||
| argsIgnorePattern: '^_', | ||
| ignoreRestSiblings: true | ||
| } | ||
| ], | ||
| // Reason: Detects unnecessary code. | ||
| '@typescript-eslint/no-useless-constructor': 'error', | ||
| // Reason: Improves readability. | ||
| '@typescript-eslint/prefer-as-const': 'error', | ||
|
|
||
| // -- Disabled rules -- | ||
| // Reason: We have cli scripts that need to exit the app | ||
| 'no-process-exit': 'off', | ||
| // Reason: Not necessary if the type can be inferred. Produces a lot of boilerplate. | ||
| '@typescript-eslint/explicit-module-boundary-types': 'off' | ||
| } | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 +1,4 @@ | ||
| React usage (hooks api) | ||
| # React usage (hooks api) | ||
|
|
||
| crudodb instance should be provided as a context. | ||
|
|
This file contains hidden or 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
This file contains hidden or 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,14 @@ | ||
| module.exports = { | ||
| branches: ['main', { name: 'next', prerelease: true }], | ||
| plugins: [ | ||
| '@semantic-release/commit-analyzer', | ||
| '@semantic-release/release-notes-generator', | ||
| [ | ||
| '@semantic-release/npm', | ||
| { | ||
| pkgRoot: 'dist/src' | ||
| } | ||
| ], | ||
| '@semantic-release/github' | ||
| ] | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.