Skip to content

Commit

Permalink
Merge pull request #17 from weishaodaren/defaultProps
Browse files Browse the repository at this point in the history
disable defaultProps in SFC
  • Loading branch information
weishaodaren authored Feb 2, 2023
2 parents aef3505 + d37bcf3 commit b31e2a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-polaris",
"version": "1.3.1",
"version": "2.0.0",
"description": "极星代码规范 ⭐️",
"main": "index.js",
"publishConfig": {
Expand Down
8 changes: 4 additions & 4 deletions rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ module.exports = {
rules: {
// 关闭展示displayName
"react/display-name": 0,
// 强制使用默认值
"react/require-default-props": 2,
// 强制使用与默认类型相同的默认值
"react/default-props-match-prop-types": 2,
// 关闭强制使用默认值
"react/require-default-props": 0,
// 关闭使用与默认类型相同的默认值(同上 SFC不使用defaultProps 推荐ES6默认参数)
"react/default-props-match-prop-types": 0,
// 强制函数组件命名使用箭头函数
"react/function-component-definition": [
2,
Expand Down

0 comments on commit b31e2a0

Please sign in to comment.