Skip to content

Instantly share code, notes, and snippets.

@LeezQ
Created December 27, 2018 11:49
Show Gist options
  • Save LeezQ/6043d57fc71efa088fec5e2061c3a850 to your computer and use it in GitHub Desktop.
Save LeezQ/6043d57fc71efa088fec5e2061c3a850 to your computer and use it in GitHub Desktop.
ts 设置
**/*.md
**/*.svg
**/*.ejs
**/*.html
package.json
.umi
.umi-production
{
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
],
"parser": "typescript"
}
{
"private": true,
"scripts": {
"start": "PORT=8001 umi dev",
"build": "umi build",
"test": "umi test",
"lint": "eslint --ext .js src mock tests",
"gensdk": "openapi-generator config ./config/apigen.config.js && npm run prettier-all",
"prettier-all": "node ./scripts/prettier.js write",
"precommit": "lint-staged"
},
"devDependencies": {
"@types/react": "^16.4.16",
"@types/react-dom": "^16.0.9",
"babel-eslint": "^9.0.0",
"eslint": "^5.4.0",
"eslint-config-umi": "^0.1.5",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.11.1",
"husky": "^0.14.3",
"lint-staged": "^7.2.2",
"openapi-generator": "^0.1.24",
"prettier": "^1.15.3",
"stylelint": "^9.4.0",
"stylelint-config-prettier": "^4.0.0",
"stylelint-config-standard": "^18.0.0",
"ts-import-plugin": "^1.4.4",
"tslint": "^5.10.0",
"tslint-config-prettier": "^1.10.0",
"tslint-react": "^3.6.0",
"umi": "^2.1.2",
"umi-plugin-react": "^1.1.1"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"git add"
]
},
"engines": {
"node": ">=8.0.0"
},
"dependencies": {
"antd-mobile": "^2.2.6",
"styled-components": "^4.1.3"
}
}
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "es2016",
"lib": ["es7", "dom"],
"sourceMap": true,
"baseUrl": ".",
"jsx": "react",
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"rootDirs": ["/src", "/test", "/mock", "./typings"],
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowJs": true,
"experimentalDecorators": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["./src", "./typings"],
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts",
"tslint:latest",
"tslint-config-prettier"
]
}
{
"extends": ["tslint:latest", "tslint-react", "tslint-config-prettier"],
"rules": {
"no-var-requires": false,
"no-submodule-imports": false,
"object-literal-sort-keys": false,
"jsx-no-lambda": false,
"no-implicit-dependencies": false,
"no-console": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment