-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
285bdb4
commit afb2c38
Showing
6 changed files
with
82 additions
and
6 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,48 @@ | ||
module.exports = { | ||
globals: { | ||
module: "readonly", | ||
}, | ||
env: { | ||
node: true, | ||
}, | ||
parser: "@typescript-eslint/parser", | ||
extends: [ | ||
// By extending from a plugin config, we can get recommended rules | ||
// without having to add them manually. | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
// This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. | ||
// Make sure it's always the last config, so it gets the chance to override other configs. | ||
"eslint-config-prettier", | ||
], | ||
plugins: ["prettier"], | ||
settings: { | ||
// Tells eslint how to resolve imports. | ||
"import/resolver": { | ||
node: { | ||
paths: ["src"], | ||
extensions: [".js", ".jsx", ".ts", ".tsx"], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
"no-console": "off", // Allow console logging in backend code. | ||
"prettier/prettier": "error", | ||
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], // Ignore unused function arguments starting with _ | ||
"no-use-before-define": [ | ||
"error", | ||
{ functions: false, classes: true, variables: true }, | ||
], // Allow variable hoisting for easier-to-read code. | ||
"prefer-const": "error", // Encourage use of const where possible. | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
types: { | ||
Function: false, // Allow use of the 'Function' type. | ||
}, | ||
extendDefaults: true, | ||
}, | ||
], | ||
}, | ||
ignorePatterns: ["node_modules/", "package-lock.json", "build/", "coverage/"], | ||
}; |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ package-lock.json | |
tsconfig.tsbuildinfo | ||
build | ||
releases | ||
coverage |
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 @@ | ||
node_modules | ||
build | ||
package-lock.json | ||
coverage |
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,10 @@ | ||
module.exports = { | ||
trailingComma: "all", | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 100, | ||
bracketSpacing: true, | ||
endOfLine: "lf", | ||
arrowParens: "always", | ||
}; |
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,16 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESnext", | ||
"module": "ESNext", | ||
"target": "ESNext", | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"outDir": "./build", | ||
"rootDir": "./src", | ||
"rootDir": ".", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["src/*"] | ||
}, | ||
"strict": true, | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"exactOptionalPropertyTypes": true, | ||
"removeComments": true, | ||
"sourceMap": true | ||
"sourceMap": true, | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
"include": ["src/**/*.ts", "__tests__"], | ||
"exclude": ["node_modules", "build", "coverage"] | ||
} |