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

UI: Add linting for classic decorator #8182

Merged
merged 2 commits into from
Jun 22, 2020
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
2 changes: 2 additions & 0 deletions ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module.exports = {
checkLoops: false,
},
],
'ember/classic-decorator-hooks': 'error',
'ember/classic-decorator-no-classic-methods': 'error',
},
overrides: [
// node files
Expand Down
2 changes: 2 additions & 0 deletions ui/app/abilities/client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import AbstractAbility from './abstract';
import { computed, get } from '@ember/object';
import { or } from '@ember/object/computed';
import classic from 'ember-classic-decorator';

@classic
export default class Client extends AbstractAbility {
// Map abilities to policy options (which are coarse for nodes)
// instead of specific behaviors.
Expand Down
2 changes: 2 additions & 0 deletions ui/app/adapters/watchable-namespace-ids.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { inject as service } from '@ember/service';
import Watchable from './watchable';
import classic from 'ember-classic-decorator';

@classic
export default class WatchableNamespaceIDs extends Watchable {
@service system;

Expand Down
2 changes: 2 additions & 0 deletions ui/app/models/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { fragment, fragmentArray } from 'ember-data-model-fragments/attributes';
import RSVP from 'rsvp';
import shortUUIDProperty from '../utils/properties/short-uuid';
import ipParts from '../utils/ip-parts';
import classic from 'ember-classic-decorator';

@classic
export default class Node extends Model {
// Available from list response
@attr('string') name;
Expand Down
2 changes: 2 additions & 0 deletions ui/app/routes/csi/volumes/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import notifyError from 'nomad-ui/utils/notify-error';
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
import { watchRecord } from 'nomad-ui/utils/properties/watch';
import WithWatchers from 'nomad-ui/mixins/with-watchers';
import classic from 'ember-classic-decorator';

@classic
export default class VolumeRoute extends Route.extend(WithWatchers) {
@service store;
@service system;
Expand Down
2 changes: 2 additions & 0 deletions ui/app/routes/jobs/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import notifyError from 'nomad-ui/utils/notify-error';
import { jobCrumbs } from 'nomad-ui/utils/breadcrumb-utils';
import classic from 'ember-classic-decorator';

@classic
export default class JobRoute extends Route {
@service store;
@service token;
Expand Down
2 changes: 2 additions & 0 deletions ui/app/serializers/allocation.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import ApplicationSerializer from './application';
import classic from 'ember-classic-decorator';

const taskGroupFromJob = (job, taskGroupName) => {
const taskGroups = job && job.TaskGroups;
const taskGroup = taskGroups && taskGroups.find(group => group.Name === taskGroupName);
return taskGroup ? taskGroup : null;
};

@classic
export default class AllocationSerializer extends ApplicationSerializer {
@service system;

Expand Down
2 changes: 2 additions & 0 deletions ui/app/serializers/evaluation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import { assign } from '@ember/polyfills';
import ApplicationSerializer from './application';
import classic from 'ember-classic-decorator';

@classic
export default class Evaluation extends ApplicationSerializer {
@service system;

Expand Down