starters: add typescript starter
This commit is contained in:
parent
cca41d80b9
commit
7984d011fb
8 changed files with 104 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
outputs = { self }: {
|
||||
templates = {
|
||||
# flakes
|
||||
flake-base = {
|
||||
path = ./flakes/base;
|
||||
description = "An empty flake for each default system";
|
||||
|
@ -11,6 +12,11 @@
|
|||
path = ./flakes/rust;
|
||||
description = "Flake to develop, build and run a rust application";
|
||||
};
|
||||
# starters
|
||||
starter-typescript = {
|
||||
path = ./starters/typescript;
|
||||
description = "Basic configuration for the typescript project";
|
||||
};
|
||||
};
|
||||
defaultTemplate = self.templates.flake-base;
|
||||
};
|
||||
|
|
1
starters/typescript/.envrc
Normal file
1
starters/typescript/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
35
starters/typescript/.eslintrc.yml
Normal file
35
starters/typescript/.eslintrc.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
parser: "@typescript-eslint/parser"
|
||||
parserOptions:
|
||||
ecmaVersion: 2019
|
||||
sourceType: "module"
|
||||
extends:
|
||||
- prettier
|
||||
- plugin:prettier/recommended
|
||||
- plugin:@typescript-eslint/recommended
|
||||
rules:
|
||||
"@typescript-eslint/no-unused-vars":
|
||||
- error
|
||||
- vars: all
|
||||
args: after-used
|
||||
argsIgnorePattern: ^_
|
||||
varsIgnorePattern: ^_
|
||||
ignoreRestSiblings: true
|
||||
"@typescript-eslint/no-empty-interface": off
|
||||
"@typescript-eslint/no-explicit-any": off
|
||||
"@typescript-eslint/explicit-function-return-type":
|
||||
- warn
|
||||
- allowExpressions: false
|
||||
allowTypedFunctionExpressions: true
|
||||
allowHigherOrderFunctions: true
|
||||
"@typescript-eslint/camelcase": off
|
||||
"@typescript-eslint/no-use-before-define": off
|
||||
|
||||
# need for fast move to ts
|
||||
"@typescript-eslint/no-var-requires": off
|
||||
"@typescript-eslint/ban-types": off
|
||||
"@typescript-eslint/ban-ts-ignore": off
|
||||
"@typescript-eslint/ban-ts-comment": off
|
||||
"@typescript-eslint/explicit-module-boundary-types": off
|
2
starters/typescript/.gitignore
vendored
Normal file
2
starters/typescript/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.direnv/
|
||||
node_modules/
|
7
starters/typescript/.prettierrc
Normal file
7
starters/typescript/.prettierrc
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"tabWidth": 4,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 100
|
||||
}
|
17
starters/typescript/flake.nix
Normal file
17
starters/typescript/flake.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [ nodejs-16_x ];
|
||||
};
|
||||
});
|
||||
}
|
21
starters/typescript/package.json
Normal file
21
starters/typescript/package.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "coc-nvim-range-create-bug",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"prettier": "^2.7.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.8.2"
|
||||
}
|
||||
}
|
15
starters/typescript/tsconfig.json
Normal file
15
starters/typescript/tsconfig.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "target",
|
||||
"module": "commonjs",
|
||||
"target": "es2020",
|
||||
"lib": ["es2020"],
|
||||
"moduleResolution": "node",
|
||||
"rootDir": "src",
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noImplicitAny": true
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue