Add editor and eslint configs
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": false,
|
||||||
|
"node": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"extends": "airbnb-base",
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaVersion": 8
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"import"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"indent": ["error", "tab", {
|
||||||
|
"FunctionDeclaration": {
|
||||||
|
"parameters": 2,
|
||||||
|
"body": 1
|
||||||
|
},
|
||||||
|
"FunctionExpression": {
|
||||||
|
"parameters": 2,
|
||||||
|
"body": 1
|
||||||
|
},
|
||||||
|
"VariableDeclarator": 2,
|
||||||
|
"CallExpression": {
|
||||||
|
"arguments": 2
|
||||||
|
},
|
||||||
|
"MemberExpression": "off",
|
||||||
|
"ImportDeclaration": "first"
|
||||||
|
}],
|
||||||
|
"object-curly-newline": ["error", {
|
||||||
|
"minProperties": 5,
|
||||||
|
"consistent": true
|
||||||
|
}],
|
||||||
|
"one-var": ["error", {
|
||||||
|
"initialized": "never",
|
||||||
|
"uninitialized": "always"
|
||||||
|
}],
|
||||||
|
"one-var-declaration-per-line": ["error", "initializations"],
|
||||||
|
"quotes": ["error", "double"],
|
||||||
|
"semi": ["error", "never"],
|
||||||
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
|
"max-len": ["warn", 80],
|
||||||
|
"camelcase": ["error", {"properties": "always"}],
|
||||||
|
"space-before-function-paren": ["error", "never"],
|
||||||
|
"func-style": ["warn", "declaration", {"allowArrowFunctions": true}],
|
||||||
|
"id-length": ["warn", {"max": 25, "exceptions": ["i", "x", "y", "$"]}],
|
||||||
|
"import/no-nodejs-modules": "error",
|
||||||
|
"import/order": ["warn", {
|
||||||
|
"groups": ["builtin", "external", "internal", "parent", "sibling",
|
||||||
|
"index"],
|
||||||
|
"newlines-between": "never"
|
||||||
|
}],
|
||||||
|
"arrow-body-style": ["error", "as-needed"],
|
||||||
|
"complexity": ["warn", 11],
|
||||||
|
"new-cap": ["warn", {
|
||||||
|
"newIsCap": true,
|
||||||
|
"capIsNew": true
|
||||||
|
}],
|
||||||
|
"no-empty": ["error", {
|
||||||
|
"allowEmptyCatch": true
|
||||||
|
}],
|
||||||
|
|
||||||
|
"function-paren-newline": "off",
|
||||||
|
"no-labels": "off",
|
||||||
|
"no-control-regex": "off",
|
||||||
|
"no-void": "off",
|
||||||
|
"func-names": "off",
|
||||||
|
"no-continue": "off",
|
||||||
|
"default-case": "off",
|
||||||
|
"no-plusplus": "off",
|
||||||
|
"no-use-before-define": "off",
|
||||||
|
"no-restricted-syntax": "off",
|
||||||
|
"no-return-assign": "off",
|
||||||
|
"no-param-reassign": "off",
|
||||||
|
"arrow-parens": "off",
|
||||||
|
"no-nested-ternary": "off",
|
||||||
|
"no-new": "off",
|
||||||
|
"no-tabs": "off",
|
||||||
|
"no-prototype-builtins": "off",
|
||||||
|
"no-console": "off",
|
||||||
|
"class-methods-use-this": "off",
|
||||||
|
"prefer-destructuring": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+1326
File diff suppressed because it is too large
Load Diff
+20
-14
@@ -1,16 +1,22 @@
|
|||||||
{
|
{
|
||||||
"name": "mautrix-telegram",
|
"name": "mautrix-telegram",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "A Matrix-Telegram puppeting bridge",
|
"description": "A Matrix-Telegram puppeting bridge",
|
||||||
"author": "Tulir Asokan <tulir@maunium.net>",
|
"author": "Tulir Asokan <tulir@maunium.net>",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"main": "index.js",
|
||||||
"type": "git",
|
"repository": {
|
||||||
"url": "https://github.com/tulir/mautrix-telegram.git"
|
"type": "git",
|
||||||
},
|
"url": "https://github.com/tulir/mautrix-telegram.git"
|
||||||
"dependencies": {
|
},
|
||||||
"telegram-mtproto": "2.x.x",
|
"dependencies": {
|
||||||
"matrix-js-sdk": "0.x.x",
|
"telegram-mtproto": "2.x.x",
|
||||||
"matrix-appservice-bridge": "1.x.x"
|
"matrix-js-sdk": "0.x.x",
|
||||||
}
|
"matrix-appservice-bridge": "1.x.x"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "4.11.x",
|
||||||
|
"eslint-config-airbnb-base": "12.1.x",
|
||||||
|
"eslint-plugin-import": "2.8.x"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user