Skip to content
This repository was archived by the owner on Mar 29, 2020. It is now read-only.

Commit f372070

Browse files
committed
fix(typescript): make prettier use typescript parser
1 parent 76e6a14 commit f372070

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module.exports = {
8383
trailingComma: 'all',
8484
bracketSpacing: false,
8585
jsxBracketSameLine: false,
86+
parser: 'babylon',
8687
semi: true,
8788
},
8889
],

typescript.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ module.exports = {
2525
],
2626
'import/no-named-as-default-member': 'off', // conflicts with typescript
2727
'import/no-named-as-default': 'off', // conflicts with typescript
28+
// https://github.com/not-an-aardvark/eslint-plugin-prettier
29+
'prettier/prettier': [
30+
'error',
31+
{
32+
useTabs: false,
33+
printWidth: 80,
34+
tabWidth: 2,
35+
singleQuote: true,
36+
trailingComma: 'all',
37+
bracketSpacing: false,
38+
jsxBracketSameLine: false,
39+
parser: 'typescript',
40+
semi: true,
41+
},
42+
],
2843
// https://github.com/nzakas/eslint-plugin-typescript
2944
'typescript/explicit-member-accessibility': 'error',
3045
'typescript/interface-name-prefix': 'error',

0 commit comments

Comments
 (0)