Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MONITOR support and status icons for queries #4550

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
01d640d
ts progress
MaxLeiter May 2, 2022
8909d71
[ts-migrate][src] Init tsconfig.json file
MaxLeiter May 2, 2022
7640ef7
[ts-migrate][src] Init tsconfig.json file
MaxLeiter May 2, 2022
53f0ad9
[ts-migrate][src] Init tsconfig.json file
MaxLeiter May 2, 2022
facde53
[ts-migrate][src] Rename files from JS/JSX to TS/TSX
MaxLeiter May 2, 2022
70fae2e
[ts-migrate][src] Init tsconfig.json file
MaxLeiter May 2, 2022
e2362c8
[ts-migrate][src] Rename files from JS/JSX to TS/TSX
MaxLeiter May 2, 2022
d164784
[ts-migrate][src] Init tsconfig.json file
MaxLeiter May 2, 2022
291ac3e
[ts-migrate][src] Rename files from JS/JSX to TS/TSX
MaxLeiter May 2, 2022
5bb94d6
ts progress
MaxLeiter May 2, 2022
c3e906c
gitignore client/dist
MaxLeiter May 2, 2022
4216035
progress?
MaxLeiter May 2, 2022
26cfa8d
progress?
MaxLeiter May 3, 2022
85507ce
progress?
MaxLeiter May 3, 2022
a7b9aa4
rebase on improved configs
MaxLeiter May 3, 2022
f52aa10
Fix some type errors, cleanup tsconfigs
MaxLeiter May 3, 2022
60f2532
tsconfig changes
MaxLeiter May 3, 2022
0ce8995
constants.js -> ts, more config cleanup
MaxLeiter May 3, 2022
a77c00b
add package.json to base tsconf files
MaxLeiter May 3, 2022
a3674b8
[ts-migrate][client] Init tsconfig.json file
MaxLeiter May 3, 2022
a799677
[ts-migrate][client] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
a0c05b9
[ts-migrate][client] Init tsconfig.json file
MaxLeiter May 3, 2022
0d2a33d
[ts-migrate][client] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
942f7b2
[ts-migrate][client] Init tsconfig.json file
MaxLeiter May 3, 2022
8037804
[ts-migrate][client] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
0448765
[ts-migrate][test] Init tsconfig.json file
MaxLeiter May 3, 2022
c4bf69b
[ts-migrate][client] Init tsconfig.json file
MaxLeiter May 3, 2022
a4b0a1d
[ts-migrate][client] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
1560b07
[ts-migrate][client] Run TS Migrate
MaxLeiter May 3, 2022
36e7a61
[ts-migrate][client] Init tsconfig.json file
MaxLeiter May 3, 2022
3a7c900
[ts-migrate][test] Init tsconfig.json file
MaxLeiter May 3, 2022
f4be908
[ts-migrate][test] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
bdf0fcd
client, some tests, eslint
MaxLeiter May 3, 2022
3de58c5
[ts-migrate][test] Init tsconfig.json file
MaxLeiter May 3, 2022
303c6ae
[ts-migrate][test] Rename files from JS/JSX to TS/TSX
MaxLeiter May 3, 2022
ed02acf
more tests, eslint work
MaxLeiter May 3, 2022
034a247
client webpack progress
MaxLeiter May 3, 2022
5e0cbe5
add types node to root tsconfig
MaxLeiter May 3, 2022
bed7cc0
Fix webpack building
MaxLeiter May 4, 2022
2693a76
ts-node building; for some reason it doesn't read the base config
MaxLeiter May 4, 2022
aa2e5b6
Update tsconfig.base.json (#4563)
nemchik May 4, 2022
6de13b6
progress moving types out of types/
MaxLeiter May 4, 2022
a607924
yarn dev running, need to address type errors
MaxLeiter May 4, 2022
1d2dc40
fix yarn build and start
MaxLeiter May 5, 2022
1da8291
Cleanup configs (WIP) (#4565)
nemchik May 6, 2022
a06bc90
Add src/dist to prettier/eslint ignores, apply lint, webpack adjustments
MaxLeiter May 7, 2022
b798cfd
Ts more configs again (#4567)
nemchik May 7, 2022
4c98b81
some test fixes
MaxLeiter May 14, 2022
aace970
progress before vue 3
MaxLeiter May 22, 2022
f37d82d
vue 3 progress
MaxLeiter May 23, 2022
52c13f4
progress
MaxLeiter May 23, 2022
f189e97
Chat is rendering
MaxLeiter May 23, 2022
4740d1d
fix sidebar buttons, channel loading, parting in ctxt menu
MaxLeiter May 24, 2022
9a57e21
Fix image viewer, reset parse typings for now, fix loading messages o…
MaxLeiter May 30, 2022
ca6ae93
Fix some tests / linting
MaxLeiter May 30, 2022
8772f28
Fix auth plugins on production
MaxLeiter May 30, 2022
a804b7c
sqlite logging
MaxLeiter May 30, 2022
c4dea35
Fix changing password form, session storage
MaxLeiter May 30, 2022
a7344b8
Fix uploading on the client, add init socket type
MaxLeiter May 31, 2022
027ab3b
more logging for message storage
MaxLeiter May 31, 2022
a1659e1
add @babel/plugin-transform-runtime, fix scrolling on chan switch/his…
MaxLeiter May 31, 2022
314ff77
fix watching channel changing
MaxLeiter May 31, 2022
b8e04ad
Fix mention loading, progresson mocha
MaxLeiter May 31, 2022
b10ef53
remove jsdom
MaxLeiter May 31, 2022
9e14165
Fix mentions loading x2
MaxLeiter May 31, 2022
16c6bcf
Fix search results not loading at bottom of chat
MaxLeiter May 31, 2022
cff9209
fix joining channels from net form(?), major progress in tests
MaxLeiter May 31, 2022
21b52a9
linting
MaxLeiter May 31, 2022
afba008
Fix package commands by adding .argument() call
MaxLeiter May 31, 2022
96aa50c
Fix types in client/keybinds
MaxLeiter May 31, 2022
3d4d29b
linting
MaxLeiter May 31, 2022
c682550
Fix UserConfig type in clientManager
MaxLeiter May 31, 2022
4f41d80
Replace as string with String constructor
MaxLeiter May 31, 2022
ade6269
Add more socketio types
MaxLeiter May 31, 2022
db5eae4
Fix user test
MaxLeiter May 31, 2022
8f27e03
Fix sqlite tests?
MaxLeiter May 31, 2022
03eadf0
Add separate yarn lint command
MaxLeiter May 31, 2022
ba3c616
bump eslint, fix tsconfig helper issue
MaxLeiter Jun 1, 2022
7301436
Possibly fix one reason tests fail
MaxLeiter Jun 1, 2022
5b4166f
Fix focusing on topic when using ctx menu Edit Topic action
MaxLeiter Jun 1, 2022
cb0c622
Work on LDAP tests
MaxLeiter Jun 1, 2022
592a976
Fix eslint in commands/join
MaxLeiter Jun 1, 2022
7b24050
Attempt to fix webpack globs on windows
MaxLeiter Jun 1, 2022
d42232a
Fix image viewer with back button, join message spacing
MaxLeiter Jun 1, 2022
ee88719
Cleaup webpack config
MaxLeiter Jun 1, 2022
19d5beb
Replace vetur with volar, small types cleanup
MaxLeiter Jun 1, 2022
8606d71
Fix whitespace in client components
MaxLeiter Jun 2, 2022
5283d10
Add MONITOR support and status icons for queries
MaxLeiter Jun 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .eslintignore
@@ -1,2 +1,4 @@
public/
coverage/
src/dist/
dist/
134 changes: 120 additions & 14 deletions .eslintrc.cjs
@@ -1,14 +1,18 @@
module.exports = {
root: true,
// @ts-check
const {defineConfig} = require("eslint-define-config");

const projects = defineConfig({
parserOptions: {
ecmaVersion: 2022,
},
env: {
es6: true,
browser: true,
mocha: true,
node: true,
project: [
"./tsconfig.json",
"./client/tsconfig.json",
"./src/tsconfig.json",
"./test/tsconfig.json",
],
},
}).parserOptions.project;

const baseRules = defineConfig({
rules: {
"block-scoped-var": "error",
curly: ["error", "all"],
Expand All @@ -23,7 +27,6 @@ module.exports = {
"no-else-return": "error",
"no-implicit-globals": "error",
"no-restricted-globals": ["error", "event", "fdescribe"],
"no-shadow": "error",
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"no-useless-computed-key": "error",
Expand Down Expand Up @@ -62,18 +65,121 @@ module.exports = {
"spaced-comment": ["error", "always"],
strict: "off",
yoda: "error",
},
}).rules;

const vueRules = defineConfig({
rules: {
"import/no-default-export": 0,
"import/unambiguous": 0, // vue SFC can miss script tags
"@typescript-eslint/prefer-readonly": 0, // can be used in template
"vue/component-tags-order": [
"error",
{
order: ["template", "style", "script"],
},
],
"vue/multi-word-component-names": "off",
"vue/no-mutating-props": "off",
"vue/no-v-html": "off",
"vue/require-default-prop": "off",
"vue/v-slot-style": ["error", "longform"],
"vue/multi-word-component-names": "off",
// Should be fixable in Vue 3 / when components use Vue.extend()
"@typescript-eslint/unbound-method": "off",
},
}).rules;

const tsRules = defineConfig({
rules: {
// note you must disable the base rule as it can report incorrect errors
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
},
}).rules;

const tsRulesTemp = defineConfig({
rules: {
// TODO: eventually remove these
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unused-vars": "off",
},
}).rules;

module.exports = defineConfig({
root: true,
parserOptions: {
ecmaVersion: 2022,
},
overrides: [
{
files: ["**/*.ts", "**/*.vue"],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: projects,
extraFileExtensions: [".vue"],
},
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
rules: {
...baseRules,
...tsRules,
...tsRulesTemp,
},
},
// TODO: verify
{
files: ["**/*.vue"],
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2022,
ecmaFeatures: {
jsx: true,
},
parser: "@typescript-eslint/parser",
tsconfigRootDir: __dirname,
project: projects,
},
plugins: ["vue"],
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
rules: {...baseRules, ...tsRules, ...tsRulesTemp, ...vueRules},
},
{
files: ["./tests/**/*.ts"],
parser: "@typescript-eslint/parser",
rules: {
// TODO: remove these
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/restrict-plus-operands": "off",
},
},
],
env: {
es6: true,
browser: true,
mocha: true,
node: true,
},
plugins: ["vue"],
extends: ["eslint:recommended", "plugin:vue/recommended", "prettier"],
};
extends: ["eslint:recommended", "prettier"],
rules: baseRules,
});
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -6,3 +6,6 @@ package-lock.json

coverage/
public/
client/dist
src/dist
dist/
6 changes: 3 additions & 3 deletions .npmignore
Expand Up @@ -9,9 +9,9 @@
# Ignore client folder as it's being built into public/ folder
# except for the specified files which are used by the server
client/**
!client/js/constants.js
!client/js/helpers/ircmessageparser/findLinks.js
!client/js/helpers/ircmessageparser/cleanIrcMessage.js
!client/js/constants.ts
!client/js/helpers/ircmessageparser/findLinks.ts
!client/js/helpers/ircmessageparser/cleanIrcMessage.ts
!client/index.html.tpl

public/js/bundle.vendor.js.map
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Expand Up @@ -3,7 +3,8 @@ public/
test/fixtures/.thelounge/logs/
test/fixtures/.thelounge/certificates/
test/fixtures/.thelounge/storage/

src/dist/
dist/
*.log
*.png
*.svg
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Expand Up @@ -3,7 +3,8 @@
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"octref.vetur"
"Vue.volar",
"Vue.vscode-typescript-vue-plugin"
],
"unwantedRecommendations": []
}
1 change: 0 additions & 1 deletion .vscode/settings.json
@@ -1,6 +1,5 @@
{
"editor.formatOnSave": true,
"vetur.format.enable": false,
"prettier.useEditorConfig": true,
"prettier.requireConfig": true,
"prettier.disableLanguages": [],
Expand Down
9 changes: 8 additions & 1 deletion babel.config.cjs
@@ -1,3 +1,10 @@
module.exports = {
presets: [["@babel/env"]],
presets: [
["@babel/preset-env", {bugfixes: true}],
"babel-preset-typescript-vue3",
"@babel/preset-typescript", // ? babel-preset-typescript-vue should be a drop-in replacement for @babel/typescript with vue support
// "@vue/babel-preset-jsx",
],
plugins: ["@babel/plugin-transform-runtime"],
targets: "> 0.25%, not dead",
};