Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
erguotou520 committed Dec 11, 2020
1 parent 32eac19 commit 86ad2e1
Show file tree
Hide file tree
Showing 28 changed files with 12,744 additions and 16,637 deletions.
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/Users/erguotou/workspace/turing/translate-app/src/index.tsx":"1","/Users/erguotou/workspace/turing/translate-app/src/App.tsx":"2","/Users/erguotou/workspace/turing/translate-app/src/components/EditableTranslate.tsx":"3","/Users/erguotou/workspace/turing/translate-app/src/components/FixedFooter.tsx":"4","/Users/erguotou/workspace/turing/translate-app/src/provider/data.tsx":"5","/Users/erguotou/workspace/turing/translate-app/src/configs/constants.ts":"6","/Users/erguotou/workspace/turing/translate-app/src/components/MainContent.tsx":"7","/Users/erguotou/workspace/turing/translate-app/src/layout/DefaultLayout.tsx":"8","/Users/erguotou/workspace/turing/translate-app/src/utils/zip.ts":"9"},{"size":287,"mtime":1607681157879,"results":"10","hashOfConfig":"11"},{"size":672,"mtime":1607681431813,"results":"12","hashOfConfig":"11"},{"size":742,"mtime":1607673591807,"results":"13","hashOfConfig":"11"},{"size":2269,"mtime":1607682694047,"results":"14","hashOfConfig":"11"},{"size":1588,"mtime":1607682590159,"results":"15","hashOfConfig":"11"},{"size":30,"mtime":1607677713990,"results":"16","hashOfConfig":"11"},{"size":4912,"mtime":1607681830014,"results":"17","hashOfConfig":"11"},{"size":430,"mtime":1607681386382,"results":"18","hashOfConfig":"11"},{"size":1779,"mtime":1607682393949,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ufsjeh",{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/erguotou/workspace/turing/translate-app/src/index.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/App.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/components/EditableTranslate.tsx",[],["39","40"],"/Users/erguotou/workspace/turing/translate-app/src/components/FixedFooter.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/provider/data.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/configs/constants.ts",[],"/Users/erguotou/workspace/turing/translate-app/src/components/MainContent.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/layout/DefaultLayout.tsx",[],"/Users/erguotou/workspace/turing/translate-app/src/utils/zip.ts",[],{"ruleId":"41","replacedBy":"42"},{"ruleId":"43","replacedBy":"44"},"no-native-reassign",["45"],"no-negated-in-lhs",["46"],"no-global-assign","no-unsafe-negation"]
55 changes: 55 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'use strict'

module.exports = {
// 一行最多 80 字符
printWidth: 80,
// 使用 2 个空格缩进
tabWidth: 2,
// 不使用缩进符,而使用空格
useTabs: false,
// 行尾不要有分号
semi: false,
// 使用单引号
singleQuote: true,
// 对象的 key 仅在必要时用引号
quoteProps: 'as-needed',
// jsx 不使用单引号,而使用双引号
jsxSingleQuote: false,
// 末尾不需要逗号
trailingComma: 'none',
// 大括号内的首尾需要空格
bracketSpacing: true,
// jsx 标签的反尖括号需要换行
jsxBracketSameLine: false,
// 箭头函数,避免使用括号
arrowParens: 'avoid',
// 每个文件格式化的范围是文件的全部内容
rangeStart: 0,
rangeEnd: Infinity,
// 不需要写文件开头的 @prettier
requirePragma: false,
// 不需要自动在文件开头插入 @prettier
insertPragma: false,
// 使用默认的折行标准
proseWrap: 'preserve',
// 根据显示样式决定 html 要不要折行
htmlWhitespaceSensitivity: 'css',
// 换行符使用 lf
endOfLine: 'auto',
// 格式化嵌入的内容
embeddedLanguageFormatting: 'auto',
overrides: [
{
files: '.prettierrc',
options: {
parser: 'json'
}
},
{
files: 'document.ejs',
options: {
parser: 'html'
}
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
37 changes: 37 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const CracoLessPlugin = require('craco-less')

module.exports = {
babel: {
plugins: [
[
'import',
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true //设置为true即是less
}
]
]
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: { '@primary-color': '#399' },
javascriptEnabled: true
}
}
}
}
],
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
Loading

0 comments on commit 86ad2e1

Please sign in to comment.