mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
14c7b25fcc
Pulling out a few core points from the readme... This example builds from /src into /dist, managing the different expectations of express.js (es5, commonjs) and next.js (es6) by using a pair of tsconfig.json files, both of which are run by `npm run build-ts` or any of the other npm targets. Hot module reloading is largely but not completely wired up (nodemon is watching /dist but tsc isn't set up to watch /src and transpile changes in /src to /dist automatically (that's mainly because I wasn't sure how to start both nodemon and a pair of tsc watchers and be confident all would get shut down when the user killed dev mode). The readme suggests running `npm run build-ts` manually in another window to push changes from /src into /dev and on into the browser. tslint is also wired up via `npm run tslint`
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"
|
|
]
|
|
}
|
|
} |