Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 44 additions & 150 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,38 @@
"ecmaVersion": 2020
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": [
"error",
"single",
{
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
],
"no-loop-func": [
"error"
],
"block-spacing": [
"error",
"always"
],
"camelcase": [
"error"
],
"eqeqeq": [
"error",
"always"
],
"strict": [
"error",
"global"
],
"semi": ["error", "always"],
"no-loop-func": ["error"],
"block-spacing": ["error", "always"],
"camelcase": ["error"],
"eqeqeq": ["error", "always"],
"strict": ["error", "global"],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"comma-style": [
"error",
"last"
],
"comma-style": ["error", "last"],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"eol-last": [
"error"
],
"func-call-spacing": [
"error",
"never"
],
"eol-last": ["error"],
"func-call-spacing": ["error", "never"],
"key-spacing": [
"error",
{
Expand Down Expand Up @@ -112,44 +82,22 @@
"properties": true
}
],
"new-parens": [
"error"
],
"no-lonely-if": [
"error"
],
"no-trailing-spaces": [
"error"
],
"no-unneeded-ternary": [
"error"
],
"no-whitespace-before-property": [
"error"
],
"object-curly-spacing": [
"error",
"always"
],
"operator-assignment": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after"
],
"new-parens": ["error"],
"no-lonely-if": ["error"],
"no-trailing-spaces": ["error"],
"no-unneeded-ternary": ["error"],
"no-whitespace-before-property": ["error"],
"object-curly-spacing": ["error", "always"],
"operator-assignment": ["error", "always"],
"operator-linebreak": ["error", "after"],
"semi-spacing": [
"error",
{
"before": false,
"after": true
}
],
"space-before-blocks": [
"error",
"always"
],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": [
"error",
{
Expand All @@ -158,13 +106,8 @@
"asyncArrow": "always"
}
],
"space-in-parens": [
"error",
"never"
],
"space-infix-ops": [
"error"
],
"space-in-parens": ["error", "never"],
"space-infix-ops": ["error"],
"space-unary-ops": [
"error",
{
Expand All @@ -175,94 +118,45 @@
}
}
],
"no-unreachable": [
"error"
],
"no-global-assign": [
"error"
],
"no-self-compare": [
"error"
],
"no-unmodified-loop-condition": [
"error"
],
"no-unreachable": ["error"],
"no-global-assign": ["error"],
"no-self-compare": ["error"],
"no-unmodified-loop-condition": ["error"],
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"no-console": [
"off"
],
"no-useless-concat": [
"error"
],
"no-useless-escape": [
"error"
],
"no-shadow-restricted-names": [
"error"
],
"no-console": ["off"],
"no-useless-concat": ["error"],
"no-useless-escape": ["error"],
"no-shadow-restricted-names": ["error"],
"no-use-before-define": [
"error",
{
"functions": false
}
],
"arrow-parens": [
"error",
"as-needed"
],
"arrow-body-style": [
"error",
"as-needed"
],
"arrow-spacing": [
"error"
],
"arrow-parens": ["error", "as-needed"],
"arrow-body-style": ["error", "as-needed"],
"arrow-spacing": ["error"],
"no-confusing-arrow": [
"error",
{
"allowParens": true
}
],
"no-useless-computed-key": [
"error"
],
"no-useless-rename": [
"error"
],
"no-var": [
"error"
],
"object-shorthand": [
"error",
"always"
],
"prefer-arrow-callback": [
"error"
],
"prefer-const": [
"error"
],
"prefer-numeric-literals": [
"error"
],
"prefer-rest-params": [
"error"
],
"prefer-spread": [
"error"
],
"rest-spread-spacing": [
"error",
"never"
],
"template-curly-spacing": [
"error",
"never"
]
"no-useless-computed-key": ["error"],
"no-useless-rename": ["error"],
"no-var": ["error"],
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": ["error"],
"prefer-const": ["error"],
"prefer-numeric-literals": ["error"],
"prefer-rest-params": ["error"],
"prefer-spread": ["error"],
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": ["error", "never"]
}
}
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"trailingComma": "es5",
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}
2 changes: 1 addition & 1 deletion application/api/auth.1/signIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
if (!user || !valid) throw new Error('Incorrect login or password');
console.log(`Logged user: ${login}`);
return { result: 'success', userId: user.id };
}
},
});
5 changes: 1 addition & 4 deletions application/api/cms.1/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"rules": {
"strict": [
"error",
"never"
]
"strict": ["error", "never"]
},
"globals": {
"application": "readonly",
Expand Down
2 changes: 1 addition & 1 deletion application/api/cms.1/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ async () => [
'programming including C, C++, JavaScript, Rust, Go, Swift, Java,',
'Objective-C, Kotlin, C#, Delphi, Assembler, Python, Haskell, etc.',
'We provide solutions for Unix/Linux, Windows, OSX, Android, Internet',
'solutions and Embedded systems.'
'solutions and Embedded systems.',
];
2 changes: 1 addition & 1 deletion application/api/example.1/remoteMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
method: async ({ ...args }) => {
console.debug({ remoteMethod: args });
return { result: 'success' };
}
},
});
7 changes: 4 additions & 3 deletions application/api/example.1/wait.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
async ({ delay }) => new Promise(resolve => {
setTimeout(resolve, delay, 'done');
});
async ({ delay }) =>
new Promise((resolve) => {
setTimeout(resolve, delay, 'done');
});
2 changes: 1 addition & 1 deletion application/api/example.1/webHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
method: async ({ ...args }) => {
console.debug({ webHook: args });
return { result: 'success' };
}
},
});
2 changes: 1 addition & 1 deletion application/api/system.1/introspect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
({
access: 'public',
method: application.introspect
method: application.introspect,
});
5 changes: 1 addition & 4 deletions application/config/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"rules": {
"strict": [
"error",
"never"
]
"strict": ["error", "never"]
}
}
5 changes: 1 addition & 4 deletions application/domain/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"rules": {
"strict": [
"error",
"never"
]
"strict": ["error", "never"]
},
"globals": {
"application": "readonly",
Expand Down
4 changes: 2 additions & 2 deletions application/domain/database/start.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(async () => {
async () => {
console.debug('Connect to pg');
domain.database.example = new lib.pg.Database(config.database);
});
};
5 changes: 1 addition & 4 deletions application/lib/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"rules": {
"strict": [
"error",
"never"
]
"strict": ["error", "never"]
},
"globals": {
"application": "readonly",
Expand Down
2 changes: 1 addition & 1 deletion application/lib/example/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
const res = this.values.get(key);
console.log({ return: res });
return res;
}
},
});
4 changes: 2 additions & 2 deletions application/lib/example/doSomething.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(() => {
() => {
console.debug('Call method: example.doSomething');
});
};
2 changes: 1 addition & 1 deletion application/lib/example/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
this.parent.cache.set({ key: 'keyName', val: this.privateField });
const res = lib.example.cache.get({ key: 'keyName' });
console.log({ res, cache: this.parent.cache.values });
}
},
});
4 changes: 2 additions & 2 deletions application/lib/example/stop.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(async () => {
async () => {
console.debug('Stop example plugin');
});
};
Loading