mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
d4a54b6122
I think I accidentally deleted the branch my prior PR was based on before you had a chance to merge or decide whether to merge. In case I borked things with that delete, I'm resubmitting the PR and figuring you can close one or the other or both as desired. Original notes: Based on with-mobx-state-tree, but typescript instead of javascript Aside from a few bits of typing and renaming .js files to .ts and .tsx, most of the the edits are to avoid warnings and errors when running the code through tslint (which can be done via the `npm run tslint` command in the example if desired). To keep this example simple, the `<styled>` component (which is used by the javascript-based with-redux and with-mobx-state-tree examples for the clock component) is not used in this example. The `<styled>` library can of course be used with typescript but (I think) it requires a more complicated set of typescript and babel .configs than is needed for most other components and libraries, so I'm just directly styling the one formerly `<styled>` div to keep things simple and broadly applicable.
51 lines
1.2 KiB
JSON
51 lines
1.2 KiB
JSON
{
|
|
"extends": [
|
|
"tslint-config-standard",
|
|
"tslint:latest",
|
|
"tslint-react"
|
|
],
|
|
"rules": {
|
|
"indent": [true, "spaces"],
|
|
"jsx-no-lambda": false,
|
|
"jsx-no-multiline-js": false,
|
|
"max-line-length": false,
|
|
"no-console": false,
|
|
"no-object-literal-type-assertion": false,
|
|
"no-submodule-imports": [
|
|
true,
|
|
"next"
|
|
],
|
|
"no-unused-variable": false,
|
|
"space-before-function-paren": false,
|
|
"ter-indent": [true, 2],
|
|
"typedef-whitespace": [
|
|
true,
|
|
{
|
|
"call-signature": "nospace",
|
|
"index-signature": "nospace",
|
|
"parameter": "nospace",
|
|
"property-declaration": "nospace",
|
|
"variable-declaration": "nospace"
|
|
},
|
|
{
|
|
"call-signature": "nospace",
|
|
"index-signature": "nospace",
|
|
"parameter": "nospace",
|
|
"property-declaration": "nospace",
|
|
"variable-declaration": "nospace"
|
|
}
|
|
],
|
|
"whitespace": [
|
|
true,
|
|
"check-branch",
|
|
"check-decl",
|
|
"check-operator",
|
|
"check-module",
|
|
"check-preblock",
|
|
"check-rest-spread",
|
|
"check-separator",
|
|
"check-typecast",
|
|
"check-type-operator"
|
|
]
|
|
}
|
|
} |