-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for importing as esm
Breaking Change: this changes the import paths for Dyngoose Fixes #710
- Loading branch information
1 parent
ed6e7cd
commit ccef67a
Showing
139 changed files
with
4,343 additions
and
3,168 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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,5 +1,3 @@ | ||
version: "3" | ||
|
||
services: | ||
dynamodb: | ||
image: amazon/dynamodb-local | ||
|
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,56 @@ | ||
const love = require('eslint-config-love') | ||
const simpleImportSort = require('eslint-plugin-simple-import-sort') | ||
const importPlugin = require('eslint-plugin-import') | ||
|
||
module.exports = [ | ||
{ | ||
...love, | ||
files: ['**/*.js', '**/*.ts'], | ||
plugins: { | ||
...love.plugins ?? {}, | ||
'simple-import-sort': simpleImportSort, | ||
'import': importPlugin, | ||
}, | ||
rules: { | ||
...love.rules, | ||
// disable the eslint rule as it can report incorrectly | ||
// 'space-before-function-paren': 'off', | ||
|
||
// sort imports! | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
|
||
// we use a few labeled for loops | ||
'no-labels': 'off', | ||
|
||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
|
||
// we want to use strict === false to avoid truthy logic | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', | ||
|
||
// uninitialized variables are assumed as undefined | ||
'@typescript-eslint/init-declarations': 'off', | ||
|
||
// we use any | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
|
||
// we use delete | ||
'@typescript-eslint/no-dynamic-delete': 'off', | ||
|
||
// attribute classes do not all use this in toDynamo, fromDynamo, toJSON, etc | ||
'@typescript-eslint/class-methods-use-this': 'off', | ||
|
||
// allow throwing of caught errors (unknowns) | ||
'@typescript-eslint/only-throw-error': ['error', { | ||
allowThrowingUnknown: true, | ||
}], | ||
|
||
// we need to rely on require at times | ||
'@typescript-eslint/no-require-imports': 'off', | ||
} | ||
} | ||
] |
Oops, something went wrong.