@agilebot/eslint-config 0.5.4 → 0.5.6

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.5.4
2
+ * @license @agilebot/eslint-config v0.5.6
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { Linter } from 'eslint';
2
+ import { Options as Options$1 } from '@cspell/eslint-plugin';
2
3
 
3
4
  type ESLintConfig = Linter.LegacyConfig;
4
5
 
6
+ type Options = Options$1['cspell'];
7
+
5
8
  interface FactoryOptions {
6
9
  /**
7
10
  * ESLint configuration
@@ -18,16 +21,6 @@ interface FactoryOptions {
18
21
  * @default undefined
19
22
  */
20
23
  coreModules?: string[];
21
- /**
22
- * List of words to include in cspell
23
- * @default undefined
24
- */
25
- cspellWords?: string[];
26
- /**
27
- * List of dictionaries to include in cspell
28
- * @default undefined
29
- */
30
- cspellDictionaries?: string[];
31
24
  /**
32
25
  * Monorepo scope
33
26
  * @default undefined
@@ -70,9 +63,9 @@ interface FactoryOptions {
70
63
  lodash?: boolean;
71
64
  /**
72
65
  * Flag indicating whether to enable CSpell configurations
73
- * @default true
66
+ * @default {}
74
67
  */
75
- cspell?: boolean;
68
+ cspell?: Options | false;
76
69
  /**
77
70
  * Flag indicating whether to enable imports configurations
78
71
  * @default true
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.5.4
2
+ * @license @agilebot/eslint-config v0.5.6
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
@@ -534,7 +534,7 @@ function react(opts) {
534
534
  // recommended rules from @eslint-react/hooks-extra
535
535
  "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
536
536
  // recommended rules react-hooks
537
- "@agilebot/react-rules-of-hooks": "error",
537
+ "react-hooks/rules-of-hooks": "error",
538
538
  // recommended rules from @eslint-react/naming-convention
539
539
  "@eslint-react/naming-convention/component-name": "error",
540
540
  "@eslint-react/naming-convention/use-state": "error",
@@ -682,10 +682,7 @@ function cspell(opts) {
682
682
  {
683
683
  checkComments: false,
684
684
  autoFix: false,
685
- cspell: {
686
- words: opts.words,
687
- dictionaries: opts.dictionaries
688
- }
685
+ cspell: opts
689
686
  }
690
687
  ]
691
688
  }
@@ -769,7 +766,7 @@ var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
769
766
 
770
767
  // src/factory/index.ts
771
768
  function factory(root, options) {
772
- var _a, _b, _c, _d, _e, _f;
769
+ var _a, _b, _c, _d;
773
770
  import_node_assert.default.ok(root, "root option is required");
774
771
  const tsconfigFiles = (0, import_eslint_utils3.findTsconfigFiles)(root, {
775
772
  absolute: true
@@ -778,7 +775,7 @@ function factory(root, options) {
778
775
  jsdoc: true,
779
776
  prettier: true,
780
777
  lodash: true,
781
- cspell: true,
778
+ cspell: {},
782
779
  import: true,
783
780
  importResolver: "typescript"
784
781
  };
@@ -849,16 +846,13 @@ function factory(root, options) {
849
846
  }) : {},
850
847
  (options == null ? void 0 : options.lodash) ? lodash() : {},
851
848
  deprecation(),
852
- (options == null ? void 0 : options.cspell) ? cspell({
853
- words: (_c = options == null ? void 0 : options.cspellWords) != null ? _c : [],
854
- dictionaries: (_d = options == null ? void 0 : options.cspellDictionaries) != null ? _d : []
855
- }) : {},
849
+ (options == null ? void 0 : options.cspell) ? cspell(options.cspell) : {},
856
850
  ...commonConfigs,
857
851
  agilebot({
858
852
  root,
859
853
  monorepoScope: options == null ? void 0 : options.monorepoScope
860
854
  }),
861
- (_e = options == null ? void 0 : options.config) != null ? _e : {}
855
+ (_c = options == null ? void 0 : options.config) != null ? _c : {}
862
856
  )),
863
857
  __spreadValues({
864
858
  files: JS_EXTS.map((ext) => `*${ext}`)
@@ -878,7 +872,7 @@ function factory(root, options) {
878
872
  ]
879
873
  };
880
874
  }
881
- if ((_f = config.overrides) == null ? void 0 : _f[0].parserOptions) {
875
+ if ((_d = config.overrides) == null ? void 0 : _d[0].parserOptions) {
882
876
  config.overrides[0].parserOptions.project = tsconfigFiles.length > 0 ? tsconfigFiles : true;
883
877
  } else if (config.parser) {
884
878
  config.parserOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-config",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Agilebot's ESLint config",
5
5
  "bin": {
6
6
  "eslint-agilebot": "bin/eslint-agilebot"
@@ -18,26 +18,27 @@
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.14.4",
22
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
23
- "@eslint-react/eslint-plugin": "^1.15.0",
24
- "@stylistic/eslint-plugin": "^2.8.0",
21
+ "@cspell/eslint-plugin": "^8.15.4",
22
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
23
+ "@eslint-react/eslint-plugin": "^1.15.1",
24
+ "@stylistic/eslint-plugin": "^2.9.0",
25
25
  "@typescript-eslint/eslint-plugin": "~8.7.0",
26
26
  "@typescript-eslint/parser": "~8.7.0",
27
27
  "eslint-config-godaddy": "^6.0.0",
28
28
  "eslint-config-prettier": "^9.1.0",
29
- "eslint-import-resolver-oxc": "^0.3.0",
29
+ "eslint-import-resolver-oxc": "^0.4.0",
30
30
  "eslint-import-resolver-typescript": "^3.6.3",
31
31
  "eslint-plugin-file-progress": "^1.5.0",
32
- "eslint-plugin-import-x": "^4.3.0",
33
- "eslint-plugin-jsdoc": "^50.3.0",
34
- "eslint-plugin-jsx-a11y": "^6.9.0",
35
- "eslint-plugin-n": "^17.10.3",
32
+ "eslint-plugin-import-x": "^4.3.1",
33
+ "eslint-plugin-jsdoc": "^50.4.3",
34
+ "eslint-plugin-jsx-a11y": "^6.10.2",
35
+ "eslint-plugin-n": "^17.11.1",
36
36
  "eslint-plugin-no-relative-import-paths": "^1.5.5",
37
37
  "eslint-plugin-prefer-arrow-functions": "^3.4.1",
38
38
  "eslint-plugin-prettier": "^5.2.1",
39
39
  "eslint-plugin-promise": "^7.1.0",
40
- "eslint-plugin-react": "^7.35.0",
40
+ "eslint-plugin-react": "^7.37.2",
41
+ "eslint-plugin-react-hooks": "^5.0.0",
41
42
  "eslint-plugin-unicorn": "^55.0.0",
42
43
  "eslint-plugin-unused-imports": "^4.1.4",
43
44
  "eslint-plugin-vue": "^9.28.0",
@@ -46,7 +47,7 @@
46
47
  "picocolors": "^1.1.0",
47
48
  "vue-eslint-parser": "^9.4.3",
48
49
  "yargs": "^17.7.2",
49
- "@agilebot/eslint-utils": "0.5.4"
50
+ "@agilebot/eslint-utils": "0.5.6"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@types/yargs": "^17.0.33",
@@ -54,7 +55,7 @@
54
55
  },
55
56
  "peerDependencies": {
56
57
  "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0",
57
- "@agilebot/eslint-plugin": "0.5.4"
58
+ "@agilebot/eslint-plugin": "0.5.6"
58
59
  },
59
60
  "files": [
60
61
  "bin",