generated from pascal-giguere/starter-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1a9d92d
Showing
16 changed files
with
5,498 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
ij_visual_guides = 120 | ||
|
||
[*.{ts,js,json}] | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 120 | ||
|
||
[*.{js,ts}] | ||
quote_type = single |
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,44 @@ | ||
module.exports = { | ||
root: true, | ||
ignorePatterns: ['**/node_modules', '.yarn'], | ||
env: { | ||
commonjs: true, | ||
es2020: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false }], | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'warn', | ||
{ | ||
allowTypedFunctionExpressions: true, | ||
allowHigherOrderFunctions: true, | ||
allowExpressions: true, | ||
}, | ||
], | ||
'@typescript-eslint/no-var-requires': 'warn', | ||
'@typescript-eslint/no-namespace': 'warn', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'no-use-before-define': 'off', | ||
'no-case-declarations': 'warn', | ||
'no-async-promise-executor': 'warn', | ||
'no-useless-escape': 'warn', | ||
'no-fallthrough': 'warn', | ||
'no-redeclare': 'warn', | ||
'no-empty': 'warn', | ||
'no-irregular-whitespace': 'warn', | ||
'no-duplicate-imports': 'error', | ||
}, | ||
}; |
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,17 @@ | ||
# JetBrains | ||
.idea | ||
|
||
# Yarn | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/versions | ||
!.yarn/sdks | ||
yarn-debug.log | ||
yarn-error.log | ||
.pnp.* | ||
node_modules | ||
|
||
# Build folder | ||
dist |
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,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"printWidth": 120 | ||
} |
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,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run unit tests" type="JavaScriptTestRunnerJest"> | ||
<config-file value="$PROJECT_DIR$/test/unit/jest.config.ts" /> | ||
<node-interpreter value="project" /> | ||
<node-options value="" /> | ||
<jest-package value="yarn:package.json:jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="ALL" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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,7 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Start" type="NodeJSConfigurationType" path-to-js-file="dist/index.js" working-dir="$PROJECT_DIR$"> | ||
<method v="2"> | ||
<option name="TypeScript.Before.Run" enabled="true" FAIL_ON_ERROR="true" CONFIG_PATH="$PROJECT_DIR$/tsconfig.json" /> | ||
</method> | ||
</configuration> | ||
</component> |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
nodeLinker: pnp | ||
pnpMode: loose | ||
yarnPath: .yarn/releases/yarn-3.3.0.cjs | ||
enableTelemetry: false |
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,11 @@ | ||
# @pascal-giguere/starter-node | ||
|
||
Pascal's starter Node project using: | ||
- Node 18 | ||
- TypeScript 4 | ||
- Yarn 3 (with PnP) | ||
- Prettier 2 | ||
- ESLint 8 | ||
- Jest 29 | ||
|
||
Original repository: https://github.com/pascal-giguere/starter-node |
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,27 @@ | ||
{ | ||
"name": "@pascal-giguere/starter-node", | ||
"version": "1.0.0", | ||
"author": "Pascal Giguère", | ||
"repository": "https://github.com/pascal-giguere/starter-node", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=18", | ||
"npm": "please-use-yarn", | ||
"yarn": "3.3.0" | ||
}, | ||
"main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^29.2.3", | ||
"@types/node": "^18.11.10", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"eslint": "^8.28.0", | ||
"jest": "^29.3.1", | ||
"prettier": "^2.8.0", | ||
"ts-jest": "^29.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.3" | ||
} | ||
} |
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 @@ | ||
console.log('Hello world!'); |
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,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"types": ["node", "jest"], | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true | ||
} | ||
} |
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,3 @@ | ||
it('basic test', async () => { | ||
expect(true).toBeTruthy(); | ||
}); |
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,15 @@ | ||
export default { | ||
roots: ['<rootDir>', '<rootDir>/../../src'], | ||
testMatch: ['**/*.test.ts'], | ||
moduleFileExtensions: ['ts', 'js', 'json'], | ||
transform: { | ||
'^.+\\.ts$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: 'test/tsconfig.json', | ||
diagnostics: false, | ||
}, | ||
], | ||
}, | ||
testEnvironment: 'node', | ||
}; |
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,24 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"types": ["node"], | ||
"moduleResolution": "node", | ||
"lib": ["esnext"], | ||
"allowJs": true, | ||
"allowSyntheticDefaultImports": true, | ||
"alwaysStrict": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"strict": true, | ||
"outDir": "dist" | ||
}, | ||
"include": ["src"], | ||
"exclude": [".yarn"] | ||
} |
Oops, something went wrong.