Skip to content

Fix linting errors #775 #783

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

Merged
merged 1 commit into from
Nov 8, 2021
Merged
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
16 changes: 7 additions & 9 deletions app/controllers/project-version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-computed-properties-in-native-classes, ember/classic-decorator-no-classic-methods */
/* eslint-disable ember/no-computed-properties-in-native-classes */
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import { readOnly, alias } from '@ember/object/computed';
Expand Down Expand Up @@ -44,12 +44,12 @@ export default class ProjectVersionController extends Controller {

@computed('model.id')
get moduleIDs() {
return this.getModuleRelationships(this.get('model.id'), 'modules');
return this.getModuleRelationships(this.model.id, 'modules');
}

@computed('model.id')
get publicModuleIDs() {
return this.getModuleRelationships(this.get('model.id'), 'public-modules');
return this.getModuleRelationships(this.model.id, 'public-modules');
}

getModuleRelationships(versionId, moduleType) {
Expand All @@ -65,6 +65,7 @@ export default class ProjectVersionController extends Controller {
}

getRelationshipIDs(relationship) {
// eslint-disable-next-line
const splitPoint = 2 + this.get('model.project.id').split('-').length - 1;
const classes = this.model.hasMany(relationship);
const sorted = A(classes.ids()).sort();
Expand Down Expand Up @@ -94,9 +95,8 @@ export default class ProjectVersionController extends Controller {

@computed('metaStore.availableProjectVersions', 'model.project.id')
get projectVersions() {
const projectVersions = this.get('metaStore.availableProjectVersions')[
this.get('model.project.id')
];
const projectVersions =
this.metaStore.availableProjectVersions[this.model.project.get('id')];
let versions = projectVersions.sort((a, b) => semverCompare(b, a));

versions = versions.map((version) => {
Expand All @@ -116,9 +116,7 @@ export default class ProjectVersionController extends Controller {

@computed('projectVersions.[]', 'model.version')
get selectedProjectVersion() {
return this.projectVersions.filter(
(pV) => pV.id === this.get('model.version')
)[0];
return this.projectVersions.filter((pV) => pV.id === this.model.version)[0];
}

@readOnly('model.project.id')
Expand Down