@agilebot/eslint-config 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +9 -9
- package/LICENSE.tpl +8 -8
- package/README.md +15 -15
- package/bin/eslint-agilebot +2 -2
- package/dist/cli.js +8 -8
- package/dist/index.d.ts +3 -1
- package/dist/index.js +27 -34
- package/package.json +11 -11
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
|
+
```
|
package/bin/eslint-agilebot
CHANGED
@@ -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.
|
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.11
|
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.d.ts
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
import { Linter } from 'eslint';
|
2
2
|
|
3
|
+
type ESLintConfig = Linter.LegacyConfig;
|
4
|
+
|
3
5
|
interface FactoryOptions {
|
4
6
|
/**
|
5
7
|
* ESLint configuration
|
6
8
|
* @default undefined
|
7
9
|
*/
|
8
|
-
config?: Pick<
|
10
|
+
config?: Pick<ESLintConfig, 'rules' | 'settings'>;
|
9
11
|
/**
|
10
12
|
* List of development dependencies
|
11
13
|
* @default undefined
|
package/dist/index.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.3.
|
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.11
|
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;
|
@@ -59,16 +59,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
59
59
|
));
|
60
60
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
61
61
|
|
62
|
-
// ../../node_modules/.pnpm/tsup@8.1.
|
62
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.40_typescript@5.4.5_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
63
63
|
var init_cjs_shims = __esm({
|
64
|
-
"../../node_modules/.pnpm/tsup@8.1.
|
64
|
+
"../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.40_typescript@5.4.5_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
|
65
65
|
"use strict";
|
66
66
|
}
|
67
67
|
});
|
68
68
|
|
69
|
-
// ../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@
|
69
|
+
// ../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@7_dbttxvpwn6s6gyqfajsab2uz5m/node_modules/eslint-config-love/lib/index.js
|
70
70
|
var require_lib = __commonJS({
|
71
|
-
"../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@
|
71
|
+
"../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@7_dbttxvpwn6s6gyqfajsab2uz5m/node_modules/eslint-config-love/lib/index.js"(exports2, module2) {
|
72
72
|
"use strict";
|
73
73
|
init_cjs_shims();
|
74
74
|
var eslint_1 = require("eslint");
|
@@ -609,28 +609,18 @@ function ts() {
|
|
609
609
|
],
|
610
610
|
// 优先使用interface而不是type
|
611
611
|
"@typescript-eslint/consistent-type-definitions": "error",
|
612
|
-
// The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings.
|
613
|
-
// However, the existing `no-underscore-dangle` rule already takes care of this.
|
614
612
|
"@typescript-eslint/naming-convention": [
|
615
613
|
"error",
|
616
|
-
//
|
614
|
+
// variable规则在@agilebot/var-naming中定义
|
617
615
|
{
|
618
|
-
selector: "
|
619
|
-
format: ["camelCase", "PascalCase"
|
620
|
-
filter: {
|
621
|
-
regex: "^(__dirname|__filename)$",
|
622
|
-
match: false
|
623
|
-
}
|
616
|
+
selector: "function",
|
617
|
+
format: ["camelCase", "PascalCase"]
|
624
618
|
},
|
625
|
-
// Allow camelCase functions (23.2), and PascalCase functions (23.8)
|
626
619
|
{
|
627
|
-
selector: "
|
620
|
+
selector: "variable",
|
621
|
+
types: ["function"],
|
628
622
|
format: ["camelCase", "PascalCase"]
|
629
623
|
},
|
630
|
-
// Airbnb recommends PascalCase for classes (23.3),
|
631
|
-
// and although Airbnb does not make TypeScript recommendations,
|
632
|
-
// we are assuming this rule would similarly apply to anything "type like",
|
633
|
-
// including interfaces, type aliases, and enums
|
634
624
|
{
|
635
625
|
selector: "typeLike",
|
636
626
|
format: ["PascalCase"]
|
@@ -642,12 +632,21 @@ function ts() {
|
|
642
632
|
},
|
643
633
|
{
|
644
634
|
selector: "method",
|
645
|
-
format: ["camelCase"
|
635
|
+
format: ["camelCase"]
|
636
|
+
},
|
637
|
+
{
|
638
|
+
selector: "classProperty",
|
639
|
+
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
640
|
+
leadingUnderscore: "allow"
|
646
641
|
},
|
647
642
|
{
|
648
643
|
selector: "typeProperty",
|
649
644
|
format: ["camelCase"]
|
650
645
|
},
|
646
|
+
{
|
647
|
+
selector: "enum",
|
648
|
+
format: ["PascalCase"]
|
649
|
+
},
|
651
650
|
{
|
652
651
|
selector: "enumMember",
|
653
652
|
format: ["PascalCase", "UPPER_CASE"]
|
@@ -1086,12 +1085,6 @@ function agilebot(opts) {
|
|
1086
1085
|
}
|
1087
1086
|
}
|
1088
1087
|
}
|
1089
|
-
],
|
1090
|
-
"@agilebot/func-naming": [
|
1091
|
-
"error",
|
1092
|
-
{
|
1093
|
-
format: "camelCase"
|
1094
|
-
}
|
1095
1088
|
]
|
1096
1089
|
},
|
1097
1090
|
settings: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.11",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -19,8 +19,8 @@
|
|
19
19
|
"homepage": "https://github.com/sh-agilebot/frontend-toolkit/tree/master/packages/eslint-config#readme",
|
20
20
|
"dependencies": {
|
21
21
|
"@cspell/eslint-plugin": "^8.10.4",
|
22
|
-
"@eslint-react/eslint-plugin": "^1.
|
23
|
-
"@stylistic/eslint-plugin": "^2.
|
22
|
+
"@eslint-react/eslint-plugin": "^1.8.2",
|
23
|
+
"@stylistic/eslint-plugin": "^2.6.1",
|
24
24
|
"@typescript-eslint/eslint-plugin": "~7.16.0",
|
25
25
|
"@typescript-eslint/parser": "~7.16.0",
|
26
26
|
"eslint-config-godaddy": "^6.0.0",
|
@@ -29,29 +29,29 @@
|
|
29
29
|
"eslint-plugin-deprecation": "^3.0.0",
|
30
30
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
31
31
|
"eslint-plugin-file-progress": "^1.4.0",
|
32
|
-
"eslint-plugin-import-x": "^
|
33
|
-
"eslint-plugin-jsdoc": "^48.
|
32
|
+
"eslint-plugin-import-x": "^3.1.0",
|
33
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
34
34
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
35
|
-
"eslint-plugin-n": "^17.
|
35
|
+
"eslint-plugin-n": "^17.10.1",
|
36
36
|
"eslint-plugin-no-relative-import-paths": "^1.5.5",
|
37
37
|
"eslint-plugin-prefer-arrow-functions": "^3.3.2",
|
38
|
-
"eslint-plugin-prettier": "^5.1
|
39
|
-
"eslint-plugin-promise": "^
|
40
|
-
"eslint-plugin-react": "^7.
|
38
|
+
"eslint-plugin-prettier": "^5.2.1",
|
39
|
+
"eslint-plugin-promise": "^7.0.0",
|
40
|
+
"eslint-plugin-react": "^7.35.0",
|
41
41
|
"eslint-plugin-react-hooks": "^4.6.2",
|
42
42
|
"eslint-plugin-unicorn": "^54.0.0",
|
43
43
|
"eslint-plugin-unused-imports": "^3.2.0",
|
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.
|
47
|
+
"@agilebot/eslint-utils": "0.3.11"
|
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.
|
54
|
+
"@agilebot/eslint-plugin": "0.3.11"
|
55
55
|
},
|
56
56
|
"files": [
|
57
57
|
"bin",
|