@bfra.me/eslint-config 0.47.5 → 0.47.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/lib/index.d.ts CHANGED
@@ -34,7 +34,7 @@ interface Rules {
34
34
  */
35
35
  '@next/next/inline-script-id'?: Linter.RuleEntry<[]>
36
36
  /**
37
- * Prefer `next/script` component when using the inline script for Google Analytics.
37
+ * Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager.
38
38
  * @see https://nextjs.org/docs/messages/next-script-for-ga
39
39
  */
40
40
  '@next/next/next-script-for-ga'?: Linter.RuleEntry<[]>
@@ -4771,7 +4771,7 @@ interface Rules {
4771
4771
  * Enforces destructuring and symmetric naming of `useState` hook value and setter.
4772
4772
  * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
4773
4773
  */
4774
- 'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
4774
+ 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>
4775
4775
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
4776
4776
  /**
4777
4777
  * Prevents leaked `addEventListener` in a component or custom Hook.
@@ -6652,6 +6652,11 @@ interface Rules {
6652
6652
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
6653
6653
  */
6654
6654
  'vitest/no-test-return-statement'?: Linter.RuleEntry<[]>
6655
+ /**
6656
+ * Disallow unnecessary async function wrapper for expected promises
6657
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
6658
+ */
6659
+ 'vitest/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>
6655
6660
  /**
6656
6661
  * Enforce padding around `afterAll` blocks
6657
6662
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
@@ -6761,7 +6766,7 @@ interface Rules {
6761
6766
  * prefer dynamic import in mock
6762
6767
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
6763
6768
  */
6764
- 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>
6769
+ 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<VitestPreferImportInMock>
6765
6770
  /**
6766
6771
  * enforce importing Vitest globals
6767
6772
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -6777,6 +6782,11 @@ interface Rules {
6777
6782
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
6778
6783
  */
6779
6784
  'vitest/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>
6785
+ /**
6786
+ * Prefer mock return shorthands
6787
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
6788
+ */
6789
+ 'vitest/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>
6780
6790
  /**
6781
6791
  * enforce including a hint with external snapshots
6782
6792
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -6822,6 +6832,11 @@ interface Rules {
6822
6832
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
6823
6833
  */
6824
6834
  'vitest/prefer-to-contain'?: Linter.RuleEntry<[]>
6835
+ /**
6836
+ * Suggest using `toHaveBeenCalledTimes()`
6837
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
6838
+ */
6839
+ 'vitest/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>
6825
6840
  /**
6826
6841
  * enforce using toHaveLength()
6827
6842
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
@@ -6847,11 +6862,6 @@ interface Rules {
6847
6862
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
6848
6863
  */
6849
6864
  'vitest/require-hook'?: Linter.RuleEntry<VitestRequireHook>
6850
- /**
6851
- * require usage of import in vi.mock()
6852
- * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
6853
- */
6854
- 'vitest/require-import-vi-mock'?: Linter.RuleEntry<[]>
6855
6865
  /**
6856
6866
  * require local Test Context for concurrent snapshot tests
6857
6867
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
@@ -16115,6 +16125,11 @@ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
16115
16125
  extensions?: string[]
16116
16126
  ignoreFilesWithoutCode?: boolean
16117
16127
  })]
16128
+ // ----- react-naming-convention/use-state -----
16129
+ type ReactNamingConventionUseState = []|[{
16130
+ enforceAssignment?: boolean
16131
+ enforceSetterName?: boolean
16132
+ }]
16118
16133
  // ----- react-refresh/only-export-components -----
16119
16134
  type ReactRefreshOnlyExportComponents = []|[{
16120
16135
  allowExportNames?: string[]
@@ -16844,6 +16859,10 @@ type VitestPreferExpectAssertions = []|[{
16844
16859
  onlyFunctionsWithExpectInLoop?: boolean
16845
16860
  onlyFunctionsWithExpectInCallback?: boolean
16846
16861
  }]
16862
+ // ----- vitest/prefer-import-in-mock -----
16863
+ type VitestPreferImportInMock = []|[{
16864
+ fixable?: boolean
16865
+ }]
16847
16866
  // ----- vitest/prefer-lowercase-title -----
16848
16867
  type VitestPreferLowercaseTitle = []|[{
16849
16868
  ignore?: ("describe" | "test" | "it")[]
package/lib/index.js CHANGED
@@ -147,7 +147,7 @@ var GLOB_EXCLUDE = [
147
147
  import { fileURLToPath } from "url";
148
148
 
149
149
  // package.json
150
- var version = "0.47.5";
150
+ var version = "0.47.6";
151
151
 
152
152
  // src/parsers/any-parser.ts
153
153
  var lineBreakPattern = /\r\n|[\n\r\u2028\u2029]/u;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bfra.me/eslint-config",
3
- "version": "0.47.5",
3
+ "version": "0.47.6",
4
4
  "description": "Shared ESLint configuration for bfra.me",
5
5
  "keywords": [
6
6
  "bfra.me",
@@ -60,18 +60,18 @@
60
60
  "local-pkg": "1.1.2",
61
61
  "package-manager-detector": "1.6.0",
62
62
  "sort-package-json": "3.6.0",
63
- "typescript-eslint": "8.50.0",
63
+ "typescript-eslint": "8.50.1",
64
64
  "@bfra.me/es": "0.1.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@eslint-react/eslint-plugin": "2.3.13",
67
+ "@eslint-react/eslint-plugin": "2.4.0",
68
68
  "@eslint/config-inspector": "1.4.2",
69
69
  "@eslint/core": "1.0.0",
70
- "@next/eslint-plugin-next": "16.0.10",
70
+ "@next/eslint-plugin-next": "16.1.1",
71
71
  "@types/eslint-config-prettier": "6.11.3",
72
72
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
73
- "@typescript-eslint/types": "8.50.0",
74
- "@vitest/eslint-plugin": "1.5.2",
73
+ "@typescript-eslint/types": "8.50.1",
74
+ "@vitest/eslint-plugin": "1.6.4",
75
75
  "astro-eslint-parser": "1.2.2",
76
76
  "eslint": "9.39.2",
77
77
  "eslint-config-prettier": "10.1.8",
package/src/rules.d.ts CHANGED
@@ -25,7 +25,7 @@ export interface Rules {
25
25
  */
26
26
  '@next/next/inline-script-id'?: Linter.RuleEntry<[]>
27
27
  /**
28
- * Prefer `next/script` component when using the inline script for Google Analytics.
28
+ * Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager.
29
29
  * @see https://nextjs.org/docs/messages/next-script-for-ga
30
30
  */
31
31
  '@next/next/next-script-for-ga'?: Linter.RuleEntry<[]>
@@ -4762,7 +4762,7 @@ export interface Rules {
4762
4762
  * Enforces destructuring and symmetric naming of `useState` hook value and setter.
4763
4763
  * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
4764
4764
  */
4765
- 'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
4765
+ 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>
4766
4766
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
4767
4767
  /**
4768
4768
  * Prevents leaked `addEventListener` in a component or custom Hook.
@@ -6643,6 +6643,11 @@ export interface Rules {
6643
6643
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
6644
6644
  */
6645
6645
  'vitest/no-test-return-statement'?: Linter.RuleEntry<[]>
6646
+ /**
6647
+ * Disallow unnecessary async function wrapper for expected promises
6648
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
6649
+ */
6650
+ 'vitest/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>
6646
6651
  /**
6647
6652
  * Enforce padding around `afterAll` blocks
6648
6653
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
@@ -6752,7 +6757,7 @@ export interface Rules {
6752
6757
  * prefer dynamic import in mock
6753
6758
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
6754
6759
  */
6755
- 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>
6760
+ 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<VitestPreferImportInMock>
6756
6761
  /**
6757
6762
  * enforce importing Vitest globals
6758
6763
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -6768,6 +6773,11 @@ export interface Rules {
6768
6773
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
6769
6774
  */
6770
6775
  'vitest/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>
6776
+ /**
6777
+ * Prefer mock return shorthands
6778
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
6779
+ */
6780
+ 'vitest/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>
6771
6781
  /**
6772
6782
  * enforce including a hint with external snapshots
6773
6783
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -6813,6 +6823,11 @@ export interface Rules {
6813
6823
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
6814
6824
  */
6815
6825
  'vitest/prefer-to-contain'?: Linter.RuleEntry<[]>
6826
+ /**
6827
+ * Suggest using `toHaveBeenCalledTimes()`
6828
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
6829
+ */
6830
+ 'vitest/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>
6816
6831
  /**
6817
6832
  * enforce using toHaveLength()
6818
6833
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
@@ -6838,11 +6853,6 @@ export interface Rules {
6838
6853
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
6839
6854
  */
6840
6855
  'vitest/require-hook'?: Linter.RuleEntry<VitestRequireHook>
6841
- /**
6842
- * require usage of import in vi.mock()
6843
- * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
6844
- */
6845
- 'vitest/require-import-vi-mock'?: Linter.RuleEntry<[]>
6846
6856
  /**
6847
6857
  * require local Test Context for concurrent snapshot tests
6848
6858
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
@@ -16106,6 +16116,11 @@ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
16106
16116
  extensions?: string[]
16107
16117
  ignoreFilesWithoutCode?: boolean
16108
16118
  })]
16119
+ // ----- react-naming-convention/use-state -----
16120
+ type ReactNamingConventionUseState = []|[{
16121
+ enforceAssignment?: boolean
16122
+ enforceSetterName?: boolean
16123
+ }]
16109
16124
  // ----- react-refresh/only-export-components -----
16110
16125
  type ReactRefreshOnlyExportComponents = []|[{
16111
16126
  allowExportNames?: string[]
@@ -16835,6 +16850,10 @@ type VitestPreferExpectAssertions = []|[{
16835
16850
  onlyFunctionsWithExpectInLoop?: boolean
16836
16851
  onlyFunctionsWithExpectInCallback?: boolean
16837
16852
  }]
16853
+ // ----- vitest/prefer-import-in-mock -----
16854
+ type VitestPreferImportInMock = []|[{
16855
+ fixable?: boolean
16856
+ }]
16838
16857
  // ----- vitest/prefer-lowercase-title -----
16839
16858
  type VitestPreferLowercaseTitle = []|[{
16840
16859
  ignore?: ("describe" | "test" | "it")[]