mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Update dependency eslint-plugin-ghost to v2.0.0
no issue - bumps eslint and eslint-plugin-ember versions - octane rules are enabled by default - disabled them in our eslintrc.json so we can switch to warn/error whilst migrating to octane - fixed a couple of linting errors from new/updated rules
This commit is contained in:
parent
b02f7c0617
commit
597ed21703
7 changed files with 49 additions and 29 deletions
13
.eslintrc.js
13
.eslintrc.js
|
@ -18,9 +18,16 @@ module.exports = {
|
||||||
rules: {
|
rules: {
|
||||||
'no-shadow': ['error'],
|
'no-shadow': ['error'],
|
||||||
|
|
||||||
// octane 🏎
|
// TODO: migrate away from accessing controller in routes
|
||||||
'ghost/ember/classic-decorator-hooks': 'error',
|
'ghost/ember/no-controller-access-in-routes': 'off',
|
||||||
'ghost/ember/classic-decorator-no-classic-methods': 'error',
|
|
||||||
|
// TODO: enable once we're fully on octane 🏎
|
||||||
|
'ghost/ember/no-assignment-of-untracked-properties-used-in-tracking-contexts': 'off',
|
||||||
|
'ghost/ember/no-actions-hash': 'off',
|
||||||
|
'ghost/ember/no-classic-classes': 'off',
|
||||||
|
'ghost/ember/no-classic-components': 'off',
|
||||||
|
'ghost/ember/require-tagless-components': 'off',
|
||||||
|
'ghost/ember/no-component-lifecycle-hooks': 'off',
|
||||||
|
|
||||||
// disable linting of `this.get` until there's a reliable autofix
|
// disable linting of `this.get` until there's a reliable autofix
|
||||||
'ghost/ember/use-ember-get-and-set': 'off',
|
'ghost/ember/use-ember-get-and-set': 'off',
|
||||||
|
|
|
@ -9,6 +9,9 @@ import {isEmpty, typeOf} from '@ember/utils';
|
||||||
import {run} from '@ember/runloop';
|
import {run} from '@ember/runloop';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
|
|
||||||
|
/* eslint-disable ghost/ember/no-side-effects */
|
||||||
|
// bug in eslint-plugin-ember?
|
||||||
|
|
||||||
export default Component.extend(ShortcutsMixin, {
|
export default Component.extend(ShortcutsMixin, {
|
||||||
|
|
||||||
config: service(),
|
config: service(),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {
|
||||||
isUnsupportedMediaTypeError,
|
isUnsupportedMediaTypeError,
|
||||||
isVersionMismatchError
|
isVersionMismatchError
|
||||||
} from 'ghost-admin/services/ajax';
|
} from 'ghost-admin/services/ajax';
|
||||||
|
// eslint-disable-next-line ghost/ember/no-computed-properties-in-native-classes
|
||||||
import {computed} from '@ember/object';
|
import {computed} from '@ember/object';
|
||||||
import {htmlSafe} from '@ember/string';
|
import {htmlSafe} from '@ember/string';
|
||||||
import {isBlank} from '@ember/utils';
|
import {isBlank} from '@ember/utils';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Controller, {inject as controller} from '@ember/controller';
|
||||||
import EmberObject, {action, defineProperty} from '@ember/object';
|
import EmberObject, {action, defineProperty} from '@ember/object';
|
||||||
import boundOneWay from 'ghost-admin/utils/bound-one-way';
|
import boundOneWay from 'ghost-admin/utils/bound-one-way';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import {alias} from '@ember/object/computed';
|
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
import {task} from 'ember-concurrency-decorators';
|
import {task} from 'ember-concurrency-decorators';
|
||||||
import {tracked} from '@glimmer/tracking';
|
import {tracked} from '@glimmer/tracking';
|
||||||
|
@ -27,7 +26,13 @@ export default class MemberController extends Controller {
|
||||||
|
|
||||||
// Computed properties -----------------------------------------------------
|
// Computed properties -----------------------------------------------------
|
||||||
|
|
||||||
@alias('model') member;
|
get member() {
|
||||||
|
return this.model;
|
||||||
|
}
|
||||||
|
|
||||||
|
set member(member) {
|
||||||
|
this.model = member;
|
||||||
|
}
|
||||||
|
|
||||||
get scratchMember() {
|
get scratchMember() {
|
||||||
let scratchMember = EmberObject.create({member: this.member});
|
let scratchMember = EmberObject.create({member: this.member});
|
||||||
|
|
|
@ -27,14 +27,12 @@ export default Controller.extend({
|
||||||
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
||||||
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
||||||
|
|
||||||
|
filteredInvites: computed.filterBy('invites', 'isNew', false),
|
||||||
|
|
||||||
invites: computed(function () {
|
invites: computed(function () {
|
||||||
return this.store.peekAll('invite');
|
return this.store.peekAll('invite');
|
||||||
}),
|
}),
|
||||||
|
|
||||||
filteredInvites: computed('invites.@each.isNew', function () {
|
|
||||||
return this.invites.filterBy('isNew', false);
|
|
||||||
}),
|
|
||||||
|
|
||||||
allUsers: computed(function () {
|
allUsers: computed(function () {
|
||||||
return this.store.peekAll('user');
|
return this.store.peekAll('user');
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
"ember-useragent": "0.10.0",
|
"ember-useragent": "0.10.0",
|
||||||
"emberx-file-input": "1.2.1",
|
"emberx-file-input": "1.2.1",
|
||||||
"eslint": "7.11.0",
|
"eslint": "7.11.0",
|
||||||
"eslint-plugin-ghost": "1.5.0",
|
"eslint-plugin-ghost": "2.0.0",
|
||||||
"faker": "5.1.0",
|
"faker": "5.1.0",
|
||||||
"fs-extra": "9.0.1",
|
"fs-extra": "9.0.1",
|
||||||
"glob": "7.1.6",
|
"glob": "7.1.6",
|
||||||
|
|
44
yarn.lock
44
yarn.lock
|
@ -6468,7 +6468,7 @@ ember-resolver@8.0.2:
|
||||||
ember-cli-version-checker "^5.1.1"
|
ember-cli-version-checker "^5.1.1"
|
||||||
resolve "^1.17.0"
|
resolve "^1.17.0"
|
||||||
|
|
||||||
ember-rfc176-data@^0.3.1, ember-rfc176-data@^0.3.12, ember-rfc176-data@^0.3.13, ember-rfc176-data@^0.3.16:
|
ember-rfc176-data@^0.3.1, ember-rfc176-data@^0.3.13, ember-rfc176-data@^0.3.15, ember-rfc176-data@^0.3.16:
|
||||||
version "0.3.16"
|
version "0.3.16"
|
||||||
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.16.tgz#2ace0ac9cf9016d493a74a1d931643a308679803"
|
resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.16.tgz#2ace0ac9cf9016d493a74a1d931643a308679803"
|
||||||
integrity sha512-IYAzffS90r2ybAcx8c2qprYfkxa70G+/UPkxMN1hw55DU5S2aLOX6v3umKDZItoRhrvZMCnzwsdfKSrKdC9Wbg==
|
integrity sha512-IYAzffS90r2ybAcx8c2qprYfkxa70G+/UPkxMN1hw55DU5S2aLOX6v3umKDZItoRhrvZMCnzwsdfKSrKdC9Wbg==
|
||||||
|
@ -6845,13 +6845,14 @@ eslint-module-utils@^2.6.0:
|
||||||
debug "^2.6.9"
|
debug "^2.6.9"
|
||||||
pkg-dir "^2.0.0"
|
pkg-dir "^2.0.0"
|
||||||
|
|
||||||
eslint-plugin-ember@8.5.1:
|
eslint-plugin-ember@9.3.0:
|
||||||
version "8.5.1"
|
version "9.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-8.5.1.tgz#acaeb430e150115350fb184450cd17eaf6bb5d7e"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-9.3.0.tgz#77ec28a0c586ea55bbd30d140c784afcdf59e97b"
|
||||||
integrity sha512-92tU1ktJBfwcWIdAzVVuo6gLIGWrf2AtnNyHnw7vBmSVcP00P5hM7fDXL0CaLWblAVIrfik4NrOWCe9sSkh6ww==
|
integrity sha512-qrzptSwC58HD8211vF8rGu+TRT8XzIsZVm6j4PleuSZqJ6k3VG8FKofQkb4ZBVU9jOJ0lnZCbYqBfjs4Iy/HHw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@ember-data/rfc395-data" "^0.0.4"
|
"@ember-data/rfc395-data" "^0.0.4"
|
||||||
ember-rfc176-data "^0.3.12"
|
ember-rfc176-data "^0.3.15"
|
||||||
|
lodash.kebabcase "^4.1.1"
|
||||||
snake-case "^3.0.3"
|
snake-case "^3.0.3"
|
||||||
|
|
||||||
eslint-plugin-es@^3.0.0:
|
eslint-plugin-es@^3.0.0:
|
||||||
|
@ -6862,13 +6863,13 @@ eslint-plugin-es@^3.0.0:
|
||||||
eslint-utils "^2.0.0"
|
eslint-utils "^2.0.0"
|
||||||
regexpp "^3.0.0"
|
regexpp "^3.0.0"
|
||||||
|
|
||||||
eslint-plugin-ghost@1.5.0:
|
eslint-plugin-ghost@2.0.0:
|
||||||
version "1.5.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-1.5.0.tgz#93c8ecbfe3b039b4f89c1383249dbc58d90121e3"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-2.0.0.tgz#14e67180188850abf978df772e02bb74b1832374"
|
||||||
integrity sha512-W+woYN6HIVfMjVCfIsF3EncqJP8rwXIilqciHs22YuhHNOA0IULfb3sO2Fy/Yq2NG0nqco+8FxZIOD3Gu0dp4w==
|
integrity sha512-BlygF0CZr/38ena3qztpyCuo7z1KsbbjEz0FO3zjfg+V6Id5wcZsKTaOdFHFZwyDl4kBm5jujFAsWILh/DtNiQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-plugin-ember "8.5.1"
|
eslint-plugin-ember "9.3.0"
|
||||||
eslint-plugin-mocha "6.3.0"
|
eslint-plugin-mocha "8.0.0"
|
||||||
eslint-plugin-sort-imports-es6-autofix "0.5.0"
|
eslint-plugin-sort-imports-es6-autofix "0.5.0"
|
||||||
|
|
||||||
eslint-plugin-import@^2.20.1:
|
eslint-plugin-import@^2.20.1:
|
||||||
|
@ -6890,13 +6891,13 @@ eslint-plugin-import@^2.20.1:
|
||||||
resolve "^1.17.0"
|
resolve "^1.17.0"
|
||||||
tsconfig-paths "^3.9.0"
|
tsconfig-paths "^3.9.0"
|
||||||
|
|
||||||
eslint-plugin-mocha@6.3.0:
|
eslint-plugin-mocha@8.0.0:
|
||||||
version "6.3.0"
|
version "8.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz#72bfd06a5c4323e17e30ef41cd726030e8cdb8fd"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz#7ec5d228bcb3735301701dfbc3376320a1ca3791"
|
||||||
integrity sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg==
|
integrity sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-utils "^2.0.0"
|
eslint-utils "^2.1.0"
|
||||||
ramda "^0.27.0"
|
ramda "^0.27.1"
|
||||||
|
|
||||||
eslint-plugin-node@^11.0.0:
|
eslint-plugin-node@^11.0.0:
|
||||||
version "11.1.0"
|
version "11.1.0"
|
||||||
|
@ -9780,6 +9781,11 @@ lodash.isplainobject@^4.0.6:
|
||||||
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
|
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
|
||||||
integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=
|
integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=
|
||||||
|
|
||||||
|
lodash.kebabcase@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
|
||||||
|
integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY=
|
||||||
|
|
||||||
lodash.keys@^3.0.0:
|
lodash.keys@^3.0.0:
|
||||||
version "3.1.2"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
|
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
|
||||||
|
@ -11893,7 +11899,7 @@ raf-pool@~0.1.4:
|
||||||
resolved "https://registry.yarnpkg.com/raf-pool/-/raf-pool-0.1.4.tgz#6b9f75ea1903c16e162ffe8c76688f5a625bc2cd"
|
resolved "https://registry.yarnpkg.com/raf-pool/-/raf-pool-0.1.4.tgz#6b9f75ea1903c16e162ffe8c76688f5a625bc2cd"
|
||||||
integrity sha512-BBPamTVuSprPq7CUmgxc+ycbsYUtUYnQtJYEfMHXMaostPaNpQzipLfSa/rwjmlgjBPiD7G+I+8W340sLOPu6g==
|
integrity sha512-BBPamTVuSprPq7CUmgxc+ycbsYUtUYnQtJYEfMHXMaostPaNpQzipLfSa/rwjmlgjBPiD7G+I+8W340sLOPu6g==
|
||||||
|
|
||||||
ramda@^0.27.0:
|
ramda@^0.27.1:
|
||||||
version "0.27.1"
|
version "0.27.1"
|
||||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9"
|
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9"
|
||||||
integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==
|
integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==
|
||||||
|
|
Loading…
Reference in a new issue