Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "./tsconfig.json"
"project": "./tsconfig.eslint.json"
},
"plugins": [
"import", "prettier"
"import",
"prettier"
],
"rules": {
"no-plusplus": [
Expand All @@ -27,6 +28,10 @@
"allowForLoopAfterthoughts": true
}
],
"import/extensions": [
2,
"ignorePackages"
],
"prettier/prettier": [
"error"
]
Expand Down
13 changes: 6 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
**/*
dist/src/utils/__mock__
dist/test/*
!dist/src/analysis/*
!dist/src/middleware/*
!dist/src/rateLimiters/*
!dist/src/utils/*
!dist/src/*
dist/utils/__mock__
!dist/analysis/*
!dist/middleware/*
!dist/rateLimiters/*
!dist/utils/*
!dist/*
!package.json
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ script:
# specify deployment
before_deploy:
- 'npm run build'
- 'npm run build:fix'

deploy:
on:
Expand Down
34 changes: 18 additions & 16 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": [
"-i", "--verbose", "--no-cache"
],
// "preLaunchTask": "build",
// "internalConsoleOptions": "openOnSessionStart",
// "outFiles": [
// "${workspaceRoot}/dist/**/*"
// ],
// "envFile": "${workspaceRoot}/.env"
}]
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": [
"-i",
"--verbose",
"--no-cache"
],
// "preLaunchTask": "build",
// "internalConsoleOptions": "openOnSessionStart",
// "outFiles": [
// "${workspaceRoot}/dist/**/*"
// ],
// "envFile": "${workspaceRoot}/.env"
}
]
}
32 changes: 19 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.workingDirectories": [
"./*"
],
"editor.formatOnSave": true,
"configurations": [{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}\\node_modules\\jest\\bin\\jest.js",
"args": [
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}\\node_modules\\jest\\bin\\jest.js",
"args": [
"-i"
],
// "preLaunchTask": "build",
"internalConsoleOptions": "openOnSessionStart",
"outFiles": [
],
// "preLaunchTask": "build",
"internalConsoleOptions": "openOnSessionStart",
"outFiles": [
"${workspaceRoot}/dist/**/*"
],
"envFile": "${workspaceRoot}/.env"
}]
],
"envFile": "${workspaceRoot}/.env"
}
],
"jest.jestCommandLine": "npm t --",
}
15 changes: 14 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ const config: Config.InitialOptions = {
roots: ['./test'],
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'],
// moduleFileExtensions: ['js', 'ts'],
// Bellow is needed to resolve imports with .js extensions
transform: {
'\\.[jt]s?$': 'ts-jest',
},
globals: {
'ts-jest': {
useESM: true,
},
},
moduleNameMapper: {
'(.+)\\.js': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
};

export default config;
Loading