diff --git a/tsconfig.json b/tsconfig.json index 6444ff253126c1bb5ee98785bc67dc42db0ec6a4..48b504b7ee2725acb24e6d96490cea75b1b370a0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "outDir": "build/dist", "module": "esnext", - "target": "es2016", - "lib": ["es6", "dom"], + "target": "esnext", + "lib": ["esnext", "dom"], "sourceMap": true, "baseUrl": ".", "jsx": "react", @@ -16,19 +16,16 @@ "noUnusedLocals": true, "allowJs": true, "experimentalDecorators": true, + "strict": true, "paths": { - "@/*": ["./ant-design-pro/*/src/*"] + "@/*": ["./src/*"] } }, - "include": ["./ant-design-pro"], + "include": ["."], "exclude": [ "node_modules", - "build", - "scripts", - "acceptance-tests", - "webpack", + "_scripts", "jest", - "src/setupTests.ts", "tslint:latest", "tslint-config-prettier" ] diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 125e217e4b72c9deb47a954ea58cc5b252d9ca5a..0000000000000000000000000000000000000000 --- a/tslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "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 - } -} diff --git a/tslint.yml b/tslint.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3e95faf3a46e91e30c459429ce42771fa23bc2a --- /dev/null +++ b/tslint.yml @@ -0,0 +1,95 @@ +defaultSeverity: error +extends: + - tslint-react + - tslint-eslint-rules + - tslint-config-prettier +jsRules: +rules: + class-name: true + eofline: true + forin: true + jsdoc-format: false + label-position: true + member-ordering: + - true + - order: statics-first + new-parens: true + no-arg: true + no-bitwise: true + no-conditional-assignment: true + no-consecutive-blank-lines: true + no-console: + - true + - debug + - info + - log + - time + - timeEnd + - trace + - warn + no-construct: true + no-debugger: true + no-duplicate-variable: true + no-eval: true + no-internal-module: true + no-multi-spaces: true + no-namespace: true + no-reference: true + no-shadowed-variable: true + no-string-literal: true + no-trailing-whitespace: true + no-unused-expression: true + no-var-keyword: true + one-variable-per-declaration: + - true + - ignore-for-loop + prefer-const: + - true + - destructuring: all + radix: true + space-in-parens: true + switch-default: true + trailing-comma: + - true + - singleline: never + multiline: always + esSpecCompliant: true + triple-equals: + - true + - allow-null-check + typedef-whitespace: + - true + - call-signature: nospace + index-signature: nospace + parameter: nospace + property-declaration: nospace + variable-declaration: nospace + - call-signature: onespace + index-signature: onespace + parameter: onespace + property-declaration: onespace + variable-declaration: onespace + use-isnan: true + variable-name: + - true + - allow-leading-underscore + - ban-keywords + - check-format + - allow-pascal-case + jsx-no-lambda: false + jsx-no-string-ref: false + jsx-boolean-value: + - true + - never + jsx-no-multiline-js: false + whitespace: + - true + - check-branch + - check-decl + - check-operator + - check-module + - check-separator + - check-rest-spread + - check-type + - check-type-operator + - check-preblock diff --git a/typings.d.ts b/typings.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..31596c27cd6d3ab40d0cdb1220dd9de1a238d638 --- /dev/null +++ b/typings.d.ts @@ -0,0 +1,12 @@ +declare module '*.css'; +declare module '*.less'; +declare module '*.scss'; +declare module '*.sass'; +declare module '*.svg'; +declare module '*.png'; +declare module '*.jpg'; +declare module '*.jpeg'; +declare module '*.gif'; +declare module '*.bmp'; +declare module '*.tiff'; +declare var APP_TYPE: string;