Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint Fix #1408

Merged
merged 3 commits into from
Jun 10, 2024
Merged
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ typings/
_config.yml
.classpath
.DS_Store
.eslintrc.json
.gitattributes
.gitignore
.idea
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": ["error", { "prefix": "rtl", "style": "kebab-case", "type": "element" }],
"@angular-eslint/directive-selector": ["error", { "style": "camelCase", "type": "attribute" }],
"@angular-eslint/consistent-component-styles": "off",
"@angular-eslint/prefer-on-push-component-change-detection": "off",
"@angular-eslint/prefer-standalone": "off",
Expand Down Expand Up @@ -190,8 +192,6 @@
],
"rules": {
"@angular-eslint/arrow-body-style": "off",
"@angular-eslint/component-selector": ["error", { "prefix": "rtl", "style": "kebab-case", "type": "element" }],
"@angular-eslint/directive-selector": ["error", { "style": "camelCase", "type": "attribute" }],
"@angular-eslint/template/accessibility-elements-content": "off",
"@angular-eslint/template/accessibility-interactive-supports-focus": "off",
"@angular-eslint/template/button-has-type": "off",
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ jobs:
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps

- name: Lint Scripts
- name: Lint Src and Server
run: npm run lint

- name: Lint Server Script
run: npm run lintServer

test:
name: Test
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"eslint.enable": true,
"eslint.validate": [
"typescript",
"HTML"
],
"eslint.options": {
"configFile": ".eslintrc.json"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
10 changes: 0 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"eslintConfig": ".eslintrc.json",
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions backend/controllers/cln/getInfo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import request from 'request-promise';
import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { CLWSClient } from './webSocketClient.js';
let options = null;
const logger = Logger;
const common = Common;
const clWsClient = CLWSClient;
const databaseService = Database;
export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting Core Lightning Node Information..' });
common.logEnvVariables(req);
Expand Down
2 changes: 0 additions & 2 deletions backend/controllers/eclair/getInfo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import request from 'request-promise';
import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { ECLWSClient } from './webSocketClient.js';
let options = null;
const logger = Logger;
const common = Common;
const eclWsClient = ECLWSClient;
const databaseService = Database;
export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting Eclair Node Information..' });
common.logEnvVariables(req);
Expand Down
2 changes: 0 additions & 2 deletions backend/controllers/lnd/getInfo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import request from 'request-promise';
import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { LNDWSClient } from './webSocketClient.js';
let options = null;
const logger = Logger;
const common = Common;
const lndWsClient = LNDWSClient;
const databaseService = Database;
export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting LND Node Information..' });
common.logEnvVariables(req);
Expand Down
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { FlatCompat } from '@eslint/eslintrc';
import { dirname } from 'path';
import { fileURLToPath } from 'url';

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url))
});

export default [
...compat.extends('./.eslintrc.json')
];
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"serverUbuntu": "NODE_ENV=development nodemon --watch backend --watch server ./rtl.js",
"testdev": "ng test --watch=true --code-coverage",
"test": "ng test --watch=false --browsers=ChromeHeadless",
"lint": "ng lint",
"lintServer": "eslint ./server/**/* --ext .ts"
"lint": "eslint"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -71,6 +70,7 @@
"@angular/platform-browser": "^18.0.1",
"@angular/platform-browser-dynamic": "^18.0.1",
"@angular/router": "^18.0.1",
"@eslint/eslintrc": "^3.1.0",
"@fortawesome/angular-fontawesome": "^0.15.0",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-regular-svg-icons": "^6.5.2",
Expand All @@ -97,4 +97,4 @@
"ts-node": "^10.9.2",
"typescript": "~5.4.5"
}
}
}
2 changes: 0 additions & 2 deletions server/controllers/cln/getInfo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import request from 'request-promise';
import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { CLWSClient, CLWebSocketClient } from './webSocketClient.js';
Expand All @@ -8,7 +7,6 @@ let options = null;
const logger: LoggerService = Logger;
const common: CommonService = Common;
const clWsClient: CLWebSocketClient = CLWSClient;
const databaseService: DatabaseService = Database;

export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting Core Lightning Node Information..' });
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/eclair/getInfo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import request from 'request-promise';
import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { ECLWSClient, ECLWebSocketClient } from './webSocketClient.js';
Expand All @@ -8,7 +7,6 @@ let options = null;
const logger: LoggerService = Logger;
const common: CommonService = Common;
const eclWsClient: ECLWebSocketClient = ECLWSClient;
const databaseService: DatabaseService = Database;

export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting Eclair Node Information..' });
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/lnd/getInfo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import request from 'request-promise';
import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { LNDWSClient, LNDWebSocketClient } from './webSocketClient.js';
Expand All @@ -8,7 +7,6 @@ let options = null;
const logger: LoggerService = Logger;
const common: CommonService = Common;
const lndWsClient: LNDWebSocketClient = LNDWSClient;
const databaseService: DatabaseService = Database;

export const getInfo = (req, res, next) => {
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'GetInfo', msg: 'Getting LND Node Information..' });
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/directive/clipboard.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export class ClipboardDirective {
try {
// Allowing deprecated command for older browsers where navigator is not available.
// For newer browsers where execCommand is deprecated, navigator should be available and this fallback will not be called.
// eslint-disable-next-line deprecation/deprecation
const result = document.execCommand('copy');
if (result) {
this.copied.emit(this.payload.toString());
Expand Down
Loading