@agilebot/eslint-config 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CGJVNMKG.mjs → chunk-F5MZBDNJ.mjs} +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +63 -32
- package/dist/index.mjs +64 -33
- package/package.json +5 -5
package/dist/cli.js
CHANGED
package/dist/cli.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -10,7 +10,7 @@
|
|
10
10
|
import {
|
11
11
|
CLI_NAME,
|
12
12
|
__require
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-F5MZBDNJ.mjs";
|
14
14
|
|
15
15
|
// src/cli/index.ts
|
16
16
|
import { isCI } from "@agilebot/eslint-utils";
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Linter } from 'eslint';
|
2
|
+
import { Options as Options$2 } from 'prettier';
|
2
3
|
import { Options as Options$1 } from '@cspell/eslint-plugin';
|
3
4
|
|
4
5
|
interface FlatConfigItem extends Linter.Config {
|
@@ -64,7 +65,7 @@ interface FactoryOptions {
|
|
64
65
|
* Enable Prettier for code formatting
|
65
66
|
* @default true
|
66
67
|
*/
|
67
|
-
prettier?: boolean;
|
68
|
+
prettier?: boolean | Options$2;
|
68
69
|
/**
|
69
70
|
* Enable Lodash-specific linting rules
|
70
71
|
* @default true
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Linter } from 'eslint';
|
2
|
+
import { Options as Options$2 } from 'prettier';
|
2
3
|
import { Options as Options$1 } from '@cspell/eslint-plugin';
|
3
4
|
|
4
5
|
interface FlatConfigItem extends Linter.Config {
|
@@ -64,7 +65,7 @@ interface FactoryOptions {
|
|
64
65
|
* Enable Prettier for code formatting
|
65
66
|
* @default true
|
66
67
|
*/
|
67
|
-
prettier?: boolean;
|
68
|
+
prettier?: boolean | Options$2;
|
68
69
|
/**
|
69
70
|
* Enable Lodash-specific linting rules
|
70
71
|
* @default true
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -476,7 +476,7 @@ function imports(opts) {
|
|
476
476
|
position: "after"
|
477
477
|
}
|
478
478
|
],
|
479
|
-
"newlines-between": "
|
479
|
+
"newlines-between": "always",
|
480
480
|
distinctGroup: false
|
481
481
|
}
|
482
482
|
],
|
@@ -942,7 +942,21 @@ function agilebot(opts) {
|
|
942
942
|
// src/configs/prettier.ts
|
943
943
|
var import_recommended = __toESM(require("eslint-plugin-prettier/recommended"));
|
944
944
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"));
|
945
|
-
|
945
|
+
|
946
|
+
// ../prettier-config/dist/index.mjs
|
947
|
+
var config = {
|
948
|
+
tabWidth: 2,
|
949
|
+
singleQuote: true,
|
950
|
+
trailingComma: "none",
|
951
|
+
bracketSpacing: true,
|
952
|
+
bracketSameLine: true,
|
953
|
+
useTabs: false,
|
954
|
+
arrowParens: "avoid"
|
955
|
+
};
|
956
|
+
var src_default = config;
|
957
|
+
|
958
|
+
// src/configs/prettier.ts
|
959
|
+
function prettier(opts) {
|
946
960
|
return {
|
947
961
|
name: "agilebot/prettier",
|
948
962
|
files: DEFAULT_GLOBS,
|
@@ -958,7 +972,12 @@ function prettier() {
|
|
958
972
|
"prettier/prettier": [
|
959
973
|
"error",
|
960
974
|
{
|
961
|
-
endOfLine: "auto"
|
975
|
+
endOfLine: "auto",
|
976
|
+
...src_default,
|
977
|
+
...opts
|
978
|
+
},
|
979
|
+
{
|
980
|
+
usePrettierrc: !opts
|
962
981
|
}
|
963
982
|
]
|
964
983
|
}
|
@@ -1062,11 +1081,15 @@ function factory(root, options) {
|
|
1062
1081
|
);
|
1063
1082
|
}
|
1064
1083
|
if (options.prettier) {
|
1065
|
-
commonConfigs.push(
|
1084
|
+
commonConfigs.push(
|
1085
|
+
prettier(
|
1086
|
+
typeof options.prettier === "object" ? options.prettier : void 0
|
1087
|
+
)
|
1088
|
+
);
|
1066
1089
|
}
|
1067
|
-
const
|
1090
|
+
const config2 = [];
|
1068
1091
|
if (options.godaddy) {
|
1069
|
-
|
1092
|
+
config2.push({
|
1070
1093
|
name: "agilebot/parser",
|
1071
1094
|
files: DEFAULT_GLOBS,
|
1072
1095
|
languageOptions: {
|
@@ -1076,18 +1099,18 @@ function factory(root, options) {
|
|
1076
1099
|
}
|
1077
1100
|
}
|
1078
1101
|
});
|
1079
|
-
|
1102
|
+
config2.push(env());
|
1080
1103
|
if (options.jsdoc) {
|
1081
|
-
|
1104
|
+
config2.push(
|
1082
1105
|
jsdoc({
|
1083
1106
|
ts: false
|
1084
1107
|
})
|
1085
1108
|
);
|
1086
1109
|
}
|
1087
|
-
|
1088
|
-
|
1110
|
+
config2.push(...commonConfigs);
|
1111
|
+
config2.push(godaddy());
|
1089
1112
|
} else {
|
1090
|
-
|
1113
|
+
config2.push({
|
1091
1114
|
name: "agilebot/parser",
|
1092
1115
|
files: DEFAULT_GLOBS,
|
1093
1116
|
languageOptions: {
|
@@ -1105,45 +1128,45 @@ function factory(root, options) {
|
|
1105
1128
|
}
|
1106
1129
|
}
|
1107
1130
|
});
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1131
|
+
config2.push(env());
|
1132
|
+
config2.push(standard());
|
1133
|
+
config2.push(ts());
|
1134
|
+
config2.push(jsOnly());
|
1135
|
+
config2.push(dts());
|
1136
|
+
config2.push(tsOnly());
|
1114
1137
|
if (options.react) {
|
1115
|
-
|
1116
|
-
|
1138
|
+
config2.push(react({ version: options.react }));
|
1139
|
+
config2.push(reactJsOnly());
|
1117
1140
|
}
|
1118
1141
|
if (options.vue) {
|
1119
|
-
|
1142
|
+
config2.push(
|
1120
1143
|
vue({
|
1121
1144
|
version: options.vue
|
1122
1145
|
})
|
1123
1146
|
);
|
1124
1147
|
}
|
1125
1148
|
if (options.lodash) {
|
1126
|
-
|
1149
|
+
config2.push(lodash());
|
1127
1150
|
}
|
1128
1151
|
if (options.cspell) {
|
1129
|
-
|
1152
|
+
config2.push(cspell(options.cspell));
|
1130
1153
|
}
|
1131
1154
|
if (options.jsdoc) {
|
1132
|
-
|
1155
|
+
config2.push({
|
1133
1156
|
...jsdoc({
|
1134
1157
|
ts: true
|
1135
1158
|
}),
|
1136
1159
|
files: TS_GLOBS
|
1137
1160
|
});
|
1138
|
-
|
1161
|
+
config2.push({
|
1139
1162
|
...jsdoc({
|
1140
1163
|
ts: false
|
1141
1164
|
}),
|
1142
1165
|
files: JS_GLOBS
|
1143
1166
|
});
|
1144
1167
|
}
|
1145
|
-
|
1146
|
-
|
1168
|
+
config2.push(...commonConfigs);
|
1169
|
+
config2.push(
|
1147
1170
|
agilebot({
|
1148
1171
|
root: rootDir,
|
1149
1172
|
monorepoScope: options.monorepoScope
|
@@ -1151,31 +1174,39 @@ function factory(root, options) {
|
|
1151
1174
|
);
|
1152
1175
|
}
|
1153
1176
|
if (options.config) {
|
1154
|
-
|
1177
|
+
config2.push({
|
1155
1178
|
name: "agilebot/custom",
|
1156
1179
|
files: DEFAULT_GLOBS,
|
1157
1180
|
...options.config
|
1158
1181
|
});
|
1159
1182
|
}
|
1160
|
-
|
1183
|
+
config2.push({
|
1161
1184
|
name: "agilebot/ignores",
|
1162
1185
|
ignores: [...IGNORE_GLOBS, ...options.ignores ?? []]
|
1163
1186
|
});
|
1164
1187
|
const allPlugins = {};
|
1165
|
-
|
1188
|
+
config2.forEach((configItem) => {
|
1166
1189
|
if (configItem.plugins) {
|
1167
1190
|
Object.assign(allPlugins, configItem.plugins);
|
1168
1191
|
delete configItem.plugins;
|
1169
1192
|
}
|
1170
1193
|
});
|
1171
|
-
|
1194
|
+
config2.unshift({
|
1172
1195
|
name: "agilebot/plugins",
|
1173
1196
|
files: DEFAULT_GLOBS,
|
1174
1197
|
plugins: allPlugins
|
1175
1198
|
});
|
1176
|
-
return
|
1199
|
+
return config2;
|
1177
1200
|
}
|
1178
1201
|
// Annotate the CommonJS export names for ESM import in node:
|
1179
1202
|
0 && (module.exports = {
|
1180
1203
|
agilebot
|
1181
1204
|
});
|
1205
|
+
/**
|
1206
|
+
* @license @agilebot/prettier-config v0.7.4
|
1207
|
+
*
|
1208
|
+
* Copyright (c) Agilebot, Inc. and its affiliates.
|
1209
|
+
*
|
1210
|
+
* This source code is licensed under the MIT license found in the
|
1211
|
+
* LICENSE file in the root directory of this source tree.
|
1212
|
+
*/
|
package/dist/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.7.
|
2
|
+
* @license @agilebot/eslint-config v0.7.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
VUE_GLOBS,
|
17
17
|
__dirname,
|
18
18
|
define_STANDARD_RULES_default
|
19
|
-
} from "./chunk-
|
19
|
+
} from "./chunk-F5MZBDNJ.mjs";
|
20
20
|
|
21
21
|
// src/factory/index.ts
|
22
22
|
import assert from "node:assert";
|
@@ -401,7 +401,7 @@ function imports(opts) {
|
|
401
401
|
position: "after"
|
402
402
|
}
|
403
403
|
],
|
404
|
-
"newlines-between": "
|
404
|
+
"newlines-between": "always",
|
405
405
|
distinctGroup: false
|
406
406
|
}
|
407
407
|
],
|
@@ -865,7 +865,21 @@ function agilebot(opts) {
|
|
865
865
|
// src/configs/prettier.ts
|
866
866
|
import prettierRecommended from "eslint-plugin-prettier/recommended";
|
867
867
|
import pluginPrettier from "eslint-plugin-prettier";
|
868
|
-
|
868
|
+
|
869
|
+
// ../prettier-config/dist/index.mjs
|
870
|
+
var config = {
|
871
|
+
tabWidth: 2,
|
872
|
+
singleQuote: true,
|
873
|
+
trailingComma: "none",
|
874
|
+
bracketSpacing: true,
|
875
|
+
bracketSameLine: true,
|
876
|
+
useTabs: false,
|
877
|
+
arrowParens: "avoid"
|
878
|
+
};
|
879
|
+
var src_default = config;
|
880
|
+
|
881
|
+
// src/configs/prettier.ts
|
882
|
+
function prettier(opts) {
|
869
883
|
return {
|
870
884
|
name: "agilebot/prettier",
|
871
885
|
files: DEFAULT_GLOBS,
|
@@ -881,7 +895,12 @@ function prettier() {
|
|
881
895
|
"prettier/prettier": [
|
882
896
|
"error",
|
883
897
|
{
|
884
|
-
endOfLine: "auto"
|
898
|
+
endOfLine: "auto",
|
899
|
+
...src_default,
|
900
|
+
...opts
|
901
|
+
},
|
902
|
+
{
|
903
|
+
usePrettierrc: !opts
|
885
904
|
}
|
886
905
|
]
|
887
906
|
}
|
@@ -985,11 +1004,15 @@ function factory(root, options) {
|
|
985
1004
|
);
|
986
1005
|
}
|
987
1006
|
if (options.prettier) {
|
988
|
-
commonConfigs.push(
|
1007
|
+
commonConfigs.push(
|
1008
|
+
prettier(
|
1009
|
+
typeof options.prettier === "object" ? options.prettier : void 0
|
1010
|
+
)
|
1011
|
+
);
|
989
1012
|
}
|
990
|
-
const
|
1013
|
+
const config2 = [];
|
991
1014
|
if (options.godaddy) {
|
992
|
-
|
1015
|
+
config2.push({
|
993
1016
|
name: "agilebot/parser",
|
994
1017
|
files: DEFAULT_GLOBS,
|
995
1018
|
languageOptions: {
|
@@ -999,18 +1022,18 @@ function factory(root, options) {
|
|
999
1022
|
}
|
1000
1023
|
}
|
1001
1024
|
});
|
1002
|
-
|
1025
|
+
config2.push(env());
|
1003
1026
|
if (options.jsdoc) {
|
1004
|
-
|
1027
|
+
config2.push(
|
1005
1028
|
jsdoc({
|
1006
1029
|
ts: false
|
1007
1030
|
})
|
1008
1031
|
);
|
1009
1032
|
}
|
1010
|
-
|
1011
|
-
|
1033
|
+
config2.push(...commonConfigs);
|
1034
|
+
config2.push(godaddy());
|
1012
1035
|
} else {
|
1013
|
-
|
1036
|
+
config2.push({
|
1014
1037
|
name: "agilebot/parser",
|
1015
1038
|
files: DEFAULT_GLOBS,
|
1016
1039
|
languageOptions: {
|
@@ -1028,45 +1051,45 @@ function factory(root, options) {
|
|
1028
1051
|
}
|
1029
1052
|
}
|
1030
1053
|
});
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1054
|
+
config2.push(env());
|
1055
|
+
config2.push(standard());
|
1056
|
+
config2.push(ts());
|
1057
|
+
config2.push(jsOnly());
|
1058
|
+
config2.push(dts());
|
1059
|
+
config2.push(tsOnly());
|
1037
1060
|
if (options.react) {
|
1038
|
-
|
1039
|
-
|
1061
|
+
config2.push(react({ version: options.react }));
|
1062
|
+
config2.push(reactJsOnly());
|
1040
1063
|
}
|
1041
1064
|
if (options.vue) {
|
1042
|
-
|
1065
|
+
config2.push(
|
1043
1066
|
vue({
|
1044
1067
|
version: options.vue
|
1045
1068
|
})
|
1046
1069
|
);
|
1047
1070
|
}
|
1048
1071
|
if (options.lodash) {
|
1049
|
-
|
1072
|
+
config2.push(lodash());
|
1050
1073
|
}
|
1051
1074
|
if (options.cspell) {
|
1052
|
-
|
1075
|
+
config2.push(cspell(options.cspell));
|
1053
1076
|
}
|
1054
1077
|
if (options.jsdoc) {
|
1055
|
-
|
1078
|
+
config2.push({
|
1056
1079
|
...jsdoc({
|
1057
1080
|
ts: true
|
1058
1081
|
}),
|
1059
1082
|
files: TS_GLOBS
|
1060
1083
|
});
|
1061
|
-
|
1084
|
+
config2.push({
|
1062
1085
|
...jsdoc({
|
1063
1086
|
ts: false
|
1064
1087
|
}),
|
1065
1088
|
files: JS_GLOBS
|
1066
1089
|
});
|
1067
1090
|
}
|
1068
|
-
|
1069
|
-
|
1091
|
+
config2.push(...commonConfigs);
|
1092
|
+
config2.push(
|
1070
1093
|
agilebot({
|
1071
1094
|
root: rootDir,
|
1072
1095
|
monorepoScope: options.monorepoScope
|
@@ -1074,30 +1097,38 @@ function factory(root, options) {
|
|
1074
1097
|
);
|
1075
1098
|
}
|
1076
1099
|
if (options.config) {
|
1077
|
-
|
1100
|
+
config2.push({
|
1078
1101
|
name: "agilebot/custom",
|
1079
1102
|
files: DEFAULT_GLOBS,
|
1080
1103
|
...options.config
|
1081
1104
|
});
|
1082
1105
|
}
|
1083
|
-
|
1106
|
+
config2.push({
|
1084
1107
|
name: "agilebot/ignores",
|
1085
1108
|
ignores: [...IGNORE_GLOBS, ...options.ignores ?? []]
|
1086
1109
|
});
|
1087
1110
|
const allPlugins = {};
|
1088
|
-
|
1111
|
+
config2.forEach((configItem) => {
|
1089
1112
|
if (configItem.plugins) {
|
1090
1113
|
Object.assign(allPlugins, configItem.plugins);
|
1091
1114
|
delete configItem.plugins;
|
1092
1115
|
}
|
1093
1116
|
});
|
1094
|
-
|
1117
|
+
config2.unshift({
|
1095
1118
|
name: "agilebot/plugins",
|
1096
1119
|
files: DEFAULT_GLOBS,
|
1097
1120
|
plugins: allPlugins
|
1098
1121
|
});
|
1099
|
-
return
|
1122
|
+
return config2;
|
1100
1123
|
}
|
1101
1124
|
export {
|
1102
1125
|
factory as agilebot
|
1103
1126
|
};
|
1127
|
+
/**
|
1128
|
+
* @license @agilebot/prettier-config v0.7.4
|
1129
|
+
*
|
1130
|
+
* Copyright (c) Agilebot, Inc. and its affiliates.
|
1131
|
+
*
|
1132
|
+
* This source code is licensed under the MIT license found in the
|
1133
|
+
* LICENSE file in the root directory of this source tree.
|
1134
|
+
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.4",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -31,8 +31,8 @@
|
|
31
31
|
"@eslint-react/eslint-plugin": "^1.17.1",
|
32
32
|
"@eslint/js": "^9.15.0",
|
33
33
|
"@stylistic/eslint-plugin": "^2.11.0",
|
34
|
-
"@typescript-eslint/eslint-plugin": "~8.
|
35
|
-
"@typescript-eslint/parser": "~8.
|
34
|
+
"@typescript-eslint/eslint-plugin": "~8.25.0",
|
35
|
+
"@typescript-eslint/parser": "~8.25.0",
|
36
36
|
"eslint-config-godaddy": "^6.0.0",
|
37
37
|
"eslint-config-prettier": "^9.1.0",
|
38
38
|
"eslint-import-resolver-oxc": "^0.4.0",
|
@@ -58,7 +58,7 @@
|
|
58
58
|
"picocolors": "^1.1.0",
|
59
59
|
"vue-eslint-parser": "^9.4.3",
|
60
60
|
"yargs": "^17.7.2",
|
61
|
-
"@agilebot/eslint-utils": "0.7.
|
61
|
+
"@agilebot/eslint-utils": "0.7.4"
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
64
|
"@types/yargs": "^17.0.33",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"eslint": "^8.57.0 || ^9.0.0",
|
69
|
-
"@agilebot/eslint-plugin": "0.7.
|
69
|
+
"@agilebot/eslint-plugin": "0.7.4"
|
70
70
|
},
|
71
71
|
"files": [
|
72
72
|
"bin",
|