Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit d1264e7

Browse files
committed
feat: Initalize repo with typescript skeleton
0 parents  commit d1264e7

File tree

6 files changed

+239
-0
lines changed

6 files changed

+239
-0
lines changed

.eslintrc.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
module.exports = {
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"mocha": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
parser: "@typescript-eslint/parser",
12+
"plugins": [
13+
"@typescript-eslint"
14+
],
15+
"parserOptions": {
16+
"ecmaVersion": 2018,
17+
"sourceType": "module"
18+
},
19+
"rules": {
20+
"@typescript-eslint/indent": [2,2],
21+
"@typescript-eslint/ban-ts-ignore": "off",
22+
"@typescript-eslint/type-annotation-spacing": "off",
23+
"@typescript-eslint/member-delimiter-style":"off",
24+
"@typescript-eslint/explicit-function-return-type":"off",
25+
'semi':'error',
26+
"no-trailing-spaces": "error",
27+
"no-unused-vars": "off",
28+
'@typescript-eslint/no-unused-vars': ["warn", { args: 'none' }],
29+
"@typescript-eslint/adjacent-overload-signatures": "error",
30+
"@typescript-eslint/ban-types": "error",
31+
"camelcase": "off",
32+
"@typescript-eslint/consistent-type-assertions": "error",
33+
"no-array-constructor": "off",
34+
"@typescript-eslint/no-array-constructor": "error",
35+
"no-empty":"off",
36+
"no-empty-function": "off",
37+
"@typescript-eslint/explicit-module-boundary-types": "off",
38+
"@typescript-eslint/no-empty-function": "error",
39+
"@typescript-eslint/no-empty-interface": "error",
40+
"@typescript-eslint/no-explicit-any": "off",
41+
"@typescript-eslint/no-inferrable-types": "error",
42+
"@typescript-eslint/no-misused-new": "error",
43+
"@typescript-eslint/no-namespace": "error",
44+
"@typescript-eslint/no-non-null-assertion": "warn",
45+
"@typescript-eslint/no-this-alias": "error",
46+
"no-use-before-define": "off",
47+
"@typescript-eslint/no-use-before-define": "error",
48+
"@typescript-eslint/no-var-requires": "error",
49+
"@typescript-eslint/prefer-namespace-keyword": "error",
50+
"@typescript-eslint/triple-slash-reference": "error",
51+
"no-var": "error",
52+
"prefer-const": "error",
53+
"prefer-rest-params": "error",
54+
"prefer-spread": "error"
55+
},
56+
"overrides": [
57+
{
58+
"files": ["*.js"],
59+
"rules": {
60+
"@typescript-eslint/no-var-requires": "off"
61+
}
62+
}
63+
]
64+
};

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
sandbox
3+
sample.json
4+
build
5+
sand\ box
6+
debug.log

.vscode/launch.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Tests",
11+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12+
"args": [
13+
"--require", "source-map-support/register",
14+
"--timeout", "999999",
15+
"--colors",
16+
"${workspaceFolder}/build/test/index.js"
17+
],
18+
"console": "internalConsole",
19+
"internalConsoleOptions": "neverOpen",
20+
"protocol": "inspector",
21+
},
22+
{
23+
"type": "node",
24+
"request": "launch",
25+
"name": "Tests (ts-node)",
26+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
27+
"args": [
28+
"--require", "ts-node/register",
29+
"--timeout", "999999",
30+
"--colors",
31+
"${workspaceFolder}/src/test/index.ts"
32+
],
33+
"console": "internalConsole",
34+
"internalConsoleOptions": "neverOpen",
35+
"protocol": "inspector",
36+
}
37+
]
38+
}

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2020 Butterscotch Shenanigans, Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "@bscotch/util",
3+
"version": "0.0.1",
4+
"description": "Bscotch Utilities: Methods for common Node.js needs.",
5+
"engines": {
6+
"node": ">=14.0.0"
7+
},
8+
"main": "./build/index.js",
9+
"files": [
10+
"build/lib/**/*",
11+
"build/index.*",
12+
"build/types/**/*"
13+
],
14+
"scripts": {
15+
"test": "mocha --inspect --require source-map-support/register --bail ./build/test/index.js",
16+
"build": "rm -rf build && npx tsc",
17+
"preversion": "git checkout develop && npm run build && npm test",
18+
"version": "npx conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add -A",
19+
"postversion": "git push origin develop && git checkout master && git merge develop && git push origin master --follow-tags && npm publish && git checkout develop",
20+
"tsc-live": "npx tsc -w"
21+
},
22+
"repository": {
23+
"type": "git",
24+
"url": "git+ssh://[email protected]:bscotch/node-util.git"
25+
},
26+
"keywords": [
27+
"utility",
28+
"util",
29+
"string",
30+
"template"
31+
],
32+
"author": "Adam Coster (https://www.bscotch.net/about)",
33+
"license": "MIT",
34+
"homepage": "https://github.com/bscotch/node-util",
35+
"dependencies": {},
36+
"devDependencies": {
37+
"@types/chai": "^4.2.12",
38+
"@types/mocha": "^8.0.3",
39+
"@types/node": "^14.6.4",
40+
"@typescript-eslint/eslint-plugin": "^4.3.0",
41+
"@typescript-eslint/parser": "^4.3.0",
42+
"chai": "^4.2.0",
43+
"conventional-changelog-cli": "^2.1.0",
44+
"eslint": "^7.8.1",
45+
"mocha": "^8.1.3",
46+
"source-map-support": "^0.5.19",
47+
"ts-node": "^9.0.0",
48+
"typescript": "^4.0.2"
49+
}
50+
}

tsconfig.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"include": [
3+
"./src"
4+
],
5+
"exclude":["node_modules"],
6+
"compilerOptions": {
7+
"lib":[
8+
"es2019.object",
9+
"es2019.array"
10+
],
11+
/* Basic Options */
12+
"target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
13+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
14+
// "allowJs": true, /* Allow javascript files to be compiled. */
15+
"outDir": "./build", /* Redirect output structure to the directory. */
16+
// "lib": [], /* Specify library files to be included in the compilation. */
17+
// "checkJs": true, /* Report errors in .js files. */
18+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
19+
"declaration": true, /* Generates corresponding '.d.ts' file. */
20+
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
21+
"sourceMap": true, /* Generates corresponding '.map' file. */
22+
// "outFile": "./", /* Concatenate and emit output to single file. */
23+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
24+
// "composite": true, /* Enable project compilation */
25+
// "incremental": true, /* Enable incremental compilation */
26+
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
27+
// "removeComments": true, /* Do not emit comments to output. */
28+
// "noEmit": true, /* Do not emit outputs. */
29+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
30+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
31+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
32+
33+
/* Strict Type-Checking Options */
34+
"strict": true, /* Enable all strict type-checking options. */
35+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
36+
// "strictNullChecks": true, /* Enable strict null checks. */
37+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
38+
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
39+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
40+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
41+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
42+
43+
/* Additional Checks */
44+
// "noUnusedLocals": true, /* Report errors on unused locals. */
45+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
46+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
47+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
48+
49+
/* Module Resolution Options */
50+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
51+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
52+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
53+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
54+
"typeRoots": [
55+
"./node_modules/@types",
56+
"./src/project/types",
57+
"./src/types"
58+
], /* List of folders to include type definitions from. */
59+
// "types": [], /* Type declaration files to be included in compilation. */
60+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
61+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
62+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
63+
64+
/* Source Map Options */
65+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
66+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
67+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
68+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
69+
70+
/* Experimental Options */
71+
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
72+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
73+
}
74+
}

0 commit comments

Comments
 (0)