@ncontiero/eslint-config 8.0.0-beta.7 → 8.0.0-beta.9
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/index.d.mts +54 -48
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5,46 +5,6 @@ import { Options as PrettierOptions } from "prettier";
|
|
|
5
5
|
|
|
6
6
|
//#region src/typegen.d.ts
|
|
7
7
|
interface RuleOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Exhaustive deps rule for useQuery
|
|
10
|
-
* @see https://tanstack.com/query/latest/docs/eslint/exhaustive-deps
|
|
11
|
-
*/
|
|
12
|
-
'@tanstack/query/exhaustive-deps'?: Linter.RuleEntry<TanstackQueryExhaustiveDeps>;
|
|
13
|
-
/**
|
|
14
|
-
* Ensure correct order of inference sensitive properties for infinite queries
|
|
15
|
-
* @see https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order
|
|
16
|
-
*/
|
|
17
|
-
'@tanstack/query/infinite-query-property-order'?: Linter.RuleEntry<[]>;
|
|
18
|
-
/**
|
|
19
|
-
* Ensure correct order of inference-sensitive properties in useMutation()
|
|
20
|
-
* @see https://tanstack.com/query/latest/docs/eslint/mutation-property-order
|
|
21
|
-
*/
|
|
22
|
-
'@tanstack/query/mutation-property-order'?: Linter.RuleEntry<[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Disallows rest destructuring in queries
|
|
25
|
-
* @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring
|
|
26
|
-
*/
|
|
27
|
-
'@tanstack/query/no-rest-destructuring'?: Linter.RuleEntry<[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Disallow putting the result of query hooks directly in a React hook dependency array
|
|
30
|
-
* @see https://tanstack.com/query/latest/docs/eslint/no-unstable-deps
|
|
31
|
-
*/
|
|
32
|
-
'@tanstack/query/no-unstable-deps'?: Linter.RuleEntry<[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Ensures queryFn returns a non-undefined value
|
|
35
|
-
* @see https://tanstack.com/query/latest/docs/eslint/no-void-query-fn
|
|
36
|
-
*/
|
|
37
|
-
'@tanstack/query/no-void-query-fn'?: Linter.RuleEntry<[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Prefer using queryOptions() to co-locate queryKey and queryFn
|
|
40
|
-
* @see https://tanstack.com/query/latest/docs/eslint/prefer-query-options
|
|
41
|
-
*/
|
|
42
|
-
'@tanstack/query/prefer-query-options'?: Linter.RuleEntry<[]>;
|
|
43
|
-
/**
|
|
44
|
-
* Makes sure that QueryClient is stable
|
|
45
|
-
* @see https://tanstack.com/query/latest/docs/eslint/stable-query-client
|
|
46
|
-
*/
|
|
47
|
-
'@tanstack/query/stable-query-client'?: Linter.RuleEntry<[]>;
|
|
48
8
|
/**
|
|
49
9
|
* Enforce getter and setter pairs in objects and classes
|
|
50
10
|
* @see https://eslint.org/docs/latest/rules/accessor-pairs
|
|
@@ -4903,6 +4863,46 @@ interface RuleOptions {
|
|
|
4903
4863
|
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md
|
|
4904
4864
|
*/
|
|
4905
4865
|
'tailwindcss/no-unnecessary-whitespace'?: Linter.RuleEntry<TailwindcssNoUnnecessaryWhitespace>;
|
|
4866
|
+
/**
|
|
4867
|
+
* Exhaustive deps rule for useQuery
|
|
4868
|
+
* @see https://tanstack.com/query/latest/docs/eslint/exhaustive-deps
|
|
4869
|
+
*/
|
|
4870
|
+
'tanstack-query/exhaustive-deps'?: Linter.RuleEntry<TanstackQueryExhaustiveDeps>;
|
|
4871
|
+
/**
|
|
4872
|
+
* Ensure correct order of inference sensitive properties for infinite queries
|
|
4873
|
+
* @see https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order
|
|
4874
|
+
*/
|
|
4875
|
+
'tanstack-query/infinite-query-property-order'?: Linter.RuleEntry<[]>;
|
|
4876
|
+
/**
|
|
4877
|
+
* Ensure correct order of inference-sensitive properties in useMutation()
|
|
4878
|
+
* @see https://tanstack.com/query/latest/docs/eslint/mutation-property-order
|
|
4879
|
+
*/
|
|
4880
|
+
'tanstack-query/mutation-property-order'?: Linter.RuleEntry<[]>;
|
|
4881
|
+
/**
|
|
4882
|
+
* Disallows rest destructuring in queries
|
|
4883
|
+
* @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring
|
|
4884
|
+
*/
|
|
4885
|
+
'tanstack-query/no-rest-destructuring'?: Linter.RuleEntry<[]>;
|
|
4886
|
+
/**
|
|
4887
|
+
* Disallow putting the result of query hooks directly in a React hook dependency array
|
|
4888
|
+
* @see https://tanstack.com/query/latest/docs/eslint/no-unstable-deps
|
|
4889
|
+
*/
|
|
4890
|
+
'tanstack-query/no-unstable-deps'?: Linter.RuleEntry<[]>;
|
|
4891
|
+
/**
|
|
4892
|
+
* Ensures queryFn returns a non-undefined value
|
|
4893
|
+
* @see https://tanstack.com/query/latest/docs/eslint/no-void-query-fn
|
|
4894
|
+
*/
|
|
4895
|
+
'tanstack-query/no-void-query-fn'?: Linter.RuleEntry<[]>;
|
|
4896
|
+
/**
|
|
4897
|
+
* Prefer using queryOptions() to co-locate queryKey and queryFn
|
|
4898
|
+
* @see https://tanstack.com/query/latest/docs/eslint/prefer-query-options
|
|
4899
|
+
*/
|
|
4900
|
+
'tanstack-query/prefer-query-options'?: Linter.RuleEntry<[]>;
|
|
4901
|
+
/**
|
|
4902
|
+
* Makes sure that QueryClient is stable
|
|
4903
|
+
* @see https://tanstack.com/query/latest/docs/eslint/stable-query-client
|
|
4904
|
+
*/
|
|
4905
|
+
'tanstack-query/stable-query-client'?: Linter.RuleEntry<[]>;
|
|
4906
4906
|
/**
|
|
4907
4907
|
* Require or disallow spacing around embedded expressions of template strings
|
|
4908
4908
|
* @see https://eslint.org/docs/latest/rules/template-curly-spacing
|
|
@@ -6656,13 +6656,7 @@ interface RuleOptions {
|
|
|
6656
6656
|
'yoda'?: Linter.RuleEntry<Yoda>;
|
|
6657
6657
|
}
|
|
6658
6658
|
/* ======= Declarations ======= */
|
|
6659
|
-
// -----
|
|
6660
|
-
type TanstackQueryExhaustiveDeps = [] | [{
|
|
6661
|
-
allowlist?: {
|
|
6662
|
-
variables?: string[];
|
|
6663
|
-
types?: string[];
|
|
6664
|
-
};
|
|
6665
|
-
}]; // ----- accessor-pairs -----
|
|
6659
|
+
// ----- accessor-pairs -----
|
|
6666
6660
|
type AccessorPairs = [] | [{
|
|
6667
6661
|
getWithoutSet?: boolean;
|
|
6668
6662
|
setWithoutGet?: boolean;
|
|
@@ -15032,6 +15026,12 @@ type TailwindcssNoUnnecessaryWhitespace = [] | [{
|
|
|
15032
15026
|
rootFontSize?: number;
|
|
15033
15027
|
cwd?: string;
|
|
15034
15028
|
allowMultiline?: boolean;
|
|
15029
|
+
}]; // ----- tanstack-query/exhaustive-deps -----
|
|
15030
|
+
type TanstackQueryExhaustiveDeps = [] | [{
|
|
15031
|
+
allowlist?: {
|
|
15032
|
+
variables?: string[];
|
|
15033
|
+
types?: string[];
|
|
15034
|
+
};
|
|
15035
15035
|
}]; // ----- template-curly-spacing -----
|
|
15036
15036
|
type TemplateCurlySpacing = [] | [("always" | "never")]; // ----- template-tag-spacing -----
|
|
15037
15037
|
type TemplateTagSpacing = [] | [("always" | "never")]; // ----- toml/array-bracket-newline -----
|
|
@@ -16492,7 +16492,7 @@ type ConfigNames = 'ncontiero/gitignore' | 'ncontiero/ignores' | 'ncontiero/java
|
|
|
16492
16492
|
//#region src/types.d.ts
|
|
16493
16493
|
type Awaitable<T> = T | Promise<T>;
|
|
16494
16494
|
interface Rules extends RuleOptions {}
|
|
16495
|
-
interface FlatConfigItem extends Omit<Linter.Config
|
|
16495
|
+
interface FlatConfigItem extends Omit<Linter.Config, "plugins" | "rules"> {
|
|
16496
16496
|
/**
|
|
16497
16497
|
* An object containing a name-value mapping of plugin names to plugin objects.
|
|
16498
16498
|
* When `files` is specified, these plugins are only available to the matching files.
|
|
@@ -16500,6 +16500,11 @@ interface FlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>,
|
|
|
16500
16500
|
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
16501
16501
|
*/
|
|
16502
16502
|
plugins?: Record<string, any>;
|
|
16503
|
+
/**
|
|
16504
|
+
* An object containing the configured rules. When `files` or `ignores` are
|
|
16505
|
+
* specified, these rule configurations are only available to the matching files.
|
|
16506
|
+
*/
|
|
16507
|
+
rules?: Rules;
|
|
16503
16508
|
}
|
|
16504
16509
|
interface OptionsFiles {
|
|
16505
16510
|
/**
|
|
@@ -16836,6 +16841,7 @@ declare const hasTailwind: boolean;
|
|
|
16836
16841
|
//#region src/factory.d.ts
|
|
16837
16842
|
declare const defaultPluginRenaming: {
|
|
16838
16843
|
"@eslint-react": string;
|
|
16844
|
+
"@tanstack/query": string;
|
|
16839
16845
|
"@typescript-eslint": string;
|
|
16840
16846
|
};
|
|
16841
16847
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
package/dist/index.mjs
CHANGED
|
@@ -1308,7 +1308,7 @@ async function tanstackQuery(options = {}) {
|
|
|
1308
1308
|
const config = tanstackQueryPlugin.configs.recommended;
|
|
1309
1309
|
return [{
|
|
1310
1310
|
name: "ncontiero/tanstack-query/setup",
|
|
1311
|
-
plugins: { "
|
|
1311
|
+
plugins: { "tanstack-query": tanstackQueryPlugin }
|
|
1312
1312
|
}, {
|
|
1313
1313
|
files,
|
|
1314
1314
|
name: "ncontiero/tanstack-query/rules",
|
|
@@ -1679,6 +1679,7 @@ const flatConfigProps = [
|
|
|
1679
1679
|
];
|
|
1680
1680
|
const defaultPluginRenaming = {
|
|
1681
1681
|
"@eslint-react": "react",
|
|
1682
|
+
"@tanstack/query": "tanstack-query",
|
|
1682
1683
|
"@typescript-eslint": "ts"
|
|
1683
1684
|
};
|
|
1684
1685
|
function resolveSubOptions(options, key) {
|