Skip to content
This repository was archived by the owner on Jan 18, 2019. It is now read-only.

Commit db9bf0e

Browse files
author
roman.vasilev
committed
Merge branch 'dev'
2 parents 7f1b4fa + b6947be commit db9bf0e

File tree

15 files changed

+360
-4977
lines changed

15 files changed

+360
-4977
lines changed

.editorconfig

+16
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

.gitattributes

-1
This file was deleted.

.gitignore

+3-24
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,19 @@
1-
# Logs
21
logs
32
*.log
43
npm-debug.log*
5-
6-
# Runtime data
74
pids
85
*.pid
96
*.seed
10-
11-
# Directory for instrumented libs generated by jscoverage/JSCover
127
lib-cov
13-
14-
# Coverage directory used by tools like istanbul
158
coverage
16-
17-
# nyc test coverage
189
.nyc_output
19-
20-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
2110
.grunt
22-
23-
# node-waf configuration
2411
.lock-wscript
25-
26-
# Compiled binary addons (http://nodejs.org/api/addons.html)
2712
build/Release
28-
29-
# Dependency directories
3013
node_modules
3114
jspm_packages
32-
33-
# Optional npm cache directory
3415
.npm
35-
36-
# Optional REPL history
3716
.node_repl_history
38-
39-
# Generated lib directory containing the final plugin code
40-
lib
17+
.vscode
18+
/dist/
19+
~*

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock = false
2+
# save-exact = true

.travis.yml

-23
This file was deleted.

.vscode/settings.json

-5
This file was deleted.

README.md

+24-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
<h1 align="center">ESLint Plugin TSLint</h1>
1+
# eslint-plugin-tslint2
2+
ESLint plugin wraps a TSLint configuration and lints the whole source using TSLint.
23

3-
<p align="center">
4-
<a href="https://travis-ci.org/JamesHenry/eslint-plugin-tslint"><img src="https://img.shields.io/travis/JamesHenry/eslint-plugin-tslint.svg?style=flat-square" alt="Travis"/></a>
5-
<a href="https://github.com/JamesHenry/eslint-plugin-tslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/eslint-plugin-tslint.svg?style=flat-square" alt="GitHub license" /></a>
6-
<a href="https://www.npmjs.com/package/eslint-plugin-tslint"><img src="https://img.shields.io/npm/v/eslint-plugin-tslint.svg?style=flat-square" alt="NPM Version" /></a>
7-
<a href="https://www.npmjs.com/package/eslint-plugin-tslint"><img src="https://img.shields.io/npm/dt/eslint-plugin-tslint.svg?style=flat-square" alt="NPM Downloads" /></a>
8-
<a href="http://commitizen.github.io/cz-cli/"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" /></a>
9-
<a href="https://github.com/semantic-release/semantic-release"><img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square" alt="semantic-release" /></a>
10-
<a href="https://greenkeeper.io"><img src="https://badges.greenkeeper.io/JamesHenry/mongoose-schema-to-typescript-interface.svg?style=flat-square" alt="greenkeeper.io" /></a>
11-
</p>
4+
## USAGE
5+
Configure in your eslint config file:
6+
```
7+
"plugins": [
8+
"tslint2"
9+
],
10+
"rules": {
11+
"tslint2/config": ["warn", {
12+
rules: { /* tslint rules */ },
13+
rulesDirectory: [ /* array of paths to directories with rules, e.g. 'node_modules/tslint/lib/rules' */ ],
14+
configFile: '/* path to tsconfig.json of your project */',
15+
compilerOptions: { /* ability to override TypeScript compilers options defined in tsconfig.json */ }
16+
}],
17+
}
18+
```
19+
20+
## RULES
21+
Plugin contains only single rule `tslint2/config`.
22+
23+
### TSLint Plugins
24+
* https://github.com/Glavin001/tslint-clean-code
25+
* https://github.com/Microsoft/tslint-microsoft-contrib
1226

13-
<br>
14-
<p align="center" style="border: 1px solid blue;">
15-
<a href="http://typescriptcourses.com" target="_blank"><img src="https://james-henry-cdn.firebaseapp.com/images/typescriptcourses-github-banner.png" alt="typescriptcourses.com"/></a>
16-
</p>
17-
<br>

package.json

