This repository was archived by the owner on Aug 12, 2020. It is now read-only.
File tree 4 files changed +84
-4
lines changed 4 files changed +84
-4
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,13 @@ module.exports = {
101
101
// @remove -on-eject-end
102
102
module : {
103
103
// First, run the linter.
104
- // It's important to do this before Babel processes the JS.
104
+ // It's important to do this before Babel or TypeScript processes the JS/TS .
105
105
preLoaders : [
106
+ {
107
+ test : / \. ( t s | t s x ) $ / ,
108
+ loader : 'tslint' ,
109
+ include : paths . appSrc
110
+ } ,
106
111
{
107
112
test : / \. ( j s | j s x ) $ / ,
108
113
loader : 'eslint' ,
@@ -112,7 +117,7 @@ module.exports = {
112
117
loaders : [
113
118
// Process TS with TypeScript and then with Babel
114
119
{
115
- test : / \. ( t s | t s x ) ? $ / ,
120
+ test : / \. ( t s | t s x ) $ / ,
116
121
include : paths . appSrc ,
117
122
loader : 'awesome-typescript' ,
118
123
query : {
Original file line number Diff line number Diff line change @@ -107,8 +107,13 @@ module.exports = {
107
107
// @remove -on-eject-end
108
108
module : {
109
109
// First, run the linter.
110
- // It's important to do this before Babel processes the JS.
110
+ // It's important to do this before Babel or TypeScript processes the JS/TS .
111
111
preLoaders : [
112
+ {
113
+ test : / \. ( t s | t s x ) $ / ,
114
+ loader : 'tslint' ,
115
+ include : paths . appSrc
116
+ } ,
112
117
{
113
118
test : / \. ( j s | j s x ) $ / ,
114
119
loader : 'eslint' ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @nlesc/react-scripts" ,
3
- "version" : " 0.0.8 " ,
3
+ "version" : " 0.0.9 " ,
4
4
"description" : " Configuration and scripts for Create React App with Typescript." ,
5
5
"repository" : " NLeSC/create-react-app" ,
6
6
"license" : " BSD-3-Clause" ,
63
63
"strip-ansi" : " 3.0.1" ,
64
64
"style-loader" : " 0.13.1" ,
65
65
"typescript" : " ^2.0.7" ,
66
+ "tslint" : " ^3.15.1" ,
67
+ "tslint-loader" : " ^2.1.5" ,
68
+ "tslint-react" : " ^1.1.0" ,
66
69
"url-loader" : " 0.5.7" ,
67
70
"webpack" : " 1.13.2" ,
68
71
"webpack-dev-server" : " 1.16.2" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : [" tslint:latest" , " tslint-react" ],
3
+ "rules" : {
4
+ "class-name" : true ,
5
+ "comment-format" : [
6
+ true ,
7
+ " check-space"
8
+ ],
9
+ "indent" : [
10
+ true ,
11
+ " spaces"
12
+ ],
13
+ "jsx-alignment" : true ,
14
+ "jsx-no-lambda" : false ,
15
+ "jsx-no-string-ref" : true ,
16
+ "jsx-no-multiline-js" : false ,
17
+ "jsx-self-close" : true ,
18
+ "member-access" : false ,
19
+ "no-duplicate-variable" : true ,
20
+ "no-eval" : true ,
21
+ "no-internal-module" : true ,
22
+ "no-trailing-whitespace" : true ,
23
+ "no-unsafe-finally" : true ,
24
+ "no-var-keyword" : true ,
25
+ "one-line" : [
26
+ true ,
27
+ " check-open-brace" ,
28
+ " check-whitespace"
29
+ ],
30
+ "ordered-imports" : false ,
31
+ "quotemark" : [
32
+ true ,
33
+ " single" ,
34
+ " jsx-double"
35
+ ],
36
+ "semicolon" : [
37
+ true ,
38
+ " always"
39
+ ],
40
+ "triple-equals" : [
41
+ true ,
42
+ " allow-null-check"
43
+ ],
44
+ "typedef-whitespace" : [
45
+ true ,
46
+ {
47
+ "call-signature" : " nospace" ,
48
+ "index-signature" : " nospace" ,
49
+ "parameter" : " nospace" ,
50
+ "property-declaration" : " nospace" ,
51
+ "variable-declaration" : " nospace"
52
+ }
53
+ ],
54
+ "variable-name" : [
55
+ true ,
56
+ " ban-keywords"
57
+ ],
58
+ "whitespace" : [
59
+ true ,
60
+ " check-branch" ,
61
+ " check-decl" ,
62
+ " check-operator" ,
63
+ " check-separator" ,
64
+ " check-type"
65
+ ]
66
+ }
67
+ }
You can’t perform that action at this time.
0 commit comments