@agilebot/eslint-config 0.3.7 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE CHANGED
@@ -1,9 +1,9 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2024 Agilebot, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Agilebot, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/LICENSE.tpl CHANGED
@@ -1,8 +1,8 @@
1
- /**
2
- * @license %(name)s v%(version)s
3
- *
4
- * Copyright (c) Agilebot, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
1
+ /**
2
+ * @license %(name)s v%(version)s
3
+ *
4
+ * Copyright (c) Agilebot, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # @agilebot/eslint-config
2
-
3
- ### Usage
4
-
5
- ```bash
6
- npm install --save-dev eslint \
7
- @agilebot/eslint-config
8
- ```
9
-
10
- ```js
11
- // .eslintrc.js
12
- const { agilebot } = require('@agilebot/eslint-config');
13
-
14
- module.exports = agilebot(__dirname);
15
- ```
1
+ # @agilebot/eslint-config
2
+
3
+ ### Usage
4
+
5
+ ```bash
6
+ npm install --save-dev eslint \
7
+ @agilebot/eslint-config
8
+ ```
9
+
10
+ ```js
11
+ // .eslintrc.js
12
+ const { agilebot } = require('@agilebot/eslint-config');
13
+
14
+ module.exports = agilebot(__dirname);
15
+ ```
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- require('../dist/cli').cli();
1
+ #!/usr/bin/env node
2
+ require('../dist/cli').cli();
package/dist/cli.js CHANGED
@@ -1,11 +1,11 @@
1
- /**
2
- * @license @agilebot/eslint-config v0.3.7
3
- *
4
- * Copyright (c) Agilebot, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
1
+ /**
2
+ * @license @agilebot/eslint-config v0.3.9
3
+ *
4
+ * Copyright (c) Agilebot, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
9
 
10
10
  "use strict";
11
11
  var __create = Object.create;
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- /**
2
- * @license @agilebot/eslint-config v0.3.7
3
- *
4
- * Copyright (c) Agilebot, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
1
+ /**
2
+ * @license @agilebot/eslint-config v0.3.9
3
+ *
4
+ * Copyright (c) Agilebot, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
9
 
10
10
  "use strict";
11
11
  var __create = Object.create;
@@ -843,10 +843,11 @@ function react(opts) {
843
843
  "react/require-render-return": "error",
844
844
  // recommended rules from @eslint-react
845
845
  "@eslint-react/no-direct-mutation-state": "error",
846
- "@eslint-react/no-children-count": "warn",
847
- "@eslint-react/no-children-for-each": "warn",
848
- "@eslint-react/no-children-map": "warn",
849
- "@eslint-react/no-children-only": "warn",
846
+ // Children API
847
+ // '@eslint-react/no-children-count': 'warn',
848
+ // '@eslint-react/no-children-for-each': 'warn',
849
+ // '@eslint-react/no-children-map': 'warn',
850
+ // '@eslint-react/no-children-only': 'warn',
850
851
  "@eslint-react/no-children-prop": "error",
851
852
  "@eslint-react/no-children-to-array": "warn",
852
853
  "@eslint-react/no-clone-element": "warn",
@@ -886,6 +887,9 @@ function react(opts) {
886
887
  "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
887
888
  // recommended rules react-hooks
888
889
  "react-hooks/rules-of-hooks": "error",
890
+ // recommended rules from @eslint-react/naming-convention
891
+ "@eslint-react/naming-convention/component-name": "error",
892
+ "@eslint-react/naming-convention/use-state": "error",
889
893
  // 以下是自定义规则
890
894
  "react/jsx-handler-names": [
891
895
  "error",
@@ -895,15 +899,6 @@ function react(opts) {
895
899
  checkLocalVariables: true
896
900
  }
897
901
  ],
898
- // useState必须以[example, setExample]命名
899
- "react/hook-use-state": "error",
900
- // 组件命名符合帕斯卡
901
- "react/jsx-pascal-case": [
902
- "error",
903
- {
904
- allowNamespace: true
905
- }
906
- ],
907
902
  // 已经有ts校验,此规则没有必要,会与带静态属性的Functional Component冲突
908
903
  "react/prop-types": "off",
909
904
  // <App prop={'Hello'} />没必要,使用<App prop="Hello" />
@@ -1060,6 +1055,12 @@ function agilebot(opts) {
1060
1055
  }
1061
1056
  }
1062
1057
  }
1058
+ ],
1059
+ "@agilebot/func-naming": [
1060
+ "error",
1061
+ {
1062
+ format: "camelCase"
1063
+ }
1063
1064
  ]
1064
1065
  },
1065
1066
  settings: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-config",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Agilebot's ESLint config",
5
5
  "bin": {
6
6
  "eslint-agilebot": "bin/eslint-agilebot"
@@ -44,14 +44,14 @@
44
44
  "eslint-plugin-vue": "^9.26.0",
45
45
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.13.0",
46
46
  "vue-eslint-parser": "^9.4.2",
47
- "@agilebot/eslint-utils": "0.3.7"
47
+ "@agilebot/eslint-utils": "0.3.9"
48
48
  },
49
49
  "devDependencies": {
50
50
  "eslint-config-love": "^47.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "eslint": "^7.0.0 || ^8.0.0",
54
- "@agilebot/eslint-plugin": "0.3.7"
54
+ "@agilebot/eslint-plugin": "0.3.9"
55
55
  },
56
56
  "files": [
57
57
  "bin",