Skip to content

Commit 24ef567

Browse files
authored
refactor(views): rewrite in TypeScript (#57)
* setup typescript * chore: add .editorconfig * chore: setup tslint * fix: ts definitions * test: setup ts-node for tests * refactor(YearView): ts * chore(tslint): add rule * refactor(Calendar): ts * refactor(DayView): ts * refactor(DayView, Calendar): remove proptypes * refactor(DatesRangeView): ts * refactor(HourView): ts * refactor(MinuteView): ts * refactor(MonthView): ts * refactor(InputView): ts * refactor(BaseView): rename BaseView to BaseCalendarView * refactor(views): unify view interface
1 parent 560ee74 commit 24ef567

Some content is hidden

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

72 files changed

+1527
-2036
lines changed

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# http://editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
# Change these settings to your own preference
10+
indent_style = space
11+
indent_size = 2
12+
13+
# We recommend you to keep these unchanged
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
19+
[*.md]
20+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
dist
33
calendar.bundle.js
4+
calendar.bundle.js.map
45

56
### STS ###
67
.apt_generated
@@ -23,5 +24,3 @@ nbbuild/
2324
dist/
2425
nbdist/
2526
.nb-gradle/
26-
27-
.vscode

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"tslint.enable": true,
3+
"tslint.jsEnable": true,
4+
"tslint.run": "onSave"
5+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Since ``semantic-ui-calendar-react`` uses moment.js it supports locales.
107107
To change locale you need to set ``moment``'s locale in a scope that contains ``semantic-ui-calendar-react`` components:
108108

109109
```javascript
110-
import moment from 'moment';
110+
import * as moment from 'moment';
111111

112112
moment.locale('ru');
113113

example/calendar.js

Lines changed: 0 additions & 215 deletions
This file was deleted.

0 commit comments

Comments
 (0)