Skip to content

Commit 333751c

Browse files
author
MZI
committed
上传项目
0 parents  commit 333751c

31 files changed

+16533
-0
lines changed

.babelrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"presets": ["env", "react", "stage-2"],
3+
"plugins": [
4+
["import", {
5+
"libraryName": "antd",
6+
"style": true
7+
}]
8+
]
9+
}

.editorconfig

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.js]
11+
indent_size = 2
12+
indent_style = space
13+
max_line_length = 100
14+
15+
[*.less]
16+
indent_size = 4
17+
indent_style = space
18+
19+
[*.md]
20+
max_line_length = 0
21+
trim_trailing_whitespace = false
22+
23+
[COMMIT_EDITMSG]
24+
max_line_length = 0

.eslintrc.js

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
'use strict';
10+
module.exports = {
11+
root: true,
12+
13+
parser: 'babel-eslint',
14+
15+
plugins: ['import', 'flowtype', 'react'],
16+
17+
env: {
18+
commonjs: true,
19+
es6: true,
20+
jest: true,
21+
node: true,
22+
},
23+
24+
globals: {
25+
document: true,
26+
window: true,
27+
console: true,
28+
navigator: true,
29+
fetch: true
30+
},
31+
32+
parserOptions: {
33+
ecmaVersion: 6,
34+
sourceType: 'module',
35+
ecmaFeatures: {
36+
jsx: true,
37+
generators: true,
38+
experimentalObjectRestSpread: true,
39+
},
40+
},
41+
42+
settings: {
43+
'import/ignore': ['node_modules'],
44+
'import/extensions': ['.js'],
45+
'import/resolver': {
46+
node: {
47+
extensions: ['.js', '.json'],
48+
},
49+
},
50+
},
51+
52+
rules: {
53+
'array-callback-return': 'warn',
54+
'default-case': ['warn', { commentPattern: '^no default$' }],
55+
'dot-location': ['warn', 'property'],
56+
eqeqeq: ['warn', 'allow-null'],
57+
'new-parens': 'warn',
58+
'no-array-constructor': 'warn',
59+
'no-caller': 'warn',
60+
'no-cond-assign': ['warn', 'always'],
61+
'no-const-assign': 'warn',
62+
'no-control-regex': 'warn',
63+
'no-delete-var': 'warn',
64+
'no-dupe-args': 'warn',
65+
'no-dupe-class-members': 'warn',
66+
'no-dupe-keys': 'warn',
67+
'no-duplicate-case': 'warn',
68+
'no-empty-character-class': 'warn',
69+
'no-empty-pattern': 'warn',
70+
'no-eval': 'warn',
71+
'no-ex-assign': 'warn',
72+
'no-extend-native': 'warn',
73+
'no-extra-bind': 'warn',
74+
'no-extra-label': 'warn',
75+
'no-fallthrough': 'warn',
76+
'no-func-assign': 'warn',
77+
'no-implied-eval': 'warn',
78+
'no-invalid-regexp': 'warn',
79+
'no-iterator': 'warn',
80+
'no-label-var': 'warn',
81+
'no-labels': ['warn', { allowLoop: true, allowSwitch: false }],
82+
'no-lone-blocks': 'warn',
83+
'no-loop-func': 'warn',
84+
'no-mixed-operators': [
85+
'warn',
86+
{
87+
groups: [
88+
['&', '|', '^', '~', '<<', '>>', '>>>'],
89+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
90+
['&&', '||'],
91+
['in', 'instanceof'],
92+
],
93+
allowSamePrecedence: false,
94+
},
95+
],
96+
'no-multi-str': 'warn',
97+
'no-native-reassign': 'warn',
98+
'no-negated-in-lhs': 'warn',
99+
'no-new-func': 'warn',
100+
'no-new-object': 'warn',
101+
'no-new-symbol': 'warn',
102+
'no-new-wrappers': 'warn',
103+
'no-obj-calls': 'warn',
104+
'no-octal': 'warn',
105+
'no-octal-escape': 'warn',
106+
'no-redeclare': 'warn',
107+
'no-regex-spaces': 'warn',
108+
'no-restricted-syntax': ['warn', 'WithStatement'],
109+
'no-script-url': 'warn',
110+
'no-self-assign': 'warn',
111+
'no-self-compare': 'warn',
112+
'no-sequences': 'warn',
113+
'no-shadow-restricted-names': 'warn',
114+
'no-sparse-arrays': 'warn',
115+
'no-template-curly-in-string': 'warn',
116+
'no-this-before-super': 'warn',
117+
'no-throw-literal': 'warn',
118+
'no-undef': 'error',
119+
'no-restricted-globals': ['error', 'event'],
120+
'no-unexpected-multiline': 'warn',
121+
'no-unreachable': 'warn',
122+
'no-unused-expressions': [
123+
'warn',
124+
{
125+
allowShortCircuit: true,
126+
allowTernary: true,
127+
},
128+
],
129+
'no-unused-labels': 'warn',
130+
'no-unused-vars': [
131+
'warn',
132+
{
133+
vars: 'local',
134+
varsIgnorePattern: '^_',
135+
args: 'none',
136+
ignoreRestSiblings: true,
137+
},
138+
],
139+
'no-use-before-define': ['warn', 'nofunc'],
140+
'no-useless-computed-key': 'warn',
141+
'no-useless-concat': 'warn',
142+
'no-useless-constructor': 'warn',
143+
'no-useless-escape': 'warn',
144+
'no-useless-rename': [
145+
'warn',
146+
{
147+
ignoreDestructuring: false,
148+
ignoreImport: false,
149+
ignoreExport: false,
150+
},
151+
],
152+
'no-with': 'warn',
153+
'no-whitespace-before-property': 'warn',
154+
'operator-assignment': ['warn', 'always'],
155+
radix: 'warn',
156+
'require-yield': 'warn',
157+
'rest-spread-spacing': ['warn', 'never'],
158+
strict: ['warn', 'never'],
159+
'unicode-bom': ['warn', 'never'],
160+
'use-isnan': 'warn',
161+
'valid-typeof': 'warn',
162+
'no-restricted-properties': [
163+
'error',
164+
{
165+
object: 'require',
166+
property: 'ensure',
167+
message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import',
168+
},
169+
{
170+
object: 'System',
171+
property: 'import',
172+
message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import',
173+
},
174+
],
175+
'import/no-webpack-loader-syntax': 'error',
176+
'react/jsx-equals-spacing': ['warn', 'never'],
177+
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
178+
'react/jsx-no-undef': 'error',
179+
'react/jsx-pascal-case': [
180+
'warn',
181+
{
182+
allowAllCaps: true,
183+
ignore: [],
184+
},
185+
],
186+
'react/jsx-uses-react': 'warn',
187+
'react/jsx-uses-vars': 'warn',
188+
'react/no-danger-with-children': 'warn',
189+
'react/no-deprecated': 'warn',
190+
'react/no-direct-mutation-state': 'warn',
191+
'react/no-is-mounted': 'warn',
192+
'react/react-in-jsx-scope': 'error',
193+
'react/require-render-return': 'warn',
194+
'react/style-prop-object': 'warn',
195+
'flowtype/define-flow-type': 'warn',
196+
'flowtype/require-valid-file-annotation': 'warn',
197+
'flowtype/use-flow-type': 'warn',
198+
},
199+
};

.gitignore

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
dist

0 commit comments

Comments
 (0)