@agilebot/eslint-config 0.5.3 → 0.5.5

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.3
2
+ * @license @agilebot/eslint-config v0.5.5
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,11 +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
24
  /**
27
25
  * Monorepo scope
28
26
  * @default undefined
@@ -65,9 +63,9 @@ interface FactoryOptions {
65
63
  lodash?: boolean;
66
64
  /**
67
65
  * Flag indicating whether to enable CSpell configurations
68
- * @default true
66
+ * @default {}
69
67
  */
70
- cspell?: boolean;
68
+ cspell?: Options | false;
71
69
  /**
72
70
  * Flag indicating whether to enable imports configurations
73
71
  * @default true
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.5.3
2
+ * @license @agilebot/eslint-config v0.5.5
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,9 +682,7 @@ function cspell(opts) {
682
682
  {
683
683
  checkComments: false,
684
684
  autoFix: false,
685
- cspell: {
686
- words: opts.words
687
- }
685
+ cspell: opts
688
686
  }
689
687
  ]
690
688
  }
@@ -768,7 +766,7 @@ var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
768
766
 
769
767
  // src/factory/index.ts
770
768
  function factory(root, options) {
771
- var _a, _b, _c, _d, _e;
769
+ var _a, _b, _c, _d;
772
770
  import_node_assert.default.ok(root, "root option is required");
773
771
  const tsconfigFiles = (0, import_eslint_utils3.findTsconfigFiles)(root, {
774
772
  absolute: true
@@ -777,7 +775,7 @@ function factory(root, options) {
777
775
  jsdoc: true,
778
776
  prettier: true,
779
777
  lodash: true,
780
- cspell: true,
778
+ cspell: {},
781
779
  import: true,
782
780
  importResolver: "typescript"
783
781
  };
@@ -848,15 +846,13 @@ function factory(root, options) {
848
846
  }) : {},
849
847
  (options == null ? void 0 : options.lodash) ? lodash() : {},
850
848
  deprecation(),
851
- (options == null ? void 0 : options.cspell) ? cspell({
852
- words: (_c = options == null ? void 0 : options.cspellWords) != null ? _c : []
853
- }) : {},
849
+ (options == null ? void 0 : options.cspell) ? cspell(options.cspell) : {},
854
850
  ...commonConfigs,
855
851
  agilebot({
856
852
  root,
857
853
  monorepoScope: options == null ? void 0 : options.monorepoScope
858
854
  }),
859
- (_d = options == null ? void 0 : options.config) != null ? _d : {}
855
+ (_c = options == null ? void 0 : options.config) != null ? _c : {}
860
856
  )),
861
857
  __spreadValues({
862
858
  files: JS_EXTS.map((ext) => `*${ext}`)
@@ -876,7 +872,7 @@ function factory(root, options) {
876
872
  ]
877
873
  };
878
874
  }
879
- if ((_e = config.overrides) == null ? void 0 : _e[0].parserOptions) {
875
+ if ((_d = config.overrides) == null ? void 0 : _d[0].parserOptions) {
880
876
  config.overrides[0].parserOptions.project = tsconfigFiles.length > 0 ? tsconfigFiles : true;
881
877
  } else if (config.parser) {
882
878
  config.parserOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-config",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
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": "^4.6.2",
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.3"
50
+ "@agilebot/eslint-utils": "0.5.5"
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.3"
58
+ "@agilebot/eslint-plugin": "0.5.5"
58
59
  },
59
60
  "files": [
60
61
  "bin",