Skip to content

Commit f050b4f

Browse files
authored
Merge pull request #5 from ololabs/update-tslint
Update TSLint configs for TSLint 5.x.
2 parents 8da690d + 8a007a9 commit f050b4f

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22
node_js:
3-
- "5"
3+
- "6"
44
env:
55
- PACKAGE_DIR=packages/eslint-config-olo
66
- PACKAGE_DIR=packages/tslint-config-olo
77
- PACKAGE_DIR=packages/olo-gulp-helpers
8-
script: cd $PACKAGE_DIR && npm install && npm run lint
8+
script: cd $PACKAGE_DIR && yarn && yarn run lint

packages/tslint-config-olo/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This package provides Olo's shared TSLint configuration, to be used in all TypeScript applications.
44

5+
**Note:** the rules are defined in `rules` and exported via `index.js`. The `.eslintrc` is present so we can lint the rules files with our standard rules.
6+
7+
The v0.2.0 rule set assumes TypeScript 2.x.
8+
59
## Usage
610

711
Specify the following in your `tslint.json` file:

packages/tslint-config-olo/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tslint-config-olo",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Olo's TSLint configs",
55
"main": "index.js",
66
"scripts": {
@@ -27,5 +27,8 @@
2727
"devDependencies": {
2828
"eslint": "^2.5.1",
2929
"eslint-config-olo": "^0.1.1"
30+
},
31+
"peerDependencies": {
32+
"typescript": "2"
3033
}
3134
}

packages/tslint-config-olo/rules/functionality.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,20 @@ module.exports = {
44
'curly': true,
55
'forin': true,
66
'label-position': true,
7-
'label-undefined': true,
87
'no-arg': true,
98
'no-bitwise': true,
109
'no-conditional-assignment': true,
1110
'no-console': true,
1211
'no-construct': true,
1312
'no-debugger': true,
14-
'no-duplicate-key': true,
1513
'no-duplicate-variable': true,
1614
'no-eval': true,
1715
'no-invalid-this': true,
1816
'no-null-keyword': true,
1917
'no-shadowed-variable': true,
2018
'no-string-literal': false,
2119
'no-switch-case-fall-through': true,
22-
'no-unreachable': true,
2320
'no-unused-expression': true,
24-
'no-unused-variable': [true, 'react', { 'ignore-pattern': 'React' }],
2521
'no-use-before-declare': true,
2622
'no-var-keyword': true,
2723
'radix': true,
@@ -30,4 +26,4 @@ module.exports = {
3026
'use-isnan': true,
3127
'use-strict': true
3228
}
33-
};
29+
};

0 commit comments

Comments
 (0)