Skip to content

Commit 40c2331

Browse files
committed
chore: extract eslint config to separate file, lint vue files
1 parent 76f3314 commit 40c2331

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

.eslintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true
5+
},
6+
"extends": [
7+
"plugin:vue/vue3-essential",
8+
"eslint:recommended",
9+
"@vue/typescript/recommended",
10+
"@vue/prettier",
11+
"@vue/prettier/@typescript-eslint"
12+
],
13+
"parserOptions": {
14+
"ecmaVersion": 2020
15+
},
16+
"rules": {
17+
"no-console": "warn",
18+
"no-debugger": "warn"
19+
}
20+
}

package.json

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"scripts": {
1111
"build": "rollup -c rollup.config.ts",
12-
"lint": "eslint ./src/** ./tests/**",
12+
"lint": "eslint ./src/**/*.{ts,vue} ./tests/**/*.{ts,vue}",
1313
"prepare": "npm run build",
1414
"test": "jest"
1515
},
@@ -69,25 +69,5 @@
6969
"typescript": "^4.2.3",
7070
"vue": "^3.0.7",
7171
"vue-jest": "^5.0.0-alpha.7"
72-
},
73-
"eslintConfig": {
74-
"root": true,
75-
"env": {
76-
"node": true
77-
},
78-
"extends": [
79-
"plugin:vue/vue3-essential",
80-
"eslint:recommended",
81-
"@vue/typescript/recommended",
82-
"@vue/prettier",
83-
"@vue/prettier/@typescript-eslint"
84-
],
85-
"parserOptions": {
86-
"ecmaVersion": 2020
87-
},
88-
"rules": {
89-
"no-console": "warn",
90-
"no-debugger": "warn"
91-
}
9272
}
9373
}

src/devtools/Devtools.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export default defineComponent({
4848
};
4949
5050
const handleDragStart = (event: MouseEvent) => {
51-
console.log("drag start", panelRef.value);
5251
if (event.button !== 0) return; // Only allow left click for drag
5352
5453
isResizing.value = true;

src/devtools/components/QueryOptions.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { sortFns } from "../utils";
88
export default defineComponent({
99
name: "QueryOptions",
1010
emits: {
11+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1112
optionsChange: (_options: Options) => true,
1213
},
1314
setup(_props, { emit }) {

src/shims-vue.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare module "*.vue" {
22
import { DefineComponent } from "vue";
3-
// eslint-disable-next-line @typescript-eslint/ban-types
3+
// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any
44
const component: DefineComponent<{}, {}, any>;
55
export default component;
66
}

tests/useIsMutating.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { onUnmounted } from "vue-demi";
22
import { QueryClient, setLogger } from "react-query/core";
33
import { useMutation } from "../src/useMutation";
44
import { useIsMutating } from "../src/useIsMutating";
5-
import { flushPromises, simpleFetcher, noop, successMutator } from "./utils";
5+
import { flushPromises, noop, successMutator } from "./utils";
66

77
jest.mock("vue", () => {
88
const vue = jest.requireActual("vue");

0 commit comments

Comments
 (0)