@agilebot/eslint-config 0.3.8 → 0.3.10
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 +16 -25
- package/dist/index.d.ts +1 -1
- package/dist/index.js +122 -115
- package/package.json +17 -17
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.10
|
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;
|
@@ -48,21 +48,12 @@ var import_node_fs = __toESM(require("fs"));
|
|
48
48
|
var import_node_path = __toESM(require("path"));
|
49
49
|
var import_eslint_utils = require("@agilebot/eslint-utils");
|
50
50
|
|
51
|
-
// src/
|
52
|
-
var
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
".cjs",
|
58
|
-
".mjs",
|
59
|
-
".cts",
|
60
|
-
".mts",
|
61
|
-
".vue"
|
62
|
-
];
|
63
|
-
|
64
|
-
// src/cli/constants.ts
|
65
|
-
var isEslint = /^\.eslint.*/;
|
51
|
+
// src/constants.ts
|
52
|
+
var JS_EXTS = [".js", ".jsx", ".cjs", ".cjsx", ".mjs", ".mjsx"];
|
53
|
+
var TS_EXTS = [".ts", ".tsx", ".cts", ".ctsx", ".mts", ".mtsx"];
|
54
|
+
var VUE_EXTS = [".vue"];
|
55
|
+
var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
|
56
|
+
var IS_ESLINT = /^\.eslint.*/;
|
66
57
|
|
67
58
|
// src/cli/index.ts
|
68
59
|
function cli() {
|
@@ -87,7 +78,7 @@ function cli() {
|
|
87
78
|
process.argv.splice(2, 0, "--fix");
|
88
79
|
}
|
89
80
|
if (!has.ext) {
|
90
|
-
process.argv.splice(2, 0, "--ext",
|
81
|
+
process.argv.splice(2, 0, "--ext", DEFAULT_EXTS.join(","));
|
91
82
|
}
|
92
83
|
if (has.progress && !(0, import_eslint_utils.isCI)()) {
|
93
84
|
process.argv.splice(
|
@@ -108,7 +99,7 @@ function cli() {
|
|
108
99
|
throw err;
|
109
100
|
}
|
110
101
|
has.config = has.config || files.some((file) => {
|
111
|
-
return
|
102
|
+
return IS_ESLINT.test(file);
|
112
103
|
});
|
113
104
|
if (!has.config) {
|
114
105
|
throw new Error("No ESLint configuration file found");
|
package/dist/index.d.ts
CHANGED
@@ -45,7 +45,7 @@ interface FactoryOptions {
|
|
45
45
|
* Flag indicating whether to enable GoDaddy configurations
|
46
46
|
* @default undefined
|
47
47
|
*/
|
48
|
-
godaddy?: boolean;
|
48
|
+
godaddy?: boolean | 'typescript';
|
49
49
|
/**
|
50
50
|
* Flag indicating whether to enable JSDoc configurations
|
51
51
|
* @default true
|
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.10
|
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.
|
62
|
+
// ../../node_modules/.pnpm/tsup@8.1.0_postcss@8.4.39_ts-node@10.9.2_@types+node@20.11.28_typescript@5.4.5__typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
|
63
63
|
var init_cjs_shims = __esm({
|
64
|
-
"../../node_modules/.pnpm/tsup@8.
|
64
|
+
"../../node_modules/.pnpm/tsup@8.1.0_postcss@8.4.39_ts-node@10.9.2_@types+node@20.11.28_typescript@5.4.5__typescript@5.4.5/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.
|
69
|
+
// ../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@7_bx3ud3a5a3wg7ark6pvzt2lrse/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.
|
71
|
+
"../../node_modules/.pnpm/eslint-config-love@47.0.0_@typescript-eslint+eslint-plugin@7.16.0_@typescript-eslint+parser@7_bx3ud3a5a3wg7ark6pvzt2lrse/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");
|
@@ -520,9 +520,10 @@ function standard() {
|
|
520
520
|
standardRules[key] = value;
|
521
521
|
}
|
522
522
|
});
|
523
|
+
const disabled = standardDisabled();
|
523
524
|
return {
|
524
525
|
plugins: ["@typescript-eslint", "import-x", "n", "promise"],
|
525
|
-
rules: __spreadProps(__spreadValues({}, standardRules), {
|
526
|
+
rules: __spreadValues(__spreadProps(__spreadValues({}, standardRules), {
|
526
527
|
"no-alert": "error",
|
527
528
|
// 找出TODO注释,以便后期修复
|
528
529
|
"no-warning-comments": [
|
@@ -545,8 +546,13 @@ function standard() {
|
|
545
546
|
"promise/valid-params": "error",
|
546
547
|
"promise/no-multiple-resolved": "error",
|
547
548
|
"promise/no-return-in-finally": "error",
|
548
|
-
"promise/prefer-await-to-then": "warn"
|
549
|
-
|
549
|
+
"promise/prefer-await-to-then": "warn"
|
550
|
+
}), disabled.rules)
|
551
|
+
};
|
552
|
+
}
|
553
|
+
function standardDisabled() {
|
554
|
+
return {
|
555
|
+
rules: {
|
550
556
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
551
557
|
"@typescript-eslint/space-before-function-paren": "off",
|
552
558
|
"@typescript-eslint/unbound-method": "off",
|
@@ -557,9 +563,8 @@ function standard() {
|
|
557
563
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
558
564
|
"@typescript-eslint/explicit-function-return-type": "off",
|
559
565
|
"@typescript-eslint/restrict-template-expressions": "off",
|
560
|
-
"@typescript-eslint/explicit-member-accessibility": "off",
|
561
566
|
"@typescript-eslint/no-unsafe-argument": "off"
|
562
|
-
}
|
567
|
+
}
|
563
568
|
};
|
564
569
|
}
|
565
570
|
|
@@ -666,6 +671,32 @@ function ts() {
|
|
666
671
|
}
|
667
672
|
};
|
668
673
|
}
|
674
|
+
function tsOnly() {
|
675
|
+
return {
|
676
|
+
rules: {
|
677
|
+
"@typescript-eslint/explicit-member-accessibility": "error"
|
678
|
+
}
|
679
|
+
};
|
680
|
+
}
|
681
|
+
function jsOnly() {
|
682
|
+
return {
|
683
|
+
rules: {
|
684
|
+
"@typescript-eslint/no-var-requires": "off"
|
685
|
+
}
|
686
|
+
};
|
687
|
+
}
|
688
|
+
function dts() {
|
689
|
+
return {
|
690
|
+
rules: {
|
691
|
+
// .d.ts中支持导入ts文件中的类型
|
692
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
693
|
+
// .d.ts中忽略属性命名规则
|
694
|
+
"@typescript-eslint/naming-convention": "off",
|
695
|
+
// .d.ts中忽略三斜线引用
|
696
|
+
"@typescript-eslint/triple-slash-reference": "off"
|
697
|
+
}
|
698
|
+
};
|
699
|
+
}
|
669
700
|
|
670
701
|
// src/configs/imports.ts
|
671
702
|
init_cjs_shims();
|
@@ -889,6 +920,7 @@ function react(opts) {
|
|
889
920
|
"react-hooks/rules-of-hooks": "error",
|
890
921
|
// recommended rules from @eslint-react/naming-convention
|
891
922
|
"@eslint-react/naming-convention/component-name": "error",
|
923
|
+
"@eslint-react/naming-convention/use-state": "error",
|
892
924
|
// 以下是自定义规则
|
893
925
|
"react/jsx-handler-names": [
|
894
926
|
"error",
|
@@ -898,15 +930,6 @@ function react(opts) {
|
|
898
930
|
checkLocalVariables: true
|
899
931
|
}
|
900
932
|
],
|
901
|
-
// useState必须以[example, setExample]命名
|
902
|
-
"react/hook-use-state": "error",
|
903
|
-
// 组件命名符合帕斯卡
|
904
|
-
"react/jsx-pascal-case": [
|
905
|
-
"error",
|
906
|
-
{
|
907
|
-
allowNamespace: true
|
908
|
-
}
|
909
|
-
],
|
910
933
|
// 已经有ts校验,此规则没有必要,会与带静态属性的Functional Component冲突
|
911
934
|
"react/prop-types": "off",
|
912
935
|
// <App prop={'Hello'} />没必要,使用<App prop="Hello" />
|
@@ -1131,27 +1154,21 @@ function godaddy() {
|
|
1131
1154
|
};
|
1132
1155
|
}
|
1133
1156
|
|
1134
|
-
// src/
|
1157
|
+
// src/constants.ts
|
1135
1158
|
init_cjs_shims();
|
1136
|
-
var
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
".cjs",
|
1142
|
-
".mjs",
|
1143
|
-
".cts",
|
1144
|
-
".mts",
|
1145
|
-
".vue"
|
1146
|
-
];
|
1147
|
-
var jsExtensions = [".js", ".jsx", ".cjs", ".mjs"];
|
1148
|
-
var tsExtensions = [".ts", ".tsx", ".cts", ".mts"];
|
1149
|
-
var dtsExtensions = [".d.ts", ".d.cts", ".d.mts"];
|
1159
|
+
var JS_EXTS = [".js", ".jsx", ".cjs", ".cjsx", ".mjs", ".mjsx"];
|
1160
|
+
var TS_EXTS = [".ts", ".tsx", ".cts", ".ctsx", ".mts", ".mtsx"];
|
1161
|
+
var DTS_EXTS = [".d.ts", ".d.cts", ".d.mts"];
|
1162
|
+
var VUE_EXTS = [".vue"];
|
1163
|
+
var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
|
1150
1164
|
|
1151
1165
|
// src/factory/index.ts
|
1152
1166
|
function factory(root, options) {
|
1153
1167
|
var _a, _b, _c, _d, _e;
|
1154
1168
|
import_node_assert.default.ok(root, "root option is required");
|
1169
|
+
const tsconfigFiles = (0, import_eslint_utils3.findTsconfigFiles)(root, {
|
1170
|
+
absolute: true
|
1171
|
+
});
|
1155
1172
|
const defaultOptions = {
|
1156
1173
|
jsdoc: true,
|
1157
1174
|
prettier: true,
|
@@ -1181,8 +1198,11 @@ function factory(root, options) {
|
|
1181
1198
|
}) : {},
|
1182
1199
|
options.prettier ? prettier() : {}
|
1183
1200
|
];
|
1201
|
+
let config;
|
1184
1202
|
if (options == null ? void 0 : options.godaddy) {
|
1185
|
-
|
1203
|
+
config = __spreadValues({
|
1204
|
+
parser: options.godaddy === "typescript" ? "@typescript-eslint/parser" : void 0
|
1205
|
+
}, (0, import_eslint_utils3.mergeESLintConfig)(
|
1186
1206
|
godaddy(),
|
1187
1207
|
(options == null ? void 0 : options.jsdoc) ? jsdoc({
|
1188
1208
|
ts: false
|
@@ -1192,82 +1212,69 @@ function factory(root, options) {
|
|
1192
1212
|
ts: false
|
1193
1213
|
}) : {},
|
1194
1214
|
(_b = options == null ? void 0 : options.config) != null ? _b : {}
|
1195
|
-
);
|
1196
|
-
}
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
},
|
1211
|
-
sourceType: options.module ? "module" : void 0,
|
1212
|
-
extraFileExtensions: !(options == null ? void 0 : options.vue) ? void 0 : [".vue"]
|
1213
|
-
}
|
1214
|
-
}, (0, import_eslint_utils3.mergeESLintConfig)(
|
1215
|
-
env(),
|
1216
|
-
standard(),
|
1217
|
-
// standard必须在ts之前
|
1218
|
-
ts(),
|
1219
|
-
(options == null ? void 0 : options.react) ? react({ version: options.react }) : {},
|
1220
|
-
(options == null ? void 0 : options.vue) ? vue({
|
1221
|
-
version: options.vue
|
1222
|
-
}) : {},
|
1223
|
-
(options == null ? void 0 : options.jsdoc) ? jsdoc({
|
1224
|
-
ts: true
|
1225
|
-
}) : {},
|
1226
|
-
(options == null ? void 0 : options.lodash) ? lodash() : {},
|
1227
|
-
deprecation(),
|
1228
|
-
(options == null ? void 0 : options.cspell) ? cspell({
|
1229
|
-
words: (_c = options == null ? void 0 : options.cspellWords) != null ? _c : []
|
1230
|
-
}) : {},
|
1231
|
-
...commonConfigs,
|
1232
|
-
agilebot({
|
1233
|
-
root,
|
1234
|
-
monorepoScope: options == null ? void 0 : options.monorepoScope
|
1235
|
-
}),
|
1236
|
-
(_d = options == null ? void 0 : options.config) != null ? _d : {}
|
1237
|
-
)),
|
1238
|
-
__spreadValues({
|
1239
|
-
files: jsExtensions.map((ext) => `*${ext}`)
|
1240
|
-
}, (0, import_eslint_utils3.mergeESLintConfig)(
|
1241
|
-
{
|
1242
|
-
rules: {
|
1243
|
-
"@typescript-eslint/no-var-requires": "off"
|
1215
|
+
));
|
1216
|
+
} else {
|
1217
|
+
config = {
|
1218
|
+
overrides: [
|
1219
|
+
__spreadValues({
|
1220
|
+
files: DEFAULT_EXTS.map((ext) => `*${ext}`),
|
1221
|
+
parser: !(options == null ? void 0 : options.vue) ? "@typescript-eslint/parser" : "vue-eslint-parser",
|
1222
|
+
parserOptions: {
|
1223
|
+
parser: "@typescript-eslint/parser",
|
1224
|
+
tsconfigRootDir: root,
|
1225
|
+
ecmaFeatures: {
|
1226
|
+
jsx: true
|
1227
|
+
},
|
1228
|
+
sourceType: options.module ? "module" : void 0,
|
1229
|
+
extraFileExtensions: !(options == null ? void 0 : options.vue) ? void 0 : [".vue"]
|
1244
1230
|
}
|
1245
|
-
},
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1231
|
+
}, (0, import_eslint_utils3.mergeESLintConfig)(
|
1232
|
+
env(),
|
1233
|
+
standard(),
|
1234
|
+
// standard必须在ts之前
|
1235
|
+
ts(),
|
1236
|
+
(options == null ? void 0 : options.react) ? react({ version: options.react }) : {},
|
1237
|
+
(options == null ? void 0 : options.vue) ? vue({
|
1238
|
+
version: options.vue
|
1239
|
+
}) : {},
|
1240
|
+
(options == null ? void 0 : options.jsdoc) ? jsdoc({
|
1241
|
+
ts: true
|
1242
|
+
}) : {},
|
1243
|
+
(options == null ? void 0 : options.lodash) ? lodash() : {},
|
1244
|
+
deprecation(),
|
1245
|
+
(options == null ? void 0 : options.cspell) ? cspell({
|
1246
|
+
words: (_c = options == null ? void 0 : options.cspellWords) != null ? _c : []
|
1247
|
+
}) : {},
|
1248
|
+
...commonConfigs,
|
1249
|
+
agilebot({
|
1250
|
+
root,
|
1251
|
+
monorepoScope: options == null ? void 0 : options.monorepoScope
|
1252
|
+
}),
|
1253
|
+
(_d = options == null ? void 0 : options.config) != null ? _d : {}
|
1254
|
+
)),
|
1255
|
+
__spreadValues({
|
1256
|
+
files: JS_EXTS.map((ext) => `*${ext}`)
|
1257
|
+
}, (0, import_eslint_utils3.mergeESLintConfig)(
|
1258
|
+
jsOnly(),
|
1259
|
+
(options == null ? void 0 : options.jsdoc) ? jsdoc({
|
1260
|
+
ts: false
|
1261
|
+
}) : {}
|
1262
|
+
)),
|
1263
|
+
__spreadValues({
|
1264
|
+
files: TS_EXTS.map((ext) => `*${ext}`)
|
1265
|
+
}, tsOnly()),
|
1266
|
+
__spreadValues({
|
1267
|
+
files: DTS_EXTS.map((ext) => `*${ext}`)
|
1268
|
+
}, dts())
|
1269
|
+
]
|
1270
|
+
};
|
1271
|
+
}
|
1269
1272
|
if ((_e = config.overrides) == null ? void 0 : _e[0].parserOptions) {
|
1270
1273
|
config.overrides[0].parserOptions.project = tsconfigFiles.length > 0 ? tsconfigFiles : true;
|
1274
|
+
} else if (config.parser) {
|
1275
|
+
config.parserOptions = {
|
1276
|
+
project: tsconfigFiles.length > 0 ? tsconfigFiles : true
|
1277
|
+
};
|
1271
1278
|
}
|
1272
1279
|
return config;
|
1273
1280
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.10",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -18,40 +18,40 @@
|
|
18
18
|
},
|
19
19
|
"homepage": "https://github.com/sh-agilebot/frontend-toolkit/tree/master/packages/eslint-config#readme",
|
20
20
|
"dependencies": {
|
21
|
-
"@cspell/eslint-plugin": "^8.
|
22
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
23
|
-
"@stylistic/eslint-plugin": "^2.
|
24
|
-
"@typescript-eslint/eslint-plugin": "~7.
|
25
|
-
"@typescript-eslint/parser": "~7.
|
21
|
+
"@cspell/eslint-plugin": "^8.10.4",
|
22
|
+
"@eslint-react/eslint-plugin": "^1.5.23",
|
23
|
+
"@stylistic/eslint-plugin": "^2.3.0",
|
24
|
+
"@typescript-eslint/eslint-plugin": "~7.16.0",
|
25
|
+
"@typescript-eslint/parser": "~7.16.0",
|
26
26
|
"eslint-config-godaddy": "^6.0.0",
|
27
27
|
"eslint-config-prettier": "^9.1.0",
|
28
28
|
"eslint-import-resolver-typescript": "^3.6.1",
|
29
|
-
"eslint-plugin-deprecation": "^
|
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": "^0.5.
|
33
|
-
"eslint-plugin-jsdoc": "^48.2
|
34
|
-
"eslint-plugin-jsx-a11y": "^6.
|
35
|
-
"eslint-plugin-n": "^17.
|
36
|
-
"eslint-plugin-no-relative-import-paths": "^1.5.
|
32
|
+
"eslint-plugin-import-x": "^0.5.3",
|
33
|
+
"eslint-plugin-jsdoc": "^48.5.2",
|
34
|
+
"eslint-plugin-jsx-a11y": "^6.9.0",
|
35
|
+
"eslint-plugin-n": "^17.9.0",
|
36
|
+
"eslint-plugin-no-relative-import-paths": "^1.5.5",
|
37
37
|
"eslint-plugin-prefer-arrow-functions": "^3.3.2",
|
38
38
|
"eslint-plugin-prettier": "^5.1.3",
|
39
|
-
"eslint-plugin-promise": "^6.
|
40
|
-
"eslint-plugin-react": "^7.34.
|
39
|
+
"eslint-plugin-promise": "^6.4.0",
|
40
|
+
"eslint-plugin-react": "^7.34.3",
|
41
41
|
"eslint-plugin-react-hooks": "^4.6.2",
|
42
|
-
"eslint-plugin-unicorn": "^
|
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.10"
|
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.10"
|
55
55
|
},
|
56
56
|
"files": [
|
57
57
|
"bin",
|