Skip to content

Commit 6539708

Browse files
author
roman.vasilev
committed
feat: First release
1 parent 8e94ecf commit 6539708

File tree

13 files changed

+427
-0
lines changed

13 files changed

+427
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[*.json]
16+
indent_size = 2

.eslintrc.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
module.exports = {
2+
'root': true,
3+
'env': {
4+
'node': true
5+
},
6+
'extends': [
7+
'eslint:recommended',
8+
'plugin:unicorn/recommended',
9+
],
10+
'parser': 'typescript-eslint-parser',
11+
'parserOptions': {
12+
'ecmaVersion': 2017,
13+
'sourceType': 'module',
14+
'ecmaFeatures': {
15+
'jsx': false,
16+
},
17+
},
18+
'plugins': [
19+
'unicorn',
20+
'typescript',
21+
'import',
22+
'tslint2',
23+
],
24+
'rules': {
25+
'no-undef': 0,
26+
'no-unused-vars': 0,
27+
'indent': 0,
28+
'unicorn/import-index': 0,
29+
'import/newline-after-import': 0,
30+
'import/no-duplicates': 1,
31+
'import/max-dependencies': [1, { 'max': 10 }],
32+
'quotes': [1, 'single', { 'allowTemplateLiterals': true }],
33+
'semi': [1, 'always'],
34+
'tslint2/config': [1, {
35+
configFile: 'tsconfig.json',
36+
rulesDirectory: [
37+
'node_modules/tslint/lib/rules',
38+
'node_modules/tslint-clean-code/dist/src',
39+
'node_modules/tslint-microsoft-contrib',
40+
'node_modules/tslint-sonarts/lib/rules',
41+
],
42+
rules: Object.assign({},
43+
require('tslint/lib/configs/recommended').rules,
44+
require('tslint-clean-code/recommended_ruleset').rules,
45+
require('tslint-microsoft-contrib/recommended_ruleset').rules,
46+
require('tslint-sonarts/tslint-sonarts.json').rules,
47+
{
48+
'no-use-before-declare': true,
49+
'member-access': false,
50+
'ordered-imports': false,
51+
'quotemark': false,
52+
'no-var-keyword': false,
53+
'object-literal-sort-keys': false,
54+
'no-console': false,
55+
'arrow-parens': false,
56+
'max-line-length': false,
57+
'object-literal-key-quotes': false,
58+
'no-shadowed-variable': false,
59+
'only-arrow-functions': false,
60+
'no-var-requires': false,
61+
'semicolon': false,
62+
'interface-over-type-literal': false,
63+
'align': false,
64+
'trailing-comma': false,
65+
'typedef': false,
66+
'newline-before-return': false,
67+
'interface-name': false,
68+
'ban-types': false,
69+
'no-relative-imports': false,
70+
'missing-jsdoc': false,
71+
}
72+
),
73+
}],
74+
}
75+
};

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/node_modules
2+
/.idea
3+
/.awcache
4+
/.vscode
5+
/.nyc_output
6+
*.log
7+
~*
8+
/dist/
9+
/dist_*

.npmignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# .gitignore
2+
/node_modules
3+
/.idea
4+
/.awcache
5+
/.vscode
6+
/.nyc_output
7+
*.log
8+
~*
9+
# .npmignore
10+
/tsconfig.json
11+
/.eslintrc.js
12+
/.editorconfig

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock = false
2+
# save-exact = true

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## 0.3.0 (2018-08-30)
2+
3+
* feat: coverage support ([3879363](https://github.com/unlight/node-package-starter/commit/3879363))
4+
* added new tslint plugin ([f36dfff](https://github.com/unlight/node-package-starter/commit/f36dfff))
5+
* changed command to test run ([bc01ce1](https://github.com/unlight/node-package-starter/commit/bc01ce1))
6+
* eslint brushed ([85a2c06](https://github.com/unlight/node-package-starter/commit/85a2c06))
7+
* new tslint rules ([dbd3a84](https://github.com/unlight/node-package-starter/commit/dbd3a84))
8+
* pretty true ([0e9d2d7](https://github.com/unlight/node-package-starter/commit/0e9d2d7))
9+
* Removed transpile for semantic-release ([baf5936](https://github.com/unlight/node-package-starter/commit/baf5936))
10+
* removed tslin from deps ([296bcd0](https://github.com/unlight/node-package-starter/commit/296bcd0))
11+
* small comments ([66eeab5](https://github.com/unlight/node-package-starter/commit/66eeab5))
12+
* updated deps ([3ead237](https://github.com/unlight/node-package-starter/commit/3ead237))
13+
* updated deps ([91f7af7](https://github.com/unlight/node-package-starter/commit/91f7af7))
14+
* updates ([07c61c4](https://github.com/unlight/node-package-starter/commit/07c61c4))
15+
* Upgrade: Updated files ([9fc5a99](https://github.com/unlight/node-package-starter/commit/9fc5a99))
16+
17+
<a name="0.2.3"></a>
18+
## [0.2.3](https://github.com/unlight/node-package-starter/compare/v0.2.2...v0.2.3) (2018-05-10)
19+
20+
21+
### Fix
22+
23+
* Changed register ts-node path ([16e461c55743700c8c007840add9ae9d7e425aca](https://github.com/unlight/node-package-starter/commit/16e461c55743700c8c007840add9ae9d7e425aca))
24+
25+
### Upgrade
26+
27+
* Dependency upgrade ([c42466f533f0f716d2bc181f703218f951975b8f](https://github.com/unlight/node-package-starter/commit/c42466f533f0f716d2bc181f703218f951975b8f))
28+
29+
<a name="0.2.2"></a>
30+
## [0.2.2](https://github.com/unlight/node-package-starter/compare/v0.2.1...v0.2.2) (2018-04-02)
31+
32+
33+
### Fix
34+
35+
* Removed test file ([3c477aa815117f274c96f8df361924c7e56c8323](https://github.com/unlight/node-package-starter/commit/3c477aa815117f274c96f8df361924c7e56c8323))
36+
37+
<a name="0.2.1"></a>
38+
## [0.2.1](https://github.com/unlight/node-package-starter/compare/v0.2.0...v0.2.1) (2018-03-16)
39+
40+
41+
### Fix
42+
43+
* Updated .editorconfig ([09955363ec219ddab50d940d82eb7fba3f5bb9b7](https://github.com/unlight/node-package-starter/commit/09955363ec219ddab50d940d82eb7fba3f5bb9b7))
44+
45+
### Upgrade
46+
47+
* Updated deps ([78b56e047363da2b27b2e100261c7e71269c3b12](https://github.com/unlight/node-package-starter/commit/78b56e047363da2b27b2e100261c7e71269c3b12))

LICENSE

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

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node-package-starter
2+
===
3+
```
4+
git clone https://github.com/unlight/node-package-starter
5+
```
6+
7+
CHANGELOG
8+
---
9+
See [CHANGELOG.md](CHANGELOG.md)

package.json

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"name": "node-package-starter",
3+
"version": "0.0.0-dev",
4+
"license": "MIT",
5+
"description": "",
6+
"main": "dist/index.js",
7+
"typings": "src/index.ts",
8+
"scripts": {
9+
"test": "npm run eslint && npm run tscheck && npm run test:cov",
10+
"_mocha": "node -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha",
11+
"test:r": "mocha -r ts-node/register/transpile-only src/**/*.spec.ts",
12+
"test:w": "mocha -r ts-node/register/transpile-only --watch-extensions ts --watch src/**/*.spec.ts",
13+
"test:cov": "nyc mocha src/**/*.spec.ts",
14+
"test:d": "node --inspect-brk -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha --no-timeouts --watch-extensions ts --watch src/**/*.spec.ts",
15+
"tscheck": "echo tscheck... && tsc --noEmit",
16+
"tscheck:w": "npm run tscheck -- --watch",
17+
"tsclint": "tsc --noEmit --pretty --strict --forceConsistentCasingInFileNames --noImplicitReturns --noImplicitThis --noUnusedLocals --noUnusedParameters",
18+
"tsclint:w": "npm run tsclint -- --watch",
19+
"eslint": "eslint src --ext ts",
20+
"eslint:fix": "eslint src --ext \"ts\" --fix",
21+
"eslint:w": "chokidar \"src/**/*.ts\" --initial -c \"npm run eslint\"",
22+
"lint:w": "run-p tsclint:w eslint:w",
23+
"prepublishOnly": "npm run build && sed -i -e 's/devDependencies/_devDependencies/g' package.json",
24+
"build": "tsc",
25+
"prebuild": "npm run clean",
26+
"clean": "rimraf dist",
27+
"commit": "git-cz"
28+
},
29+
"dependencies": {},
30+
"devDependencies": {
31+
"@semantic-release/changelog": "^3.0.0",
32+
"@semantic-release/git": "^7.0.3",
33+
"@semantic-release/npm": "^5.0.4",
34+
"@types/eslint": "^4.16.3",
35+
"@types/mocha": "^5.2.5",
36+
"@types/node": "^10.10.1",
37+
"chokidar-cli": "^1.2.1",
38+
"eslint": "^5.4.0",
39+
"eslint-plugin-import": "^2.14.0",
40+
"eslint-plugin-tslint2": "^2.2.4",
41+
"eslint-plugin-typescript": "^0.12.0",
42+
"eslint-plugin-unicorn": "^6.0.0",
43+
"mocha": "^5.2.0",
44+
"npm-run-all": "^4.1.3",
45+
"nyc": "^13.0.1",
46+
"rimraf": "^2.6.2",
47+
"semantic-release": "^15.9.12",
48+
"ts-node": "^7.0.1",
49+
"tslint": "^5.11.0",
50+
"tslint-clean-code": "^0.2.7",
51+
"tslint-microsoft-contrib": "^5.2.1",
52+
"tslint-sonarts": "^1.7.0",
53+
"typescript": "^3.0.1",
54+
"typescript-eslint-parser": "^18.0.0"
55+
},
56+
"engines": {
57+
"node": ">=6",
58+
"npm": ">=3"
59+
},
60+
"repository": {
61+
"type": "git",
62+
"url": "https://github.com/unlight/node-package-starter.git"
63+
},
64+
"keywords": [],
65+
"nyc": {
66+
"include": [
67+
"src/**/*.ts",
68+
"src/**/*.tsx"
69+
],
70+
"exclude": [
71+
"**/*.d.ts",
72+
"src/**/*.spec.ts"
73+
],
74+
"extension": [
75+
".ts",
76+
".tsx"
77+
],
78+
"require": [
79+
"ts-node/register/transpile-only"
80+
],
81+
"reporter": [
82+
"text"
83+
],
84+
"sourceMap": true,
85+
"instrument": true
86+
},
87+
"release": {
88+
"generateNotes": {
89+
"writerOpts": {
90+
"__keep": "me"
91+
}
92+
},
93+
"verifyConditions": [
94+
"@semantic-release/changelog",
95+
"@semantic-release/github",
96+
"@semantic-release/npm",
97+
"@semantic-release/git"
98+
],
99+
"prepare": [
100+
"@semantic-release/changelog",
101+
"@semantic-release/npm",
102+
"@semantic-release/git"
103+
],
104+
"publish": [
105+
"@semantic-release/npm",
106+
"@semantic-release/github"
107+
],
108+
"success": [
109+
"@semantic-release/github"
110+
],
111+
"fail": [
112+
"@semantic-release/github"
113+
]
114+
},
115+
"config": {
116+
"commitizen": {
117+
"path": "cz-conventional-changelog"
118+
}
119+
}
120+
}

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { noEslintDisable } from './no-eslint-disable';
2+
import { Rule } from 'eslint';
3+
4+
type RuleDict = { [id: string]: Rule.RuleModule | ((context: Rule.RuleContext) => Rule.RuleListener) };
5+
6+
export const rules: RuleDict = {
7+
'no-eslint-disable': noEslintDisable,
8+
};

0 commit comments

Comments
 (0)