Fix web lint errors and enable web linting in CI (#72)
This commit is contained in:
parent
f12db377f4
commit
39286f8d78
|
|
@ -28,6 +28,9 @@ jobs:
|
||||||
- name: 👷 Build Graphite web client
|
- name: 👷 Build Graphite web client
|
||||||
run: cd client/web && npm run build
|
run: cd client/web && npm run build
|
||||||
|
|
||||||
|
- name: 👕 Lint Graphite web formatting
|
||||||
|
run: cd client/web && npm run lint
|
||||||
|
|
||||||
- name: 🔬 Check Rust formatting
|
- name: 🔬 Check Rust formatting
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,15 @@ module.exports = {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2020,
|
ecmaVersion: 2020,
|
||||||
},
|
},
|
||||||
|
settings: {
|
||||||
|
"import/resolver": {
|
||||||
|
// `node` must be the top property
|
||||||
|
node: {},
|
||||||
|
webpack: {
|
||||||
|
config: require.resolve("@vue/cli-service/webpack.config.js"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
|
@ -19,7 +28,8 @@ module.exports = {
|
||||||
"linebreak-style": ["error", "unix"],
|
"linebreak-style": ["error", "unix"],
|
||||||
indent: ["error", "tab"],
|
indent: ["error", "tab"],
|
||||||
quotes: ["error", "double"],
|
quotes: ["error", "double"],
|
||||||
camelcase: ["warn", { ignoreImports: true, ignoreDestructuring: true }],
|
"@typescript-eslint/camelcase": "off",
|
||||||
|
camelcase: ["error", { ignoreImports: true, ignoreDestructuring: true }],
|
||||||
"import/extensions": ["error", "ignorePackages", {
|
"import/extensions": ["error", "ignorePackages", {
|
||||||
js: "never", jsx: "never", ts: "never", tsx: "never",
|
js: "never", jsx: "never", ts: "never", tsx: "never",
|
||||||
}],
|
}],
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@ export function handleResponse(responseType: ResponseType, responseData: string)
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(responseData);
|
callback(responseData);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
console.error(`Received a Response of type "${responseType}" but no handler was registered for it from the client.`);
|
console.error(`Received a Response of type "${responseType}" but no handler was registered for it from the client.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
declare module "*.vue" {
|
declare module "*.vue" {
|
||||||
import type { DefineComponent } from "vue"
|
import type { DefineComponent, DefineComponent } from "vue";
|
||||||
const component: DefineComponent<{}, {}, any>;
|
|
||||||
|
const component: DefineComponent;
|
||||||
export default component;
|
export default component;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "*.svg" {
|
declare module "*.svg" {
|
||||||
import type { DefineComponent } from "vue";
|
|
||||||
const component: DefineComponent;
|
const component: DefineComponent;
|
||||||
export default component;
|
export default component;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue