Skip to content

Commit

Permalink
更新各依赖的版本号到最新
Browse files Browse the repository at this point in the history
  • Loading branch information
xcatliu committed Nov 8, 2019
1 parent fc3b816 commit 17a1659
Show file tree
Hide file tree
Showing 100 changed files with 1,072 additions and 425 deletions.
26 changes: 19 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
* Swan <noreply@github.com>
*
* 依赖版本:
* eslint ^6.2.2
* babel-eslint ^10.0.1
* eslint-plugin-react ^7.14.2
* vue-eslint-parser ^5.0.0
* eslint-plugin-vue ^5.2.3
* @typescript-eslint/parser ^2.0.0
* @typescript-eslint/eslint-plugin ^2.0.0
* eslint ^6.6.0
* babel-eslint ^10.0.3
* eslint-plugin-react ^7.16.0
* vue-eslint-parser ^6.0.4
* eslint-plugin-vue ^6.0.0
* @typescript-eslint/parser ^2.6.1
* @typescript-eslint/eslint-plugin ^2.6.1
*
* 此文件是由脚本 scripts/build.ts 自动生成
*
Expand Down Expand Up @@ -89,6 +89,10 @@ module.exports = {
* switch 语句必须有 default
*/
'default-case': 'off',
/**
* 有默认值的参数必须放在函数参数的末尾
*/
'default-param-last': 'off',
/**
* 禁止使用 foo['bar'],必须写成 foo.bar
* @reason 当需要写一系列属性的时候,可以更统一
Expand Down Expand Up @@ -408,6 +412,10 @@ module.exports = {
* 禁止在 setTimeout 或 setInterval 中传入字符串
*/
'no-implied-eval': 'error',
/**
* 禁止对导入的模块进行赋值
*/
'no-import-assign': 'error',
/**
* 禁止在代码后添加单行注释
*/
Expand Down Expand Up @@ -824,6 +832,10 @@ module.exports = {
* Promise 的 reject 中必须传入 Error 对象,而不是字面量
*/
'prefer-promise-reject-errors': 'error',
/**
* 优先使用正则表达式字面量,而不是 RegExp 构造函数
*/
'prefer-regex-literals': 'error',
/**
* 必须使用 ...args 而不是 arguments
*/
Expand Down
608 changes: 353 additions & 255 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 13 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,43 +60,37 @@
"dependencies": {},
"devDependencies": {
"@types/doctrine": "0.0.3",
"@types/eslint": "^6.1.2",
"@types/eslint": "^6.1.3",
"@types/node": "^12.12.3",
"@types/prettier": "^1.16.4",
"@types/react": "^16.8.18",
"@types/react-dom": "^16.8.4",
"@types/react-tooltip": "^3.9.3",
"@types/react-tooltip": "^3.11.0",
"@types/rimraf": "^2.0.2",
"@types/xml-escape": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"babel-eslint": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"babel-eslint": "^10.0.3",
"doctrine": "^3.0.0",
"eslint": "^6.2.2",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-vue": "^5.2.3",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-vue": "^6.0.0",
"husky": "^3.0.4",
"insert-tag": "^0.1.2",
"mobi-plugin-color": "^1.0.0",
"mobi.css": "^3.1.1",
"nodemon": "^1.17.5",
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.3",
"prettier": "^1.17.1",
"prettier": "^1.18.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-tooltip": "^3.10.0",
"react-tooltip": "^3.11.1",
"rimraf": "^3.0.0",
"ts-node": "^7.0.1",
"typescript": "^3.6.2",
"vue-eslint-parser": "^5.0.0",
"typescript": "^3.7.2",
"vue-eslint-parser": "^6.0.4",
"xml-escape": "^1.1.0"
},
"greenkeeper": {
"ignore": [
"ts-node",
"vue-eslint-parser"
]
}
}
30 changes: 15 additions & 15 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
* Swan <noreply@github.com>
*
* 依赖版本:
* eslint ^6.2.2
* babel-eslint ^10.0.1
* eslint-plugin-react ^7.14.2
* vue-eslint-parser ^5.0.0
* eslint-plugin-vue ^5.2.3
* @typescript-eslint/parser ^2.0.0
* @typescript-eslint/eslint-plugin ^2.0.0
* eslint ^6.6.0
* babel-eslint ^10.0.3
* eslint-plugin-react ^7.16.0
* vue-eslint-parser ^6.0.4
* eslint-plugin-vue ^6.0.0
* @typescript-eslint/parser ^2.6.1
* @typescript-eslint/eslint-plugin ^2.6.1
*
* 此文件是由脚本 scripts/build.ts 自动生成
*
Expand All @@ -28,7 +28,7 @@ module.exports = {
rules: {
/**
* 布尔值类型的 propTypes 的 name 必须为 is 或 has 开头
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/boolean-prop-naming': 'off',
/**
Expand All @@ -37,7 +37,7 @@ module.exports = {
'react/button-has-type': 'off',
/**
* 一个 defaultProps 必须有对应的 propTypes
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/default-props-match-prop-types': 'off',
/**
Expand All @@ -63,12 +63,12 @@ module.exports = {
'react/forbid-elements': 'off',
/**
* 禁止使用另一个组件的 propTypes
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/forbid-foreign-prop-types': 'off',
/**
* 禁止使用 PropTypes.any PropTypes.array 和 PropTypes.object
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/forbid-prop-types': 'off',
/**
Expand Down Expand Up @@ -247,7 +247,7 @@ module.exports = {
],
/**
* 禁止出现未使用的 propTypes
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/no-unused-prop-types': 'off',
/**
Expand All @@ -274,7 +274,7 @@ module.exports = {
'react/prefer-stateless-function': 'off',
/**
* 组件必须写 propTypes
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/prop-types': 'off',
/**
Expand All @@ -284,7 +284,7 @@ module.exports = {
'react/react-in-jsx-scope': 'off',
/**
* 非 required 的 prop 必须有 defaultProps
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/require-default-props': 'off',
/**
Expand All @@ -305,7 +305,7 @@ module.exports = {
'react/sort-comp': 'error',
/**
* propTypes 的属性必须按照字母排序
* @reason 不强制要求写 propTypes
* @reason 类型相关的约束交给 TypeScript
*/
'react/sort-prop-types': 'off',
/**
Expand Down
10 changes: 3 additions & 7 deletions site/components/RuleTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface RuleTableProps {
const configMap: {
[key in RuleNamespaces]: {
[key: string]: Rule;
}
};
} = {
index: require('../config/index.json'),
react: require('../config/react.json'),
Expand Down Expand Up @@ -102,9 +102,7 @@ export const RuleTable: React.SFC<RuleTableProps> = ({ namespace, shouldHideOff
<div className="unit-1-3 unit-1-on-mobile">
{badExample && (
<pre
className={`language-${
RuleNamespacePrismLanguageMap[namespace]
} site-code`}
className={`language-${RuleNamespacePrismLanguageMap[namespace]} site-code`}
>
<code
dangerouslySetInnerHTML={{
Expand All @@ -117,9 +115,7 @@ export const RuleTable: React.SFC<RuleTableProps> = ({ namespace, shouldHideOff
<div className="unit-1-3 unit-1-on-mobile">
{goodExample && (
<pre
className={`language-${
RuleNamespacePrismLanguageMap[namespace]
} site-code`}
className={`language-${RuleNamespacePrismLanguageMap[namespace]} site-code`}
>
<code
dangerouslySetInnerHTML={{
Expand Down
Loading

0 comments on commit 17a1659

Please sign in to comment.