Skip to content

Commit 5975ce8

Browse files
committed
Add prettier
1 parent 836dea8 commit 5975ce8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+446
-669
lines changed

.eslintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2+
"extends": ["airbnb", "plugin:prettier/recommended", "prettier/react"],
3+
"plugins": ["prettier"],
24
"parser": "babel-eslint",
3-
"extends": ["airbnb"],
45
"globals": {
56
"window": true,
67
"Audio": true,
@@ -9,12 +10,13 @@
910
"navigator": true
1011
},
1112
"rules": {
13+
"prettier/prettier": ["error"],
1214
"no-confusing-arrow": 0,
1315
"no-return-assign": 0,
1416
"guard-for-in": 0,
1517
"no-restricted-syntax": 0,
1618
"no-param-reassign": 0,
1719
"react/no-will-update-set-state": 0,
18-
"new-cap": 0,
20+
"new-cap": 0
1921
}
2022
}

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true
4+
}

example/components/Example.jsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,20 @@ const otherFontTheme = {
1111
botBubbleColor: '#6E48AA',
1212
botFontColor: '#fff',
1313
userBubbleColor: '#fff',
14-
userFontColor: '#4a4a4a',
14+
userFontColor: '#4a4a4a'
1515
};
1616

1717
const steps = [
1818
{
1919
id: '1',
2020
message: 'Hello World',
21-
trigger: '2',
22-
},
23-
{
24-
id: '2',
25-
user: true,
26-
trigger: '3',
27-
},
28-
{
29-
id: '3',
30-
message: 'Hello World',
31-
end: true,
32-
},
21+
end: true
22+
}
3323
];
3424

35-
3625
const ThemedExample = () => (
3726
<ThemeProvider theme={otherFontTheme}>
38-
<ChatBot recognitionEnable steps={steps} />
27+
<ChatBot steps={steps} />
3928
</ThemeProvider>
4029
);
4130

example/main.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ import React from 'react';
22
import { render } from 'react-dom';
33
import Example from './components/Example';
44

5-
render(
6-
<Example />,
7-
document.getElementById('root'),
8-
);
5+
render(<Example />, document.getElementById('root'));

0 commit comments

Comments
 (0)