Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- prototype
- JavaScript
- 원본과 복사본
- var
- 코드스테이츠
- APPEND
- 클로저
- flex기본
- complexity
- 리커젼
- node.js설치
- appendChild
- 생활코딩
- AWS조사
- 인터프리터
- let
- css기초
- node.js
- 개발툴
- scope
- AWS
- AWS기초
- vscode
- CSS
- 기초공부
- 스코프
- IT
- 메모이제이션
- Big-O notation
- 재귀함수
Archives
- Today
- Total
Jveloper
2019. 07. 23 이머시브 수업 9주차 - 2일(react native + typescript set up) 본문
Project/HopeQuery
2019. 07. 23 이머시브 수업 9주차 - 2일(react native + typescript set up)
Jveloper 2019. 7. 25. 22:03react-native typescript set up
tslint.json set up
{
"extends": [
"tslint:latest",
"tslint-eslint-rules",
"tslint-react-recommended",
"tslint-config-prettier",
"tslint-config-airbnb",
"tslint-react-native"
],
"rules": {
"import-name": [
true,
{
"lodash": "_",
"fp": "_",
"server": "ReactDOMServer"
}
],
"ordered-imports": [true],
"quotemark": [true, "single", "jsx-single", "avoid-escape"],
"semicolon": [true, "always"],
"member-access": [false],
"member-ordering": [false],
"trailing-comma": [
true,
{
"singleline": "never",
"multiline": "always"
}
],
"prettier": true,
"no-empty": false,
"no-submodule-imports": false,
"no-implicit-dependencies": false,
"no-constant-condition": false,
"triple-equals": [true, "allow-undefined-check"],
"ter-indent": [
true,
2,
{
"SwitchCase": 1
}
],
"no-duplicate-imports": false,
"jsx-alignment": true,
"jsx-no-bind": true,
"jsx-no-lambda": false,
"prefer-template": [true, "allow-single-concat"],
"eofline": true,
"max-line-length": [
true,
{ "limit": 120, "ignore-pattern": "^import |^export {(.*?)}" }
],
"rulesDirectory": ["node_modules/tslint-eslint-rules/dist/rules"],
"ter-arrow-parens": [false, "as-needed", { "requireForBlockBody": true }]
}
}
tscongit.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react-native",
"outDir": "build",
"rootDir": "src",
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
"experimentalDecorators": true,
"preserveConstEnums": true,
"emitDecoratorMetadata": true,
"strict": true,
"skipLibCheck": true,
"declaration": true,
"noUnusedLocals": true,
"sourceMap": true
},
"exclude": ["node_modules", "build", "__tests__", "index.js", "index.ios.js"]
}
eslintrc.json
{
"parser": "babel-eslint",
"parserOptions": { "ecmaVersion": 2018 },
"env": { "node": true, "es6": true },
"extends": ["airbnb", "airbnb-typescript/base"],
"rules": {
"no-console": "off",
"react/jsx-filename-extension": [
1,
{ "extensions": [".js", ".jsx", ".ts", ".tsx", "./"] }
],
"jsx-a11y/accessible-emoji": "off",
"arrow-parens": [2, "as-needed"],
"no-restricted-syntax": ["error", "ForInStatement"]
}
}
rn-cli.config.js
/* eslint-disable comma-dangle */
module.exports = {
getTransformModulePath() {
// eslint-disable-next-line quotes
return require.resolve("react-native-typescript-transformer");
},
getSourceExts() {
// eslint-disable-next-line quotes
return ["ts", "tsx", "js", "jsx"];
}
};
이렇게 기본설정을 완료했다 잘 모르겠다면 제일 상단의 link를 따라가보자
'Project > HopeQuery' 카테고리의 다른 글
Comments