-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
8,271 additions
and
29,164 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ server/prosody.pid | |
!.gitkeep | ||
!.editorconfig | ||
!.gitignore | ||
!.travis.yml | ||
|
||
npm-debug.log | ||
lerna-debug.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules/ | |
**/dist/*.js | ||
bundle.js | ||
server/prosody-modules/ | ||
|
||
/.nx/workspace-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.