Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Dec 12, 2024
1 parent 87ad93f commit d7d8091
Show file tree
Hide file tree
Showing 47 changed files with 5,242 additions and 3,662 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

76 changes: 0 additions & 76 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ server/prosody.pid
!.gitkeep
!.editorconfig
!.gitignore
!.travis.yml

npm-debug.log
lerna-debug.log
Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

BRANCH="$(git rev-parse --abbrev-ref HEAD)"

if [[ "$BRANCH" == "main" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
**/dist/*.js
bundle.js
server/prosody-modules/

/.nx/workspace-data
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
setup:
node packages/xmpp.js/script.js
npm install
./node_modules/.bin/lerna bootstrap
cd packages/xmpp.js/ && npm run prepublish
node bundle.js

Expand All @@ -13,15 +12,13 @@ lint:
test:
cd packages/xmpp.js/ && npm run prepublish
npm install
./node_modules/.bin/lerna bootstrap
node bundle.js
./node_modules/.bin/ava
make lint
make bundlesize

ci:
npm install
./node_modules/.bin/lerna bootstrap
./node_modules/.bin/ava
make lint
make restart
Expand Down
97 changes: 97 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import globals from "globals";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import eslintNodePlugin from "eslint-plugin-n";
import pluginPromise from "eslint-plugin-promise";

export default [
{
ignores: [
"**/dist/*.js",
"bundle.js",
"packages/xmpp.js/index.js",
"ava.config.js",
"e2e.config.js",
"eslint.config.mjs",
],
},
js.configs.recommended,
eslintPluginUnicorn.configs["flat/recommended"],
eslintNodePlugin.configs["flat/recommended-script"],
pluginPromise.configs["flat/recommended"],
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.builtin,
...globals["shared-node-browser"],
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
sourceType: "script",
},

rules: {
strict: ["error", "global"],
"no-empty": ["error", { allowEmptyCatch: true }],
// "no-multi-assign": 0,
"func-names": ["error", "as-needed"],
"operator-linebreak": [
"error",
"after",
{ overrides: { "?": "before", ":": "before" } },
],
"capitalized-comments": 0,
"prefer-rest-params": ["error"],
"prefer-spread": ["error"],
"prefer-destructuring": [
"error",
{
array: false,
object: true,
},
],
"prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
"no-redeclare": ["error", { builtinGlobals: false }],

// node
// https://github.com/eslint-community/eslint-plugin-n/
"n/no-unpublished-require": 0, // doesn't play nice with monorepo
"n/no-extraneous-require": [
"error",
{ allowModules: ["ava", "sinon", "@xmpp/test"] },
],

// promise
// https://github.com/xjamundx/eslint-plugin-promise
// promise/prefer-await-to-then: [error]
// promise/prefer-await-to-callbacks: [error]
// unicorn https://github.com/sindresorhus/eslint-plugin-unicorn

// unicorn
// https://github.com/sindresorhus/eslint-plugin-unicorn
"unicorn/filename-case": 0,
"unicorn/catch-error-name": ["error", { name: "err" }],
"unicorn/prevent-abbreviations": 0,
"unicorn/prefer-number-properties": 0,
"unicorn/no-useless-undefined": 0,
"unicorn/no-null": 0,
"unicorn/prefer-module": 0,
"unicorn/numeric-separators-style": 0, // Requires Node.js 12.8
"unicorn/prefer-event-target": 0,
"unicorn/prefer-top-level-await": 0,
"unicorn/prefer-node-protocol": 0,
},
},
{
files: ["server/ctl.js"],
rules: {
"n/no-unsupported-features/es-syntax": "off",
"n/no-unsupported-features/es-syntax": "off",
},
},
];
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"version": "0.13.1",
"useWorkspaces": true,
"packages": ["packages/*"],
"command": {
"publish": {
Expand All @@ -15,5 +14,6 @@
"*.test.js"
]
}
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading

0 comments on commit d7d8091

Please sign in to comment.