@agilebot/eslint-config 0.7.0-beta.2 → 0.7.0
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/bin/eslint-agilebot +2 -2
- package/dist/{chunk-6UXOQCYC.mjs → chunk-LC56YWFZ.mjs} +8 -8
- package/dist/cli.js +8 -8
- package/dist/cli.mjs +9 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -24
- package/dist/index.mjs +29 -25
- package/package.json +5 -6
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/bin/eslint-agilebot
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
require('../dist/cli');
|
1
|
+
#!/usr/bin/env node
|
2
|
+
require('../dist/cli');
|
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.0
|
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.7.0
|
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
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
11
11
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
package/dist/cli.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.0
|
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.7.0
|
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/cli.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.0
|
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.7.0
|
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
|
import {
|
11
11
|
CLI_NAME,
|
12
12
|
__require
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-LC56YWFZ.mjs";
|
14
14
|
|
15
15
|
// src/cli/index.ts
|
16
16
|
import { isCI } from "@agilebot/eslint-utils";
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.0
|
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.7.0
|
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;
|
@@ -637,7 +637,6 @@ function react(opts) {
|
|
637
637
|
checkLocalVariables: true
|
638
638
|
}
|
639
639
|
],
|
640
|
-
"react/no-unused-prop-types": "error",
|
641
640
|
// Stylistic rules are not supported by @eslint-react. Use dprint or @stylistic instead.
|
642
641
|
"@stylistic/jsx-self-closing-comp": "error",
|
643
642
|
// <App prop={'Hello'} />没必要,使用<App prop="Hello" />
|
@@ -1027,7 +1026,7 @@ function factory(root, options) {
|
|
1027
1026
|
...defaultOptions,
|
1028
1027
|
...options
|
1029
1028
|
};
|
1030
|
-
if (options
|
1029
|
+
if (options.config) {
|
1031
1030
|
import_node_assert.default.ok(
|
1032
1031
|
Object.keys(options.config).every(
|
1033
1032
|
(key) => key === "rules" || key === "settings"
|
@@ -1037,7 +1036,7 @@ function factory(root, options) {
|
|
1037
1036
|
}
|
1038
1037
|
const commonConfigs = [
|
1039
1038
|
unicorn({
|
1040
|
-
module: options
|
1039
|
+
module: options.module ?? false
|
1041
1040
|
}),
|
1042
1041
|
comments()
|
1043
1042
|
];
|
@@ -1045,10 +1044,10 @@ function factory(root, options) {
|
|
1045
1044
|
commonConfigs.push(
|
1046
1045
|
imports({
|
1047
1046
|
packageDir: root,
|
1048
|
-
devDependencies: options
|
1049
|
-
monorepoScope: options
|
1050
|
-
coreModules: options
|
1051
|
-
resolver: options
|
1047
|
+
devDependencies: options.devDependencies,
|
1048
|
+
monorepoScope: options.monorepoScope,
|
1049
|
+
coreModules: options.coreModules,
|
1050
|
+
resolver: options.importResolver
|
1052
1051
|
})
|
1053
1052
|
);
|
1054
1053
|
}
|
@@ -1077,9 +1076,6 @@ function factory(root, options) {
|
|
1077
1076
|
}
|
1078
1077
|
config.push(...commonConfigs);
|
1079
1078
|
config.push(godaddy());
|
1080
|
-
if (options.config) {
|
1081
|
-
config.push(options.config);
|
1082
|
-
}
|
1083
1079
|
} else {
|
1084
1080
|
config.push({
|
1085
1081
|
name: "agilebot/parser",
|
@@ -1095,7 +1091,7 @@ function factory(root, options) {
|
|
1095
1091
|
jsx: true
|
1096
1092
|
},
|
1097
1093
|
sourceType: options.module ? "module" : void 0,
|
1098
|
-
extraFileExtensions: !options
|
1094
|
+
extraFileExtensions: !options.vue ? void 0 : [".vue"]
|
1099
1095
|
}
|
1100
1096
|
}
|
1101
1097
|
});
|
@@ -1140,12 +1136,16 @@ function factory(root, options) {
|
|
1140
1136
|
config.push(
|
1141
1137
|
agilebot({
|
1142
1138
|
root,
|
1143
|
-
monorepoScope: options
|
1139
|
+
monorepoScope: options.monorepoScope
|
1144
1140
|
})
|
1145
1141
|
);
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1142
|
+
}
|
1143
|
+
if (options.config) {
|
1144
|
+
config.push({
|
1145
|
+
name: "agilebot/custom",
|
1146
|
+
files: DEFAULT_GLOBS,
|
1147
|
+
...options.config
|
1148
|
+
});
|
1149
1149
|
}
|
1150
1150
|
config.push({
|
1151
1151
|
name: "agilebot/ignores",
|
@@ -1158,7 +1158,11 @@ function factory(root, options) {
|
|
1158
1158
|
delete configItem.plugins;
|
1159
1159
|
}
|
1160
1160
|
});
|
1161
|
-
config
|
1161
|
+
config.unshift({
|
1162
|
+
name: "agilebot/plugins",
|
1163
|
+
files: DEFAULT_GLOBS,
|
1164
|
+
plugins: allPlugins
|
1165
|
+
});
|
1162
1166
|
return config;
|
1163
1167
|
}
|
1164
1168
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.0
|
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.7.0
|
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
|
import {
|
11
11
|
DEFAULT_GLOBS,
|
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
VUE_GLOBS,
|
17
17
|
__dirname,
|
18
18
|
define_STANDARD_RULES_default
|
19
|
-
} from "./chunk-
|
19
|
+
} from "./chunk-LC56YWFZ.mjs";
|
20
20
|
|
21
21
|
// src/factory/index.ts
|
22
22
|
import assert from "node:assert";
|
@@ -562,7 +562,6 @@ function react(opts) {
|
|
562
562
|
checkLocalVariables: true
|
563
563
|
}
|
564
564
|
],
|
565
|
-
"react/no-unused-prop-types": "error",
|
566
565
|
// Stylistic rules are not supported by @eslint-react. Use dprint or @stylistic instead.
|
567
566
|
"@stylistic/jsx-self-closing-comp": "error",
|
568
567
|
// <App prop={'Hello'} />没必要,使用<App prop="Hello" />
|
@@ -950,7 +949,7 @@ function factory(root, options) {
|
|
950
949
|
...defaultOptions,
|
951
950
|
...options
|
952
951
|
};
|
953
|
-
if (options
|
952
|
+
if (options.config) {
|
954
953
|
assert.ok(
|
955
954
|
Object.keys(options.config).every(
|
956
955
|
(key) => key === "rules" || key === "settings"
|
@@ -960,7 +959,7 @@ function factory(root, options) {
|
|
960
959
|
}
|
961
960
|
const commonConfigs = [
|
962
961
|
unicorn({
|
963
|
-
module: options
|
962
|
+
module: options.module ?? false
|
964
963
|
}),
|
965
964
|
comments()
|
966
965
|
];
|
@@ -968,10 +967,10 @@ function factory(root, options) {
|
|
968
967
|
commonConfigs.push(
|
969
968
|
imports({
|
970
969
|
packageDir: root,
|
971
|
-
devDependencies: options
|
972
|
-
monorepoScope: options
|
973
|
-
coreModules: options
|
974
|
-
resolver: options
|
970
|
+
devDependencies: options.devDependencies,
|
971
|
+
monorepoScope: options.monorepoScope,
|
972
|
+
coreModules: options.coreModules,
|
973
|
+
resolver: options.importResolver
|
975
974
|
})
|
976
975
|
);
|
977
976
|
}
|
@@ -1000,9 +999,6 @@ function factory(root, options) {
|
|
1000
999
|
}
|
1001
1000
|
config.push(...commonConfigs);
|
1002
1001
|
config.push(godaddy());
|
1003
|
-
if (options.config) {
|
1004
|
-
config.push(options.config);
|
1005
|
-
}
|
1006
1002
|
} else {
|
1007
1003
|
config.push({
|
1008
1004
|
name: "agilebot/parser",
|
@@ -1018,7 +1014,7 @@ function factory(root, options) {
|
|
1018
1014
|
jsx: true
|
1019
1015
|
},
|
1020
1016
|
sourceType: options.module ? "module" : void 0,
|
1021
|
-
extraFileExtensions: !options
|
1017
|
+
extraFileExtensions: !options.vue ? void 0 : [".vue"]
|
1022
1018
|
}
|
1023
1019
|
}
|
1024
1020
|
});
|
@@ -1063,12 +1059,16 @@ function factory(root, options) {
|
|
1063
1059
|
config.push(
|
1064
1060
|
agilebot({
|
1065
1061
|
root,
|
1066
|
-
monorepoScope: options
|
1062
|
+
monorepoScope: options.monorepoScope
|
1067
1063
|
})
|
1068
1064
|
);
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1065
|
+
}
|
1066
|
+
if (options.config) {
|
1067
|
+
config.push({
|
1068
|
+
name: "agilebot/custom",
|
1069
|
+
files: DEFAULT_GLOBS,
|
1070
|
+
...options.config
|
1071
|
+
});
|
1072
1072
|
}
|
1073
1073
|
config.push({
|
1074
1074
|
name: "agilebot/ignores",
|
@@ -1081,7 +1081,11 @@ function factory(root, options) {
|
|
1081
1081
|
delete configItem.plugins;
|
1082
1082
|
}
|
1083
1083
|
});
|
1084
|
-
config
|
1084
|
+
config.unshift({
|
1085
|
+
name: "agilebot/plugins",
|
1086
|
+
files: DEFAULT_GLOBS,
|
1087
|
+
plugins: allPlugins
|
1088
|
+
});
|
1085
1089
|
return config;
|
1086
1090
|
}
|
1087
1091
|
export {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.7.0
|
3
|
+
"version": "0.7.0",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -28,18 +28,17 @@
|
|
28
28
|
"dependencies": {
|
29
29
|
"@cspell/eslint-plugin": "^8.16.0",
|
30
30
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
31
|
-
"@eslint-react/eslint-plugin": "^1.
|
31
|
+
"@eslint-react/eslint-plugin": "^1.17.1",
|
32
32
|
"@eslint/js": "^9.15.0",
|
33
33
|
"@stylistic/eslint-plugin": "^2.11.0",
|
34
34
|
"@typescript-eslint/eslint-plugin": "~8.15.0",
|
35
35
|
"@typescript-eslint/parser": "~8.15.0",
|
36
|
-
"add": "^2.0.6",
|
37
36
|
"eslint-config-godaddy": "^6.0.0",
|
38
37
|
"eslint-config-prettier": "^9.1.0",
|
39
38
|
"eslint-import-resolver-oxc": "^0.4.0",
|
40
39
|
"eslint-import-resolver-typescript": "^3.6.3",
|
41
40
|
"eslint-plugin-file-progress": "^1.5.0",
|
42
|
-
"eslint-plugin-import-x": "^4.4.
|
41
|
+
"eslint-plugin-import-x": "^4.4.3",
|
43
42
|
"eslint-plugin-jsdoc": "^50.5.0",
|
44
43
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
45
44
|
"eslint-plugin-mocha": "^10.5.0",
|
@@ -59,7 +58,7 @@
|
|
59
58
|
"picocolors": "^1.1.0",
|
60
59
|
"vue-eslint-parser": "^9.4.3",
|
61
60
|
"yargs": "^17.7.2",
|
62
|
-
"@agilebot/eslint-utils": "0.7.0
|
61
|
+
"@agilebot/eslint-utils": "0.7.0"
|
63
62
|
},
|
64
63
|
"devDependencies": {
|
65
64
|
"@types/yargs": "^17.0.33",
|
@@ -67,7 +66,7 @@
|
|
67
66
|
},
|
68
67
|
"peerDependencies": {
|
69
68
|
"eslint": "^8.57.0 || ^9.0.0",
|
70
|
-
"@agilebot/eslint-plugin": "0.7.0
|
69
|
+
"@agilebot/eslint-plugin": "0.7.0"
|
71
70
|
},
|
72
71
|
"files": [
|
73
72
|
"bin",
|