File tree 5 files changed +58
-33
lines changed
5 files changed +58
-33
lines changed Original file line number Diff line number Diff line change
1
+ dist : trusty
2
+ language : node_js
3
+ node_js :
4
+ - ' 10'
5
+ - ' 8'
6
+ install : npm i
7
+ script :
8
+ - npm run check-format
9
+ - npm run test
Original file line number Diff line number Diff line change 1
1
# eslint-import-resolver-typescript
2
2
3
+ [ ![ Build Status] ( https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript.svg?branch=master )] ( https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript )
4
+
3
5
This plugin adds typescript support to [ ` eslint-plugin-import ` ] ( https://www.npmjs.com/package/eslint-plugin-import ) .
4
6
5
7
This means you can:
@@ -43,3 +45,7 @@ Add the following to your `.eslintrc` config:
43
45
44
46
- Make sure your change is covered by a test import.
45
47
- Make sure that ` npm test ` passes without a failure.
48
+ - Make sure your code is formatted ` npm format ` .
49
+
50
+ We have an [ automatic travis build] ( https://travis-ci.org/alexgorbatchev/eslint-import-resolver-typescript ) which will run the above on your PRs.
51
+ If either fails, we won't be able to merge your PR until it's fixed.
Original file line number Diff line number Diff line change 32
32
"dummy.js" : " file:dummy.js" ,
33
33
"eslint" : " ^5.6.1" ,
34
34
"eslint-plugin-import" : " ^2.14.0" ,
35
+ "prettier" : " ^1.14.3" ,
35
36
"typescript" : " ^3.1.1"
36
37
},
37
38
"scripts" : {
38
- "test" : " eslint ./tests/withPaths/index.ts && eslint ./tests/withoutPaths/index.ts"
39
+ "test" : " eslint ./tests/withPaths/index.ts && eslint ./tests/withoutPaths/index.ts" ,
40
+ "check-format" : " prettier --config prettier.config.js index.js -l" ,
41
+ "format" : " prettier --config prettier.config.js index.js --write"
39
42
}
40
43
}
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
1
3
module . exports = {
2
- parser : 'typescript' ,
4
+ arrowParens : 'avoid' ,
5
+ bracketSpacing : true ,
6
+ parser : 'babylon' ,
7
+ jsxBracketSameLine : true ,
8
+ proseWrap : 'preserve' ,
9
+ semi : true ,
3
10
singleQuote : true ,
11
+ tabWidth : 2 ,
4
12
trailingComma : 'all' ,
13
+ useTabs : false ,
5
14
} ;
Original file line number Diff line number Diff line change 1
- const path = require ( 'path' )
1
+ const path = require ( 'path' ) ;
2
2
3
- module . exports = ( dirname ) => ( {
4
- env : {
5
- es6 : true ,
6
- } ,
7
- parserOptions : {
8
- ecmaVersion : 2018 ,
9
- sourceType : 'module' ,
10
- } ,
11
- plugins : [
12
- 'import'
3
+ module . exports = dirname => ( {
4
+ env : {
5
+ es6 : true ,
6
+ } ,
7
+ parserOptions : {
8
+ ecmaVersion : 2018 ,
9
+ sourceType : 'module' ,
10
+ } ,
11
+ plugins : [ 'import' ] ,
12
+ rules : {
13
+ 'import/no-unresolved' : 'error' ,
14
+ 'import/extensions' : [
15
+ 'error' ,
16
+ 'ignorePackages' ,
17
+ {
18
+ js : 'never' ,
19
+ jsx : 'never' ,
20
+ ts : 'never' ,
21
+ tsx : 'never' ,
22
+ } ,
13
23
] ,
14
- rules : {
15
- 'import/no-unresolved' : 'error' ,
16
- 'import/extensions' : [
17
- 'error' ,
18
- 'ignorePackages' ,
19
- {
20
- js : 'never' ,
21
- jsx : 'never' ,
22
- ts : 'never' ,
23
- tsx : 'never' ,
24
- } ,
25
- ] ,
26
- } ,
27
- settings : {
28
- 'import/resolver' : {
29
- [ path . resolve ( `${ __dirname } /../index.js` ) ] : {
30
- directory : dirname ,
31
- } ,
32
- } ,
24
+ } ,
25
+ settings : {
26
+ 'import/resolver' : {
27
+ [ path . resolve ( `${ __dirname } /../index.js` ) ] : {
28
+ directory : dirname ,
29
+ } ,
33
30
} ,
34
- } )
31
+ } ,
32
+ } ) ;
You can’t perform that action at this time.
0 commit comments