diff --git a/.editorconfig b/.editorconfig index 770fafd6..d18cc919 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,6 +16,6 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false -[*.{json,yml}] +[*.{json,md,yml}] indent_style = space indent_size = 2 diff --git a/.eslintrc.yml b/.eslintrc.yml index 8710ad9e..05068e87 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,5 +1,4 @@ --- - root: true parserOptions: @@ -28,19 +27,29 @@ rules: eqeqeq: error handle-callback-err: error indent: [error, tab] - key-spacing: [error, {beforeColon: false, afterColon: true}] - keyword-spacing: [error, {before: true, after: true}] + key-spacing: + - error + - beforeColon: false + afterColon: true + keyword-spacing: + - error + - before: true + after: true linebreak-style: [error, unix] no-alert: error no-catch-shadow: error - no-confusing-arrow: [error, {allowParens: true}] + no-confusing-arrow: + - error + - allowParens: true no-control-regex: off no-console: error no-duplicate-imports: error no-else-return: error no-implicit-globals: error no-multi-spaces: error - no-multiple-empty-lines: [error, { "max": 1 }] + no-multiple-empty-lines: + - error + - max: 1 no-shadow: error no-template-curly-in-string: error no-trailing-spaces: error @@ -48,7 +57,9 @@ rules: no-useless-computed-key: error no-useless-constructor: error no-useless-return: error - no-use-before-define: [error, {functions: false}] + no-use-before-define: + - error + - functions: false no-var: error object-curly-spacing: [error, never] object-shorthand: diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 664876da..62ac1fcd 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -28,6 +28,6 @@ your contributions. Pope's guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). - Each PR will be reviewed by at least two different project maintainers. You can read more about this in the [maintainers' -corner](https://github.com/thelounge/thelounge/wiki/Maintainers'-corner). + corner](https://github.com/thelounge/thelounge/wiki/Maintainers'-corner). - Please document any relevant changes in the documentation that can be found [in its own repository](https://github.com/thelounge/thelounge.chat). diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md index 26aed90a..f54b7f6b 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -1,15 +1,13 @@ --- name: Bug Report about: Create a bug report - --- -* *Node version:* -* *Browser version:* -* *Device, operating system:* -* *The Lounge version:* +- _Node version:_ +- _Browser version:_ +- _Device, operating system:_ +- _The Lounge version:_ --- - diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md index 473d18b6..3649f03b 100644 --- a/.github/ISSUE_TEMPLATE/Feature_Request.md +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -1,7 +1,6 @@ --- name: Feature Request about: Request a new feature - --- diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..08d66ad2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,27 @@ +coverage/ +public/ +test/fixtures/.thelounge/logs/ +test/fixtures/.thelounge/storage/ + +*.log +*.png +*.svg +*.ico +*.wav +*.tpl +*.sh +*.opts +*.txt +yarn.lock +.gitignore +.npmrc +.npmignore +.prettierignore +.thelounge_home +.editorconfig +.eslintignore +.gitattributes + +*.css +*.js +*.vue diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 00000000..659327e6 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,7 @@ +arrowParens: always +bracketSpacing: false +trailingComma: "es5" +overrides: + - files: "*.webmanifest" + options: + parser: json diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cc29afb..f42cafa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,9 @@ Minor release to fix an issue where v3.1.0 fails to install on Linux/macOS using For more details, [see the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.1...v3.1.0) and [milestone](https://github.com/thelounge/thelounge/milestone/30?closed=1). -This is the first release that includes a largely rewritten frontend, which is built on top of the Vue.js framework! +This is the first release that includes a largely rewritten frontend, which is built on top of the Vue.js framework! We have started slowly transitioning the frontend to use Vue.js, which allows us to structure the code in a better fashion -and to remove all the hacks related to keeping the state in the DOM using jQuery data attributes. +and to remove all the hacks related to keeping the state in the DOM using jQuery data attributes. This paves the road for future support of client customization and a plugin system. While this release is mostly related to the rewrite, there are many user facing changes and improvements in this release! @@ -43,10 +43,10 @@ While this release is mostly related to the rewrite, there are many user facing - Input history is also per-channel now. ([#2791](https://github.com/thelounge/thelounge/pull/2791)) - Collapsing a network stays in active channel (and the active channel is still visible in the list) - Collapsed networks still show channels with highlights. ([#2223](https://github.com/thelounge/thelounge/pull/2223)) -- Client commands are refactored and `/join` can assume current channel. ([#2004](https://github.com/thelounge/thelounge/pull/2004)) ([#2281](https://github.com/thelounge/thelounge/pull/2281)) ([#2266](https://github.com/thelounge/thelounge/pull/2266)) -- Channel `/list` persists on page reloads. ([#2249](https://github.com/thelounge/thelounge/pull/2249)) +- Client commands are refactored and `/join` can assume current channel. ([#2004](https://github.com/thelounge/thelounge/pull/2004)) ([#2281](https://github.com/thelounge/thelounge/pull/2281)) ([#2266](https://github.com/thelounge/thelounge/pull/2266)) +- Channel `/list` persists on page reloads. ([#2249](https://github.com/thelounge/thelounge/pull/2249)) - Message parser now returns Vue elements (via createElement) instead of raw html content (no more manual escaping!) -- Message parser now actually accepts` CHANTYPES` and `PREFIX` from network. ([#443](https://github.com/thelounge/thelounge/pull/443)) +- Message parser now actually accepts `CHANTYPES` and `PREFIX` from network. ([#443](https://github.com/thelounge/thelounge/pull/443)) - Hidden status messages are no longer rendered in DOM. ([#813](https://github.com/thelounge/thelounge/pull/813)) - Channel state is synchronised to the client (and is displayed). ([#2245](https://github.com/thelounge/thelounge/pull/2245)) - Chat input is no longer disabled when disconnected (still can't submit though) @@ -182,7 +182,7 @@ yarn global add thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.1.0-pre.2...v3.1.0-pre.3) This is a pre-release for v3.1.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -197,7 +197,7 @@ yarn global add thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.1.0-pre.1...v3.1.0-pre.2) This is a pre-release for v3.1.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -212,7 +212,7 @@ yarn global add thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.1...v3.1.0-pre.1) This is a pre-release for v3.1.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -226,7 +226,7 @@ yarn global add thelounge@next This patch release fixes a few small things that made it to the previous release. -It includes fixes for issues related to: reconnecting when a nickname is already in use, unnecessary highlights on invites, the auto-expandable message input, channels starting with `&` or `+`, the ` /disconnect` command, and file uploads. Additionnally, `part` messages for the current user are now logged. +It includes fixes for issues related to: reconnecting when a nickname is already in use, unnecessary highlights on invites, the auto-expandable message input, channels starting with `&` or `+`, the `/disconnect` command, and file uploads. Additionnally, `part` messages for the current user are now logged. A more comprehensive list of changes is available below. @@ -477,7 +477,7 @@ _One more thing: we started [an Open Collective](https://opencollective.com/thel - Add "User information" (`whois`) support to the sidebar context menu ([#2587](https://github.com/thelounge/thelounge/pull/2587) by [@aspotton](https://github.com/aspotton)) - Implement `irc://` and `ircs://` protocol handlers ([#2571](https://github.com/thelounge/thelounge/pull/2571) by [@xPaw](https://github.com/xPaw)) - Add file uploading support ([#2552](https://github.com/thelounge/thelounge/pull/2552) by [@MaxLeiter](https://github.com/MaxLeiter), [#2743](https://github.com/thelounge/thelounge/pull/2743), [#2744](https://github.com/thelounge/thelounge/pull/2744), [#2748](https://github.com/thelounge/thelounge/pull/2748), -[#2749](https://github.com/thelounge/thelounge/pull/2749), [#2851](https://github.com/thelounge/thelounge/pull/2851), [#2985](https://github.com/thelounge/thelounge/pull/2985) by [@xPaw](https://github.com/xPaw), [#2983](https://github.com/thelounge/thelounge/pull/2983) by [@astorije](https://github.com/astorije)) + [#2749](https://github.com/thelounge/thelounge/pull/2749), [#2851](https://github.com/thelounge/thelounge/pull/2851), [#2985](https://github.com/thelounge/thelounge/pull/2985) by [@xPaw](https://github.com/xPaw), [#2983](https://github.com/thelounge/thelounge/pull/2983) by [@astorije](https://github.com/astorije)) ### Changed @@ -487,7 +487,7 @@ _One more thing: we started [an Open Collective](https://opencollective.com/thel - Improve monospace formatting in messages ([#2031](https://github.com/thelounge/thelounge/pull/2031) by [@astorije](https://github.com/astorije)) - Switch default home location to `~/.thelounge` ([#1734](https://github.com/thelounge/thelounge/pull/1734) by [@astorije](https://github.com/astorije)) - Report server errors when preview fetch fails ([#2036](https://github.com/thelounge/thelounge/pull/2036) by [@xPaw](https://github.com/xPaw)) -- Relay client's preferred language in link preview requests ([#1918](https://github.com/thelounge/thelounge/pull/1918) by [@williamboman](https://github.com/williamboman)) +- Relay client's preferred language in link preview requests ([#1918](https://github.com/thelounge/thelounge/pull/1918) by [@williamboman](https://github.com/williamboman)) - Allow generating random numbers in nick on page load ([#2090](https://github.com/thelounge/thelounge/pull/2090) by [@xPaw](https://github.com/xPaw)) - Word prefetch errors differently ([#2101](https://github.com/thelounge/thelounge/pull/2101) by [@xPaw](https://github.com/xPaw)) - Log socket close error if any ([#2108](https://github.com/thelounge/thelounge/pull/2108) by [@xPaw](https://github.com/xPaw)) @@ -551,8 +551,8 @@ _One more thing: we started [an Open Collective](https://opencollective.com/thel - `request` ([#2202](https://github.com/thelounge/thelounge/pull/2202), [#2454](https://github.com/thelounge/thelounge/pull/2454), [#2698](https://github.com/thelounge/thelounge/pull/2698)) - `sqlite3` ([#2238](https://github.com/thelounge/thelounge/pull/2238), [#2584](https://github.com/thelounge/thelounge/pull/2584), [#2651](https://github.com/thelounge/thelounge/pull/2651), [#2863](https://github.com/thelounge/thelounge/pull/2863), [#2894](https://github.com/thelounge/thelounge/pull/2894), [#2972](https://github.com/thelounge/thelounge/pull/2972)) - `express` ([#2241](https://github.com/thelounge/thelounge/pull/2241), [#2844](https://github.com/thelounge/thelounge/pull/2844)) - - `socket.io` and `socketio-file-upload` ([#2310](https://github.com/thelounge/thelounge/pull/2310), [#2456](https://github.com/thelounge/thelounge/pull/2456), [#2911](https://github.com/thelounge/thelounge/pull/2911)), - [#2832](https://github.com/thelounge/thelounge/pull/2832), [#2868](https://github.com/thelounge/thelounge/pull/2868)) + - `socket.io` and `socketio-file-upload` ([#2310](https://github.com/thelounge/thelounge/pull/2310), [#2456](https://github.com/thelounge/thelounge/pull/2456), [#2911](https://github.com/thelounge/thelounge/pull/2911)), + [#2832](https://github.com/thelounge/thelounge/pull/2832), [#2868](https://github.com/thelounge/thelounge/pull/2868)) - `lodash` ([#2384](https://github.com/thelounge/thelounge/pull/2384), [#2772](https://github.com/thelounge/thelounge/pull/2772)) - `fs-extra` ([#2410](https://github.com/thelounge/thelounge/pull/2410), [#2450](https://github.com/thelounge/thelounge/pull/2450), [#2654](https://github.com/thelounge/thelounge/pull/2654), [#2893](https://github.com/thelounge/thelounge/pull/2893)) - `ua-parser-js` ([#2422](https://github.com/thelounge/thelounge/pull/2422), [#2873](https://github.com/thelounge/thelounge/pull/2873)) @@ -734,7 +734,7 @@ On the [website repository](https://github.com/thelounge/thelounge.github.io): - Update Bootstrap to be able to use collapsible components (for navigation) and minify it ([#102](https://github.com/thelounge/thelounge.github.io/pull/102) by [@astorije](https://github.com/astorije)) - Search feature ([#101](https://github.com/thelounge/thelounge.github.io/pull/101) by [@astorije](https://github.com/astorije), [#185](https://github.com/thelounge/thelounge.github.io/pull/185) by [@xPaw](https://github.com/xPaw)) - Make `16px` favicon sharper ([#105](https://github.com/thelounge/thelounge.github.io/pull/105) by [@xPaw](https://github.com/xPaw)) -- Add security headers ([#107](https://github.com/thelounge/thelounge.github.io/pull/107) by [@xPaw](https://github.com/xPaw)) +- Add security headers ([#107](https://github.com/thelounge/thelounge.github.io/pull/107) by [@xPaw](https://github.com/xPaw)) - Use Muli font for the site ([#106](https://github.com/thelounge/thelounge.github.io/pull/106) by [@xPaw](https://github.com/xPaw)) - Rewrite install docs ([#104](https://github.com/thelounge/thelounge.github.io/pull/104) by [@astorije](https://github.com/astorije), [#191](https://github.com/thelounge/thelounge.github.io/pull/191) by [@GewoonYorick](https://github.com/GewoonYorick)) - Update configuration doc with the config generated from the main repo (to master) ([#109](https://github.com/thelounge/thelounge.github.io/pull/109), [`abc0aba`](https://github.com/thelounge/thelounge.github.io/commit/abc0aba03b3d562c163b1a3eff0ee0195f7935ef) by [@xPaw](https://github.com/xPaw), [#184](https://github.com/thelounge/thelounge.github.io/pull/184) by [@MaxLeiter](https://github.com/MaxLeiter)) @@ -980,7 +980,7 @@ yarn global add thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.7...v3.0.0-pre.8) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -995,7 +995,7 @@ yarn global add thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.6...v3.0.0-pre.7) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1010,7 +1010,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.5...v3.0.0-pre.6) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1025,7 +1025,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.4...v3.0.0-pre.5) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1040,7 +1040,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.3...v3.0.0-pre.4) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1055,7 +1055,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.2...v3.0.0-pre.3) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1070,7 +1070,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v3.0.0-pre.1...v3.0.0-pre.2) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1085,7 +1085,7 @@ npm install -g thelounge@next [See the full changelog](https://github.com/thelounge/thelounge/compare/v2.7.1...v3.0.0-pre.1) This is a pre-release for v3.0.0 to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released. +At this stage, features may still be added or modified until the first release candidate for this version gets released. Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. @@ -1257,7 +1257,6 @@ The CLI has also been improved: - All options for the `start` command are being removed, replaced with the `--config`/`-c` option mentioned above. For example, `--public` becomes `-c public=true`, `--port 9001` becomes `-c port=9001`, etc. - Referring to themes in the `theme` option of the configuration file is now done through their name, not their CSS file name. - And finally... **The Lounge has its own logo!** 🎉
@@ -1269,7 +1268,7 @@ We will start rolling out our new logo in all the relevant places as of The Loun ### Added -- Link and color nicks mentioned in messages ([#1709](https://github.com/thelounge/thelounge/pull/1709), [#1758](https://github.com/thelounge/thelounge/pull/1758) by [@MaxLeiter](https://github.com/MaxLeiter), [#1779](https://github.com/thelounge/thelounge/pull/1779), [#1901](https://github.com/thelounge/thelounge/pull/1901) by [@xPaw](https://github.com/xPaw)) +- Link and color nicks mentioned in messages ([#1709](https://github.com/thelounge/thelounge/pull/1709), [#1758](https://github.com/thelounge/thelounge/pull/1758) by [@MaxLeiter](https://github.com/MaxLeiter), [#1779](https://github.com/thelounge/thelounge/pull/1779), [#1901](https://github.com/thelounge/thelounge/pull/1901) by [@xPaw](https://github.com/xPaw)) - Detect `image/webp` as an image ([#1753](https://github.com/thelounge/thelounge/pull/1753) by [@xPaw](https://github.com/xPaw)) - Implement strikethrough and monospace formatting ([#1792](https://github.com/thelounge/thelounge/pull/1792) by [@grissly-man](https://github.com/grissly-man), [#1814](https://github.com/thelounge/thelounge/pull/1814) by [@xPaw](https://github.com/xPaw)) - Add the user's actual IP in the result of `/whois` ([#1788](https://github.com/thelounge/thelounge/pull/1788) by [@PolarizedIons](https://github.com/PolarizedIons)) @@ -1771,7 +1770,7 @@ On the [website repository](https://github.com/thelounge/thelounge.chat): - Move even more code out of `lounge.js` ([#1500](https://github.com/thelounge/thelounge/pull/1500) by [@xPaw](https://github.com/xPaw)) - Remove unnecessary `end()` calls ([#1518](https://github.com/thelounge/thelounge/pull/1518) by [@xPaw](https://github.com/xPaw)) - Move user log function where it belongs ([#1528](https://github.com/thelounge/thelounge/pull/1528), [#1585](https://github.com/thelounge/thelounge/pull/1585) by [@xPaw](https://github.com/xPaw), [#1535](https://github.com/thelounge/thelounge/pull/1535) by [@astorije](https://github.com/astorije)) -- Enable `no-console` and `no-alert` ESLint rules ([#1538](https://github.com/thelounge/thelounge/pull/1538) by [@astorije](https://github.com/astorije)) +- Enable `no-console` and `no-alert` ESLint rules ([#1538](https://github.com/thelounge/thelounge/pull/1538) by [@astorije](https://github.com/astorije)) - Use `Mousetrap` for image viewer shortcuts ([#1566](https://github.com/thelounge/thelounge/pull/1566) by [@astorije](https://github.com/astorije)) - Remove `event-stream` dependency in favor of plain `Buffers` ([#1554](https://github.com/thelounge/thelounge/pull/1554) by [@astorije](https://github.com/astorije)) - Skip cleanup on Travis ([`da31317`](https://github.com/thelounge/thelounge/commit/da31317156047000819fa0363c435005104aa572) by [@xPaw](https://github.com/xPaw)) @@ -2444,7 +2443,7 @@ Enjoy! - Strict mode for all JS files ([#684](https://github.com/thelounge/thelounge/pull/684) by [@astorije](https://github.com/astorije)) - Enforce more ESLint rules ([#681](https://github.com/thelounge/thelounge/pull/681) by [@xPaw](https://github.com/xPaw)) - Use CI caches for downloaded files instead of installed ones ([#687](https://github.com/thelounge/thelounge/pull/687) by [@astorije](https://github.com/astorije)) -- Consolidate version numbers throughout all interfaces ([#592](https://github.com/thelounge/thelounge/pull/592) by [@williamboman](https://github.com/williamboman)) +- Consolidate version numbers throughout all interfaces ([#592](https://github.com/thelounge/thelounge/pull/592) by [@williamboman](https://github.com/williamboman)) - Replace lodash's each/map with ES5 native forEach/map ([#689](https://github.com/thelounge/thelounge/pull/689) by [@astorije](https://github.com/astorije)) ### Removed diff --git a/README.md b/README.md index 0d95edbf..524eceae 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,11 @@ ## Overview -* **Modern features brought to IRC.** Push notifications, link previews, new message markers, and more bring IRC to the 21st century. -* **Always connected.** Remains connected to IRC servers while you are offline. -* **Cross platform.** It doesn't matter what OS you use, it just works wherever Node.js runs. -* **Responsive interface.** The client works smoothly on every desktop, smartphone and tablet. -* **Synchronized experience.** Always resume where you left off no matter what device. +- **Modern features brought to IRC.** Push notifications, link previews, new message markers, and more bring IRC to the 21st century. +- **Always connected.** Remains connected to IRC servers while you are offline. +- **Cross platform.** It doesn't matter what OS you use, it just works wherever Node.js runs. +- **Responsive interface.** The client works smoothly on every desktop, smartphone and tablet. +- **Synchronized experience.** Always resume where you left off no matter what device. To learn more about configuration, usage and features of The Lounge, take a look at [the website](https://thelounge.chat). diff --git a/client/thelounge.webmanifest b/client/thelounge.webmanifest index 7ea53850..a39985c2 100644 --- a/client/thelounge.webmanifest +++ b/client/thelounge.webmanifest @@ -6,8 +6,7 @@ "display": "standalone", "theme_color": "#415363", "background_color": "#415363", - "icons": - [ + "icons": [ { "src": "img/logo-grey-bg-120x120px.png", "type": "image/png", diff --git a/package.json b/package.json index a5ce9728..9bd51cc1 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,16 @@ "homepage": "https://thelounge.chat/", "scripts": { "build": "webpack", - "coverage": "run-s test:{client,server} && nyc --nycrc-path=test/.nycrc-report report", + "coverage": "run-s test:{client,server} && nyc --nycrc-path=test/.nycrc-report.json report", "dev": "run-p watch start", - "lint:css": "stylelint --color \"client/**/*.css\"", - "lint:js": "eslint . --ext .js,.vue --report-unused-disable-directives --color", + "format:prettier": "prettier --write \"**/*.*\"", + "lint:eslint": "eslint . --ext .js,.vue --report-unused-disable-directives --color", + "lint:prettier": "prettier --list-different \"**/*.*\"", + "lint:stylelint": "stylelint --color \"client/**/*.css\"", "start": "node index start", "test": "run-p --aggregate-output --continue-on-error lint:* test:{client,server}", - "test:client": "nyc --nycrc-path=test/.nycrc-mochapack mochapack --colors --opts=test/mochapack.opts", - "test:server": "nyc --nycrc-path=test/.nycrc-mocha mocha --colors", + "test:client": "nyc --nycrc-path=test/.nycrc-mochapack.json mochapack --colors --opts=test/mochapack.opts", + "test:server": "nyc --nycrc-path=test/.nycrc-mocha.json mocha --colors", "watch": "webpack --watch" }, "keywords": [ @@ -89,6 +91,7 @@ "handlebars-loader": "1.7.1", "html-minifier": "4.0.0", "html-minifier-loader": "1.4.1", + "husky": "3.0.0", "intersection-observer": "0.7.0", "jquery": "3.4.1", "mini-css-extract-plugin": "0.8.0", @@ -98,6 +101,8 @@ "mousetrap": "1.6.3", "npm-run-all": "4.1.5", "nyc": "14.1.1", + "prettier": "1.18.2", + "pretty-quick": "1.11.1", "primer-tooltips": "2.0.0", "sinon": "7.3.2", "socket.io-client": "2.2.0", @@ -112,5 +117,10 @@ "vuedraggable": "2.23.0", "webpack": "4.35.3", "webpack-cli": "3.3.6" + }, + "husky": { + "hooks": { + "pre-commit": "pretty-quick --staged" + } } } diff --git a/renovate.json b/renovate.json index dae025dd..d78c2ea8 100644 --- a/renovate.json +++ b/renovate.json @@ -1,13 +1,7 @@ { - "extends": [ - "config:base" - ], - "ignorePaths": [ - "test/" - ], - "labels": [ - "Type: Dependencies" - ], + "extends": ["config:base"], + "ignorePaths": ["test/"], + "labels": ["Type: Dependencies"], "rebaseStalePrs": true, "statusCheckVerify": true } diff --git a/scripts/changelog.js b/scripts/changelog.js index 00fbadfc..fd919c26 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -104,7 +104,7 @@ ${prereleaseType(items.version) === "rc" ? Bugs may be fixed, but no further features will be added until the next stable version.` : `This is a pre-release for v${stableVersion(items.version)} to offer latest changes without having to wait for a stable release. - At this stage, features may still be added or modified until the first release candidate for this version gets released.` +At this stage, features may still be added or modified until the first release candidate for this version gets released.` } Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. diff --git a/test/.nycrc-mocha b/test/.nycrc-mocha deleted file mode 100644 index 3513a49c..00000000 --- a/test/.nycrc-mocha +++ /dev/null @@ -1,18 +0,0 @@ -{ - "all": true, - "instrument": true, - "temp-dir": "./node_modules/.cache/nyc_output", - "exclude": [ - "webpack.config*.js" - ], - "include": [ - "defaults", - "src", - "*.js" - ], - "reporter": [ - "json", - "text-summary" - ], - "clean": false -} diff --git a/test/.nycrc-mocha.json b/test/.nycrc-mocha.json new file mode 100644 index 00000000..a1891363 --- /dev/null +++ b/test/.nycrc-mocha.json @@ -0,0 +1,9 @@ +{ + "all": true, + "instrument": true, + "temp-dir": "./node_modules/.cache/nyc_output", + "exclude": ["webpack.config*.js"], + "include": ["defaults", "src", "*.js"], + "reporter": ["json", "text-summary"], + "clean": false +} diff --git a/test/.nycrc-mochapack b/test/.nycrc-mochapack deleted file mode 100644 index 23bc4681..00000000 --- a/test/.nycrc-mochapack +++ /dev/null @@ -1,11 +0,0 @@ -{ - "all": true, - "temp-dir": "./node_modules/.cache/nyc_output", - "include": [ - "client/" - ], - "reporter": [ - "json", - "text-summary" - ] -} diff --git a/test/.nycrc-mochapack.json b/test/.nycrc-mochapack.json new file mode 100644 index 00000000..544ab46b --- /dev/null +++ b/test/.nycrc-mochapack.json @@ -0,0 +1,6 @@ +{ + "all": true, + "temp-dir": "./node_modules/.cache/nyc_output", + "include": ["client/"], + "reporter": ["json", "text-summary"] +} diff --git a/test/.nycrc-report b/test/.nycrc-report.json similarity index 51% rename from test/.nycrc-report rename to test/.nycrc-report.json index f024305e..cbae273f 100644 --- a/test/.nycrc-report +++ b/test/.nycrc-report.json @@ -1,7 +1,4 @@ { "temp-dir": "./node_modules/.cache/nyc_output", - "reporter": [ - "lcov", - "text-summary" - ] + "reporter": ["lcov", "text-summary"] } diff --git a/test/client/index.html b/test/client/index.html index e5a89497..dc6f424b 100644 --- a/test/client/index.html +++ b/test/client/index.html @@ -1,11 +1,11 @@ -
- -