Skip to content

Commit

Permalink
fixed linter
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Jul 5, 2024
1 parent 671c6d7 commit 4f3f46d
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 92 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
env: {
browser: true,
},
globals: {
Stripe: 'readonly',
},
rules: {
'ember/no-array-prototype-extensions': 'off',
'ember/no-computed-properties-in-native-classes': 'off',
Expand All @@ -24,7 +27,7 @@ module.exports = {
'ember/no-get': 'off',
'ember/classic-decorator-no-classic-methods': 'off',
'no-prototype-builtins': 'off',
'node/no-unpublished-require': [
'n/no-unpublished-require': [
'error',
{
allowModules: ['resolve', 'broccoli-funnel'],
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
2 changes: 1 addition & 1 deletion addon/components/admin/product-category.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { dasherize } from '@ember/string';

export default class AdminProductCategoryComponent extends Component {
@service store;
@service modalsManager;
@service currentUser;
@service modalsManager;
@service notifications;
Expand Down Expand Up @@ -90,6 +89,7 @@ export default class AdminProductCategoryComponent extends Component {
declineButtonIconPrefix: 'fas',
category: subCategory,
uploadNewPhoto: (file) => {
const category = this.modalsManager.getOption('category');
this.fetch.uploadFile.perform(
file,
{
Expand Down
2 changes: 1 addition & 1 deletion addon/components/cell/product-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Component from '@glimmer/component';
import { action, computed, get } from '@ember/object';

export default class CellProductInfoComponent extends Component {
@computed('args.row', 'args.column.modelPath') get product() {
@computed('args.{row,column.modelPath}') get product() {
const { column, row } = this.args;

if (typeof column?.modelPath === 'string') {
Expand Down
1 change: 0 additions & 1 deletion addon/components/sales-order-form-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { isValid as isValidDate } from 'date-fns';
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';

Expand Down
3 changes: 1 addition & 2 deletions addon/components/warehouse-form-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { isBlank } from '@ember/utils';
import { all } from 'rsvp';
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
Expand Down Expand Up @@ -94,7 +93,7 @@ export default class WarehouseFormPanelComponent extends Component {
try {
return warehouse
.save()
.then((place) => {
.then((warehouse) => {
this.notifications.success(`Warehouse (${warehouse.name}) saved successfully.`);
contextComponentCallback(this, 'onAfterSave', warehouse);
})
Expand Down
7 changes: 0 additions & 7 deletions addon/controllers/inventory/expired-stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ export default class InventoryExpiredStockController extends Controller {
*/
@tracked product;

/**
* The filterable param `status`
*
* @var {String}
*/
@tracked status;

/**
* All columns applicable for orders
*
Expand Down
7 changes: 0 additions & 7 deletions addon/controllers/inventory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ export default class InventoryIndexController extends Controller {
*/
@tracked product;

/**
* The filterable param `status`
*
* @var {String}
*/
@tracked status;

/**
* All columns applicable for orders
*
Expand Down
2 changes: 1 addition & 1 deletion addon/controllers/inventory/index/new-stock-adjustment.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class InventoryIndexNewStockAdjustmentController extends Controll
* @return {Promise}
* @memberof InventoryIndexNewStockAdjustmentController
*/
@action onAfterSave(stockAdjustment) {
@action onAfterSave() {
if (this.overlay) {
this.overlay.close();
}
Expand Down
7 changes: 0 additions & 7 deletions addon/controllers/inventory/low-stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ export default class InventoryLowStockController extends Controller {
*/
@tracked batch;

/**
* The filterable param `status`
*
* @var {String|Array}
*/
@tracked status;

/**
* The filterable param `pallet-product`
*
Expand Down
5 changes: 4 additions & 1 deletion addon/models/warehouse-aisle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
import { computed } from '@ember/object';
import { format as formatDate, isValid as isValidDate } from 'date-fns';
import { isArray } from '@ember/array';
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns';
import getWithDefault from '@fleetbase/ember-core/utils/get-with-default';
import first from '@fleetbase/ember-core/utils/first';

export default class WarehouseAisle extends Model {
/** @ids */
Expand Down
2 changes: 1 addition & 1 deletion addon/models/warehouse-bin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Model, { attr, belongsTo } from '@ember-data/model';
import { computed } from '@ember/object';
import { format as formatDate, isValid as isValidDate } from 'date-fns';
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns';

export default class WarehouseBin extends Model {
/** @ids */
Expand Down
2 changes: 1 addition & 1 deletion addon/models/warehouse-dock.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Model, { attr, belongsTo } from '@ember-data/model';
import { computed } from '@ember/object';
import { format as formatDate, isValid as isValidDate } from 'date-fns';
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns';

export default class WarehouseDock extends Model {
/** @ids */
Expand Down
2 changes: 1 addition & 1 deletion addon/models/warehouse-rack.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
import { computed } from '@ember/object';
import { format as formatDate, isValid as isValidDate } from 'date-fns';
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns';

export default class WarehouseRack extends Model {
/** @ids */
Expand Down
94 changes: 47 additions & 47 deletions tests/dummy/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,51 @@ const getChannelURL = require('ember-source-channel-url');
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
};
};
24 changes: 12 additions & 12 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
'use strict';

module.exports = function (environment) {
const ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
},
const ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
},

APP: {
// Here you can pass flags/options to your application instance
Expand Down

0 comments on commit 4f3f46d

Please sign in to comment.