eslint and fix code;
This commit is contained in:
parent
38086513df
commit
0e361bca64
11
frontend/.eslintrc.yml
Normal file
11
frontend/.eslintrc.yml
Normal file
@ -0,0 +1,11 @@
|
||||
env:
|
||||
browser: true
|
||||
es2021: true
|
||||
extends:
|
||||
- google
|
||||
parser: '@typescript-eslint/parser'
|
||||
parserOptions:
|
||||
ecmaVersion: 12
|
||||
plugins:
|
||||
- '@typescript-eslint'
|
||||
rules: {}
|
||||
@ -1,7 +1,7 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
@ -11,14 +11,16 @@ module.exports = function (config) {
|
||||
require('karma-htmlfile-reporter'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
// eslint-disable-next-line max-len
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, 'coverage'), reports: ['html', 'lcovonly'],
|
||||
fixWebpackSourcePaths: true
|
||||
dir: require('path').join(__dirname, 'coverage'),
|
||||
reports: ['html', 'lcovonly'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
|
||||
htmlReporter: {
|
||||
@ -29,7 +31,7 @@ module.exports = function (config) {
|
||||
subPageTitle: 'A sample project description',
|
||||
groupSuites: true,
|
||||
useCompactStyle: true,
|
||||
useLegacyStyle: true
|
||||
useLegacyStyle: true,
|
||||
},
|
||||
|
||||
reporters: ['progress', 'html'],
|
||||
@ -47,10 +49,10 @@ module.exports = function (config) {
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage',
|
||||
'--remote-debugging-port=9222'
|
||||
]
|
||||
}
|
||||
'--remote-debugging-port=9222',
|
||||
],
|
||||
},
|
||||
singleRun: true
|
||||
},
|
||||
singleRun: true,
|
||||
});
|
||||
};
|
||||
|
||||
24628
frontend/package-lock.json
generated
24628
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,15 @@
|
||||
"@types/jasmine": "~3.4.6",
|
||||
"@types/jasminewd2": "~2.0.8",
|
||||
"@types/node": "^12.12.42",
|
||||
"@typescript-eslint/eslint-plugin": "4.19.0",
|
||||
"@typescript-eslint/parser": "4.19.0",
|
||||
"codelyzer": "^5.2.2",
|
||||
"eslint": "7.22.0",
|
||||
"eslint-config-google": "0.14.0",
|
||||
"eslint-config-standard": "16.0.2",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "4.3.1",
|
||||
"jasmine-core": "~3.5.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.4.1",
|
||||
|
||||
@ -6,10 +6,10 @@ const {SpecReporter} = require('jasmine-spec-reporter');
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./e2e/**/*.e2e-spec.ts'
|
||||
'./e2e/**/*.e2e-spec.ts',
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
browserName: 'chrome',
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
@ -17,13 +17,15 @@ exports.config = {
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function () {
|
||||
}
|
||||
print: function() {
|
||||
},
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: 'e2e/tsconfig.e2e.json'
|
||||
project: 'e2e/tsconfig.e2e.json',
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
|
||||
}
|
||||
jasmine.getEnv().addReporter(new SpecReporter({spec:
|
||||
{displayStacktrace: true},
|
||||
}));
|
||||
},
|
||||
};
|
||||
|
||||
@ -3,11 +3,12 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-test-sub-comp',
|
||||
templateUrl: './test-sub-comp.component.html',
|
||||
styleUrls: ['./test-sub-comp.component.css']
|
||||
styleUrls: ['./test-sub-comp.component.css'],
|
||||
})
|
||||
export class TestSubCompComponent implements OnInit {
|
||||
@Input()
|
||||
message: string;
|
||||
|
||||
@Input()
|
||||
anotherInput: string;
|
||||
|
||||
@ -18,7 +19,6 @@ export class TestSubCompComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.message;
|
||||
// this.message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user