Skip to content

Commit

Permalink
fix(eslint): adapt code according to eslint reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Kudlacz committed Nov 2, 2020
1 parent 2aadfc8 commit 6fa889c
Show file tree
Hide file tree
Showing 29 changed files with 1,397 additions and 9,859 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ charset = utf-8
indent_size = 2
indent_style = space

[*.{js,jsx,ts,tsx}]
indent_size = 4

[*.{json,xml}]
insert_final_newline = false

Expand Down
8 changes: 4 additions & 4 deletions .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ module.exports = {
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog', {
'changelogFile': 'CHANGELOG.md'
changelogFile: 'CHANGELOG.md'
}
],
'@semantic-release/npm',
[
'@semantic-release/github', {
'assets': [
assets: [
'package.json',
'CHANGELOG.md'
],
'message': 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
],
[
'@semantic-release/git', {
'assets': [
assets: [
'package.json',
'CHANGELOG.md'
]
Expand Down
19 changes: 15 additions & 4 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

Expand All @@ -9,20 +21,19 @@ exports.config = {
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
defaultTimeoutInterval: 30000
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
};
12 changes: 12 additions & 0 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { AppPage } from './app.po';

describe('workspace-project App', () => {
Expand Down
16 changes: 14 additions & 2 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
navigateTo(): any {
return browser.get('/');
}

getParagraphText() {
getParagraphText(): any {
return element(by.css('aem-root h1')).getText();
}
}
40 changes: 22 additions & 18 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,41 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
const plugins = [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
];

const customLaunchers = {
ChromeCI: {
base: 'ChromeHeadless',
flags: [ '--no-sandbox', '--headless' ]
}
};

module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
frameworks: [ 'jasmine', '@angular-devkit/build-angular' ],
plugins,
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'),
reports: ['text', 'html', 'lcovonly'],
reports: [ 'text', 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
reporters: [ 'progress', 'kjhtml' ],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeCI'],
browsers: [ 'ChromeCI' ],
singleRun: true,
customLaunchers: {
ChromeCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--headless' ]
}
}
customLaunchers
});
};
Loading

0 comments on commit 6fa889c

Please sign in to comment.