Skip to content

Commit c6d523c

Browse files
More eslint improvements
1 parent f9dce35 commit c6d523c

37 files changed

Lines changed: 85 additions & 302 deletions

File tree

.eslintrc.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
extends: [
99
'plugin:@typescript-eslint/eslint-recommended',
1010
'plugin:@typescript-eslint/recommended',
11+
'plugin:import/recommended',
1112
'plugin:import/typescript',
1213
'prettier',
1314
],
@@ -46,7 +47,10 @@ module.exports = {
4647
'@typescript-eslint/no-inferrable-types': [
4748
'error', { ignoreParameters: true },
4849
],
50+
'import/default': 'off',
51+
'import/export': 'off',
4952
'import/no-cycle': 'error',
53+
'import/no-duplicates': 'off',
5054
'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }],
5155
'import/no-unused-modules': ['off', { unusedExports: true }],
5256
'no-redeclare': 'off',

examples/react/algolia/.eslintrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"],
3-
"rules": {
4-
"react/jsx-uses-react": "off",
5-
"react/react-in-jsx-scope": "off"
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended",
5+
"plugin:@tanstack/eslint-plugin-query/recommended"
6+
]
77
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"]
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended",
5+
"plugin:@tanstack/eslint-plugin-query/recommended"
6+
]
37
}

examples/react/basic/.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"]
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended",
5+
"plugin:@tanstack/eslint-plugin-query/recommended"
6+
]
37
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}

examples/react/offline/.eslintrc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": ["react-app", "prettier"],
3-
"rules": {
4-
// "eqeqeq": 0,
5-
// "jsx-a11y/anchor-is-valid": 0
6-
}
2+
"extends": [
3+
"plugin:react/recommended",
4+
"plugin:react-hooks/recommended"
5+
]
76
}

0 commit comments

Comments
 (0)