mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00:00
Fix web lint errors and enable web linting in CI (#72)
This commit is contained in:
parent
1fd298cf9e
commit
e3be55d4e2
4 changed files with 19 additions and 6 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -28,6 +28,9 @@ jobs:
|
|||
- name: 👷 Build Graphite web client
|
||||
run: cd client/web && npm run build
|
||||
|
||||
- name: 👕 Lint Graphite web formatting
|
||||
run: cd client/web && npm run lint
|
||||
|
||||
- name: 🔬 Check Rust formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,15 @@ module.exports = {
|
|||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
// `node` must be the top property
|
||||
node: {},
|
||||
webpack: {
|
||||
config: require.resolve("@vue/cli-service/webpack.config.js"),
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"no-console": 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"],
|
||||
indent: ["error", "tab"],
|
||||
quotes: ["error", "double"],
|
||||
camelcase: ["warn", { ignoreImports: true, ignoreDestructuring: true }],
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
camelcase: ["error", { ignoreImports: true, ignoreDestructuring: true }],
|
||||
"import/extensions": ["error", "ignorePackages", {
|
||||
js: "never", jsx: "never", ts: "never", tsx: "never",
|
||||
}],
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ export function handleResponse(responseType: ResponseType, responseData: string)
|
|||
|
||||
if (callback) {
|
||||
callback(responseData);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
console.error(`Received a Response of type "${responseType}" but no handler was registered for it from the client.`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
client/web/src/types.d.ts
vendored
7
client/web/src/types.d.ts
vendored
|
|
@ -1,11 +1,12 @@
|
|||
declare module "*.vue" {
|
||||
import type { DefineComponent } from "vue"
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
import type { DefineComponent, DefineComponent } from "vue";
|
||||
|
||||
const component: DefineComponent;
|
||||
export default component;
|
||||
}
|
||||
|
||||
declare module "*.svg" {
|
||||
import type { DefineComponent } from "vue";
|
||||
|
||||
const component: DefineComponent;
|
||||
export default component;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue