Skip to content

Commit

Permalink
chore(web): upgrade eslint and config (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Aug 27, 2024
1 parent 51bfe8b commit 0395c4c
Show file tree
Hide file tree
Showing 600 changed files with 11,082 additions and 5,987 deletions.
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"golang.go",
"redhat.vscode-yaml"
"redhat.vscode-yaml",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
29 changes: 21 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"go.testEnvFile": "${workspaceRoot}/.env",
"go.lintTool": "golangci-lint",
"editor.formatOnSave": true,
"yaml.format.enable": false,
"yaml.completion": true,
"yaml.validate": true,
Expand All @@ -17,20 +16,34 @@
},
"json.schemas": [
{
"fileMatch": [
"/server/pkg/builtin/manifest.json"
],
"fileMatch": ["/server/pkg/builtin/manifest.json"],
"url": "./server/schemas/plugin_manifest.json"
},
{
"fileMatch": [
"/server/pkg/builtin/manifest_*.json"
],
"fileMatch": ["/server/pkg/builtin/manifest_*.json"],
"url": "./server/schemas/plugin_manifest_translation.json"
}
],
"[yaml]": {
"editor.formatOnSave": false
},
"prettier.enable": false
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"eslint.enable": true,
"eslint.useFlatConfig": true,
"prettier.enable": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
7 changes: 0 additions & 7 deletions web/.eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions web/.eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion web/.huskyrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"hooks": {
"pre-commit": "lint-staged"
}
}
}
2 changes: 2 additions & 0 deletions web/.prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
package.json
**/__gen__/**
src/services/i18n/translations/*.yml
7 changes: 5 additions & 2 deletions web/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<style>
/* enable page scroll for docs page */
body:has(#storybook-docs .sbdocs){
body:has(#storybook-docs .sbdocs) {
overflow-y: auto !important;
}
</style>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap" rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap"
rel="stylesheet"
/>
5 changes: 2 additions & 3 deletions web/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
ApolloProvider,
ApolloClient,
Expand All @@ -21,7 +20,7 @@ import theme from "./theme";
const mockClient = new ApolloClient({
link: new ApolloLink(
() =>
new Observable(observer => {
new Observable((observer) => {
observer.complete();
}),
),
Expand Down Expand Up @@ -53,7 +52,7 @@ const preview: Preview = {
Provider: ThemeProvider,
GlobalStyles,
}),
Story => {
(Story) => {
return (
<ApolloProvider client={mockClient}>
<I18nProvider>
Expand Down
2 changes: 1 addition & 1 deletion web/.storybook/public/plugins/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ reearth.ui.show(html);
reearth.on("update", () => {
reearth.ui.postMessage(reearth.block);
});
reearth.on("message", msg => {
reearth.on("message", (msg) => {
console.log("message received:", msg);
});
Loading

0 comments on commit 0395c4c

Please sign in to comment.