@mkaradeniz/eslint-config 5.6.0 → 5.8.0
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/next.mjs +7 -0
- package/package.json +3 -1
- package/rules/tanstackQueryRules.mjs +11 -0
- package/tanstackQuery.mjs +15 -0
package/next.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import eslintPluginNext from '@next/eslint-plugin-next';
|
|
|
2
2
|
|
|
3
3
|
import { reactConfig } from './react.mjs';
|
|
4
4
|
import { nextRules } from './rules/nextRules.mjs';
|
|
5
|
+
import { reactRules } from './rules/reactRules.mjs';
|
|
5
6
|
|
|
6
7
|
export const nextConfig = [
|
|
7
8
|
...reactConfig,
|
|
@@ -56,4 +57,10 @@ export const nextConfig = [
|
|
|
56
57
|
'unicorn/filename-case': ['off'],
|
|
57
58
|
},
|
|
58
59
|
},
|
|
60
|
+
{
|
|
61
|
+
files: ['**/instrumentation.ts', '**/instrumentation-client.ts'],
|
|
62
|
+
rules: {
|
|
63
|
+
'no-restricted-syntax': ['warn', ...reactRules.rules['no-restricted-syntax'].slice(1).filter(s => !s.selector.includes('process'))],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
59
66
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkaradeniz/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"base.mjs",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"next.mjs",
|
|
9
9
|
"react.mjs",
|
|
10
10
|
"shadcn.mjs",
|
|
11
|
+
"tanstackQuery.mjs",
|
|
11
12
|
"turbo.mjs",
|
|
12
13
|
"eslint.config.mjs",
|
|
13
14
|
"rules/"
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"@eslint/compat": "^2.0.2",
|
|
29
30
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
30
31
|
"@stylistic/eslint-plugin": "^5.8.0",
|
|
32
|
+
"@tanstack/eslint-plugin-query": "^5.91.4",
|
|
31
33
|
"eslint-plugin-import-x": "^4.16.1",
|
|
32
34
|
"eslint-plugin-jsdoc": "^62.5.5",
|
|
33
35
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const tanstackQueryRules = {
|
|
2
|
+
rules: {
|
|
3
|
+
'@tanstack/query/exhaustive-deps': ['warn'],
|
|
4
|
+
'@tanstack/query/infinite-query-property-order': ['warn'],
|
|
5
|
+
'@tanstack/query/mutation-property-order': ['warn'],
|
|
6
|
+
'@tanstack/query/no-rest-destructuring': ['warn'],
|
|
7
|
+
'@tanstack/query/no-unstable-deps': ['warn'],
|
|
8
|
+
'@tanstack/query/no-void-query-fn': ['warn'],
|
|
9
|
+
'@tanstack/query/stable-query-client': ['warn'],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import eslintPluginQuery from '@tanstack/eslint-plugin-query';
|
|
2
|
+
|
|
3
|
+
import { tanstackQueryRules } from './rules/tanstackQueryRules.mjs';
|
|
4
|
+
|
|
5
|
+
export const tanstackQueryConfig = [
|
|
6
|
+
{
|
|
7
|
+
plugins: {
|
|
8
|
+
/**
|
|
9
|
+
* https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query
|
|
10
|
+
*/
|
|
11
|
+
'@tanstack/query': eslintPluginQuery,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
{ ...tanstackQueryRules },
|
|
15
|
+
];
|