Skip to content

ESLint: Enable disabled rules #2043

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
Dec 21, 2019
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
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ module.exports = {
},
rules: {
'prettier/prettier': 'error',
'ember/no-observers': 'warn',
'ember/no-new-mixins': 'warn',
'ember/require-return-from-computed': 'warn',
},
overrides: [
// node files
Expand Down
1 change: 1 addition & 0 deletions app/components/badge-maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default Component.extend({
return this.get('badge.attributes.status') === 'none' || !this.get('badge.attributes.status');
}),
status: alias('badge.attributes.status'),
// eslint-disable-next-line ember/require-return-from-computed
color: computed('badge', function() {
switch (this.get('badge.attributes.status')) {
case 'actively-developed':
Expand Down
1 change: 1 addition & 0 deletions app/controllers/crate/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export default Controller.extend({
},
},

// eslint-disable-next-line ember/no-observers
report: observer('crate.readme', function() {
if (typeof document === 'undefined') {
return;
Expand Down
1 change: 1 addition & 0 deletions app/mixins/authenticated-route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Mixin from '@ember/object/mixin';
import { inject as service } from '@ember/service';

// eslint-disable-next-line ember/no-new-mixins
export default Mixin.create({
flashMessages: service(),
session: service(),
Expand Down
1 change: 1 addition & 0 deletions app/mixins/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { computed } from '@ember/object';

const VIEWABLE_PAGES = 9;

// eslint-disable-next-line ember/no-new-mixins
export default Mixin.create({
// Gives page numbers to the surrounding 9 pages.
pages: computed('currentPage', 'availablePages', function() {
Expand Down
2 changes: 2 additions & 0 deletions app/mixins/rl-dropdown-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { on } from '@ember/object/evented';
import { bind, later } from '@ember/runloop';
import $ from 'jquery';

// eslint-disable-next-line ember/no-new-mixins
export default Mixin.create({
init() {
this._super(...arguments);
Expand Down Expand Up @@ -49,6 +50,7 @@ export default Mixin.create({

manageClosingEvents: on(
'didInsertElement',
// eslint-disable-next-line ember/no-observers
observer('dropdownExpanded', function() {
let namespace = this.closingEventNamespace;
let clickEventName = `click.${namespace}`;
Expand Down
1 change: 1 addition & 0 deletions app/routes/crate/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default Route.extend({

flashMessages: service(),

// eslint-disable-next-line ember/no-observers
refreshAfterLogin: observer('session.isLoggedIn', function() {
this.refresh();
}),
Expand Down
1 change: 1 addition & 0 deletions tests/unit/mixins/pagination-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import PaginationMixin from '../../../mixins/pagination';
module('Unit | Mixin | pagination', function() {
// Replace this with your real tests.
test('it works', function(assert) {
// eslint-disable-next-line ember/no-new-mixins
let PaginationObject = EmberObject.extend(PaginationMixin);
let subject = PaginationObject.create();
assert.ok(subject);
Expand Down