+83-30
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,106 @@
11
{
2-
"name": "eslint-plugin-tslint",
2+
"name": "eslint-plugin-tslint2",
33
"version": "0.0.0-semantically-released",
4-
"main": "lib/index.js",
4+
"main": "dist/index.js",
5+
"typings": "src/index.ts",
56
"author": "James Henry <[email protected]>",
7+
"contributors": [
8+
"Roman Vasilev (https://github.com/unlight)"
9+
],
610
"description": "TSLint wrapper plugin for ESLint",
7-
"keywords": ["eslint", "eslintplugin", "eslint-plugin", "tslint"],
8-
"files": ["lib"],
9-
"repository": "JamesHenry/eslint-plugin-tslint",
11+
"keywords": [
12+
"eslint",
13+
"eslintplugin",
14+
"eslint-plugin",
15+
"tslint"
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/unlight/eslint-plugin-tslint2.git"
20+
},
1021
"license": "MIT",
1122
"scripts": {
12-
"test": "npm run build && jest",
13-
"build": "rm -rf lib/ && tsc",
14-
"semantic-release":
15-
"semantic-release pre && npm publish && semantic-release post",
16-
"precommit": "npm test && lint-staged",
23+
"test": "npm run tscheck && npm run test:r",
24+
"tscheck": "echo tscheck... && tsc --noEmit",
25+
"test:r": "jest --runInBand --verbose",
26+
"semantic-release": "semantic-release",
27+
"prepublishOnly": "npm run build && sed -i -e 's/devDependencies/_devDependencies/g' package.json",
28+
"build": "tsc",
29+
"prebuild": "npm run clean",
30+
"clean": "rm -rf dist/",
1731
"cz": "git-cz"
1832
},
33+
"dependencies": {
34+
"typescript-service": "^2.0.0"
35+
},
1936
"peerDependencies": {
2037
"tslint": "^5.0.0"
2138
},
2239
"devDependencies": {
23-
"@types/jest": "21.1.8",
24-
"@types/node": "8.0.58",
25-
"cz-conventional-changelog": "2.1.0",
26-
"eslint": "4.13.1",
27-
"husky": "^0.14.3",
28-
"jest": "21.2.1",
29-
"lint-staged": "6.0.0",
30-
"prettier-eslint-cli": "4.4.2",
31-
"semantic-release": "8.2.0",
32-
"ts-jest": "^21.2.3",
33-
"tslint": "^5.8.0",
34-
"typescript": "2.6.2",
35-
"typescript-eslint-parser": "10.0.0"
36-
},
37-
"lint-staged": {
38-
"src/**/*": ["prettier-eslint --write", "git add"],
39-
"test/**/*": ["prettier-eslint --write", "git add"]
40+
"@types/eslint": "^4.16.3",
41+
"@types/jest": "^23.3.1",
42+
"@types/node": "^10.9.2",
43+
"cz-conventional-changelog": "^2.1.0",
44+
"eslint": "^5.4.0",
45+
"jest": "^23.5.0",
46+
"semantic-release": "^15.9.9",
47+
"ts-jest": "^23.1.4",
48+
"tslint": "^5.11.0",
49+
"typescript": "^3.0.1",
50+
"typescript-eslint-parser": "^18.0.0"
51+
},
52+
"release": {
53+
"generateNotes": {
54+
"writerOpts": {
55+
"__keep": "me"
56+
}
57+
},
58+
"verifyConditions": [
59+
"@semantic-release/changelog",
60+
"@semantic-release/github",
61+
"@semantic-release/npm",
62+
"@semantic-release/git"
63+
],
64+
"prepare": [
65+
"@semantic-release/changelog",
66+
"@semantic-release/npm",
67+
"@semantic-release/git"
68+
],
69+
"publish": [
70+
"@semantic-release/npm",
71+
"@semantic-release/github"
72+
],
73+
"success": [
74+
"@semantic-release/github"
75+
],
76+
"fail": [
77+
"@semantic-release/github"
78+
]
4079
},
4180
"config": {
4281
"commitizen": {
43-
"path": "./node_modules/cz-conventional-changelog"
82+
"path": "cz-conventional-changelog"
4483
}
4584
},
4685
"jest": {
86+
"testEnvironment": "node",
4787
"transform": {
4888
"^.+\\.tsx?$": "ts-jest"
4989
},
50-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
51-
"moduleFileExtensions": ["ts", "js", "json"]
90+
"testMatch": [
91+
"<rootDir>/test/*.spec.ts"
92+
],
93+
"moduleFileExtensions": [
94+
"ts",
95+
"js",
96+
"json"
97+
]
98+
},
99+
"bugs": {
100+
"url": "https://github.com/unlight/eslint-plugin-tslint2/issues"
101+
},
102+
"homepage": "https://github.com/unlight/eslint-plugin-tslint2#readme",
103+
"directories": {
104+
"test": "test"
52105
}
53106
}

0 commit comments

Comments
 (0)