-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
8 changed files
with
1,537 additions
and
1,476 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,42 +1,43 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||
{ | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
// "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": { | ||
// "ghcr.io/devcontainers/features/node:1": {} | ||
// }, | ||
"postCreateCommand": { | ||
"dependencies": "npm install" | ||
}, | ||
|
||
"postAttachCommand": "# Welcome to your Codespace! Run `npm run start` to start development.", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"], | ||
"settings": { | ||
"editor.formatOnSave": true, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonl]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
// "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": { | ||
// "ghcr.io/devcontainers/features/node:1": {} | ||
// }, | ||
|
||
"postCreateCommand": { | ||
"dependencies": "npm install", | ||
"build": "npm run build" | ||
}, | ||
|
||
"postAttachCommand": "# Welcome to your Codespace! Run `npm run start` to start development.", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"], | ||
"settings": { | ||
"editor.formatOnSave": true, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonl]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// @ts-check | ||
|
||
import globals from "globals"; | ||
import eslint from "@eslint/js"; | ||
import tsEslint from "typescript-eslint"; | ||
|
||
export default tsEslint.config( | ||
/** @type {(typeof tsEslint.configs.eslintRecommended)[]} */ ([ | ||
eslint.configs.recommended, | ||
tsEslint.configs.eslintRecommended, | ||
...tsEslint.configs.strictTypeChecked, | ||
...tsEslint.configs.stylisticTypeChecked, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
project: ["tsconfig.json"], // TODO: change to tsconfig.ling.json after fixing linter issues | ||
}, | ||
}, | ||
|
||
rules: { | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ argsIgnorePattern: "^_" }, | ||
], | ||
"@typescript-eslint/restrict-template-expressions": [ | ||
"error", | ||
{ allowNumber: true }, | ||
], | ||
"@typescript-eslint/no-confusing-void-expression": [ | ||
"error", | ||
{ ignoreArrowShorthand: true }, | ||
], | ||
"@typescript-eslint/no-unnecessary-condition": [ | ||
"error", | ||
{ allowConstantLoopConditions: true }, | ||
], | ||
|
||
"no-var": "error", | ||
"no-alert": "warn", | ||
"prefer-const": "error", | ||
"prefer-spread": "error", | ||
"no-multi-assign": "error", | ||
"prefer-template": "error", | ||
"object-shorthand": "error", | ||
"no-nested-ternary": "error", | ||
"no-array-constructor": "error", | ||
"prefer-object-spread": "error", | ||
"prefer-arrow-callback": "error", | ||
"prefer-destructuring": ["error", { object: true, array: false }], | ||
"no-console": "warn", | ||
curly: ["warn", "multi-line", "consistent"], | ||
"no-debugger": "warn", | ||
"spaced-comment": ["warn", "always", { markers: ["/"] }], | ||
}, | ||
}, | ||
]), | ||
); |
Oops, something went wrong.