-
Notifications
You must be signed in to change notification settings - Fork 6
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
0 parents
commit d01b9ef
Showing
7 changed files
with
155 additions
and
0 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,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = truew |
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,30 @@ | ||
name: Node CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-node: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: npm install, build, and test | ||
run: | | ||
npm ci | ||
npm run build --if-present | ||
env: | ||
CI: true |
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,14 @@ | ||
.DS_Store | ||
.Trash-* | ||
|
||
node_modules/ | ||
dist/ | ||
|
||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
*.lock | ||
|
||
.idea | ||
/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,18 @@ | ||
module.exports = { | ||
globals: { | ||
"ts-jest": { | ||
tsConfig: "tsconfig.json" | ||
} | ||
}, | ||
moduleFileExtensions: [ | ||
"ts", | ||
"js" | ||
], | ||
transform: { | ||
"^.+\\.(ts|tsx)$": "ts-jest" | ||
}, | ||
testMatch: [ | ||
"**/test/**/*.test.(ts|js)" | ||
], | ||
testEnvironment: "node" | ||
}; |
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,42 @@ | ||
{ | ||
"name": "profanity", | ||
"version": "0.1.0", | ||
"description": "", | ||
"main": "index.js", | ||
"keywords": [], | ||
"author": "Rogério Araújo (rodgeraraujo)", | ||
"license": "MIT", | ||
"scripts": { | ||
"prestart": "npm run compile", | ||
"pretest": "npm run compile", | ||
"lint": "tslint --config tslint.json --project .", | ||
"compile": "rimraf ./dist && tsc", | ||
"server": "node dist/index.js", | ||
"start": "npm run serve", | ||
"test": "jest --verbose", | ||
"test-coverage": "jest --forceExit --coverage --verbose", | ||
"watch": "concurrently \"npm run watch-ts\" \"npm run watch-node\" \"watch-test\"", | ||
"watch-node": "nodemon dist/index.js", | ||
"watch-test": "npm run test --watchAll", | ||
"watch-ts": "tsc -w" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.14", | ||
"@types/node": "^14.11.5", | ||
"concurrently": "^5.3.0", | ||
"jest": "^26.5.2", | ||
"nodemon": "^2.0.4", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^26.4.1", | ||
"tslint": "^6.1.3", | ||
"typescript": "^4.0.3" | ||
}, | ||
"dependencies": { | ||
"winston": "^3.3.3" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "npm run lint" | ||
} | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "dist", | ||
"module": "commonjs", | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"target": "es6", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"strict": true, | ||
}, | ||
"lib": ["es2015"], | ||
"include": [ | ||
"src/**/*.ts", | ||
"test/**/*.ts" | ||
] | ||
} |
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,23 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": [ | ||
"eslint:recommended" | ||
], | ||
"jsRules": {}, | ||
"plugins": [ | ||
"node" | ||
], | ||
"rules": { | ||
"typedef": false, | ||
"no-console": false, | ||
"eofline": false, | ||
"quotemark": [ | ||
true, | ||
"single" | ||
], | ||
"block-scoped-var": "error", | ||
"no-var": "error", | ||
"prefer-const": "error" | ||
}, | ||
"rulesDirectory": [] | ||
} |