-
Notifications
You must be signed in to change notification settings - Fork 203
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
Showing
10 changed files
with
613 additions
and
573 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 |
---|---|---|
@@ -1,38 +1,24 @@ | ||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
es2021: true, | ||
node: true, | ||
jest: true | ||
}, | ||
parserOptions: { | ||
ecmaVersion: "latest" | ||
}, | ||
parser: "@typescript-eslint/parser", | ||
extends: [ | ||
"eslint:recommended" | ||
], | ||
rules: { | ||
curly: [1, "all"], | ||
// disallow single quotes | ||
quotes: [1, "double", { allowTemplateLiterals: true }], | ||
// force semi-colons | ||
semi: 1, | ||
// allow tabs | ||
"no-tabs": [0], | ||
// use tab indentation | ||
indent: [1, "tab", { | ||
SwitchCase: 1 | ||
}], | ||
// prevent commar dangles | ||
"comma-dangle": [1, "never"], | ||
// allow paren-less arrow functions | ||
"arrow-parens": 0, | ||
// allow async-await | ||
"generator-star-spacing": 0, | ||
"no-unused-vars": [0, { args: "after-used", vars: "local" }], | ||
"no-constant-condition": 0, | ||
// allow debugger during development | ||
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0 | ||
} | ||
}; | ||
env: { | ||
commonjs: true, | ||
es2021: true, | ||
node: true, | ||
jest: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
extends: ['eslint:recommended'], | ||
rules: { | ||
curly: [1, 'all'], | ||
// allow paren-less arrow functions | ||
'arrow-parens': 0, | ||
// allow async-await | ||
'generator-star-spacing': 0, | ||
'no-unused-vars': [0, { args: 'after-used', vars: 'local' }], | ||
'no-constant-condition': 0, | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, | ||
}, | ||
} |
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 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/prettierrc", | ||
"semi": false, | ||
"printWidth": 90, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"endOfLine": "lf" | ||
} |
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,20 +1,20 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
maxWorkers: 1, | ||
extensionsToTreatAsEsm: [".ts"], | ||
moduleNameMapper: { | ||
"^(\\.{1,2}/.*)\\.js$": "$1" | ||
}, | ||
transform: { | ||
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest` | ||
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest` | ||
"^.+\\.tsx?$": [ | ||
"ts-jest", | ||
{ | ||
useESM: true | ||
} | ||
] | ||
} | ||
}; | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
maxWorkers: 1, | ||
extensionsToTreatAsEsm: ['.ts'], | ||
moduleNameMapper: { | ||
'^(\\.{1,2}/.*)\\.js$': '$1', | ||
}, | ||
transform: { | ||
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest` | ||
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest` | ||
'^.+\\.tsx?$': [ | ||
'ts-jest', | ||
{ | ||
useESM: 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
Oops, something went wrong.