starters: add typescript starter

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-07 23:56:09 +03:00
parent cca41d80b9
commit 7984d011fb
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
8 changed files with 104 additions and 0 deletions

View File

@ -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;
};

View File

@ -0,0 +1 @@
use flake

View 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
View File

@ -0,0 +1,2 @@
.direnv/
node_modules/

View File

@ -0,0 +1,7 @@
{
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}

View 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 ];
};
});
}

View 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"
}
}

View 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
}
}