Skip to content

Commit 48708f4

Browse files
committed
Fix build error and warnings
1 parent afd5f97 commit 48708f4

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
dist
33
coverage
44
**/*.d.ts
5-
tests
5+
tests
6+
_temp_extension

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ module.exports = {
66
'plugin:prettier/recommended',
77
'plugin:react/recommended'
88
],
9+
settings: {
10+
react: {
11+
createClass: "createReactClass", // Regex for Component Factory to use,
12+
// default to "createReactClass"
13+
pragma: "React", // Pragma to use, default to "React"
14+
fragment: "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
15+
version: "detect", // React version. "detect" automatically picks the version you have installed.
16+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
17+
// default to latest and warns if missing
18+
// It will default to "detect" in the future
19+
flowVersion: "0.53" // Flow version
20+
}
21+
},
922
parser: '@typescript-eslint/parser',
1023
parserOptions: {
1124
project: 'tsconfig.json',

src/CodeSnippetDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export class CodeSnippetDisplay extends React.Component<
462462
target.addEventListener('mousemove', this.handleDragMove, true);
463463

464464
// since a browser has its own drag'n'drop support for images and some other elements.
465-
target.ondragstart = () => false;
465+
target.ondragstart = (): boolean => false;
466466

467467
event.preventDefault();
468468
}

src/FilterTools.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ export class FilterTools extends React.Component<
4141
this.filterSnippets = this.filterSnippets.bind(this);
4242
}
4343

44-
componentDidMount() {
44+
componentDidMount(): void {
4545
this.setState({
4646
show: false,
4747
selectedTags: [],
4848
searchValue: ''
4949
});
5050
}
5151

52-
componentDidUpdate(prevProps: IFilterSnippetProps) {
52+
componentDidUpdate(prevProps: IFilterSnippetProps): void {
5353
if (prevProps !== this.props) {
5454
this.setState(state => ({
5555
selectedTags: state.selectedTags

0 commit comments

Comments
 (0)