Skip to content

Commit

Permalink
Merge pull request #1341 from appknox/PD-1193-node-lint-dep-upgrade
Browse files Browse the repository at this point in the history
upgrade node & linting deps
  • Loading branch information
future-pirate-king authored Feb 27, 2024
2 parents 7aafaef + 3606b36 commit 339bba9
Show file tree
Hide file tree
Showing 33 changed files with 15,762 additions and 8,533 deletions.
12 changes: 8 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ module.exports = {
rules: {
curly: 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'no-debugger': 'error',
'ember/no-empty-glimmer-component-classes': 'off',
},
overrides: [
// node files
{
files: [
'./.stylelintrc.js',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
Expand All @@ -46,8 +49,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
Expand All @@ -64,8 +66,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
Expand All @@ -78,6 +79,9 @@ module.exports = {
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': ['error', 'except-simple'],
},
},
],
};
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run deploy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
- run: npm ci
- name: Cypress run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run build-storybook
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm test
14 changes: 14 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/
/coverage/

# addons
/.node_modules.ember-try/

/app/styles/_global-styles-deprecated.scss

# TODD: for now ignore everything need to fix linting issues
/app/
9 changes: 9 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-standard-scss',
'stylelint-prettier/recommended',
],
};
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.18.0-bullseye AS builder
FROM node:18.19.1-bullseye AS builder

LABEL maintainer "Appknox <[email protected]>"

Expand All @@ -9,7 +9,7 @@ COPY . ./
RUN npm run deploy:server


FROM node:16.18.0-alpine
FROM node:18.19.1-alpine

LABEL maintainer "Appknox <[email protected]>"

Expand Down
4 changes: 2 additions & 2 deletions app/components/ak-date-picker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ export default class AkDatePickerComponent extends Component<AkDatePickerSignatu
return this.args.range
? 'range'
: this.args.multiple
? 'multiple'
: 'single';
? 'multiple'
: 'single';
}

get componentName() {
Expand Down
2 changes: 1 addition & 1 deletion app/components/ak-form-control-label/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface AkFormControlLabelSignature {
{
control: ComponentLike<{ Blocks: { default: [] } }>;
disabled?: boolean;
}
},
];
label: [];
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/ak-link/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{if @noWrap "ak-link-noWrap"}}'
@route={{@route}}
@models={{this.modelOrModels}}
@query={{@query}}
@query={{this.query}}
>
{{#if (has-block 'leftIcon')}}
<div data-test-ak-link-left-icon local-class='ak-link-left-icon'>
Expand Down
4 changes: 4 additions & 0 deletions app/components/ak-link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export default class AkLinkComponent extends Component<AkLinkSignature> {

return [];
}

get query() {
return this.args.query || {};
}
}

declare module '@glint/environment-ember-loose/registry' {
Expand Down
2 changes: 1 addition & 1 deletion app/components/ak-list/item/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
>
<LinkTo
@route={{this.route}}
@query={{@query}}
@query={{this.query}}
@models={{this.modelOrModels}}
@disabled={{@disabled}}
@current-when={{@currentWhen}}
Expand Down
6 changes: 5 additions & 1 deletion app/components/ak-list/item/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface AkListItemSignature {
'disabled' | 'leftGutter'
>;
text: WithBoundArgs<typeof AkListItemTextComponent, 'disabled'>;
}
},
];
};
}
Expand All @@ -48,6 +48,10 @@ export default class AkListItemComponent extends Component<AkListItemSignature>
return this.args.route || '';
}

get query() {
return this.args.query || {};
}

get modelOrModels() {
if (this.args.model) {
return [this.args.model];
Expand Down
4 changes: 3 additions & 1 deletion app/components/ak-menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export interface AkMenuSignature {
};
Blocks: {
default: [
{ listItem: WithBoundArgs<typeof AkListItemComponent, 'button' | 'role'> }
{
listItem: WithBoundArgs<typeof AkListItemComponent, 'button' | 'role'>;
},
];
};
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/ak-radio/group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface AkRadioGroupSignature {
Element: HTMLElement;
Blocks: {
default: [
{ value: string; handleChange: (event: Event) => void; name: string }
{ value: string; handleChange: (event: Event) => void; name: string },
];
};
}
Expand Down
1 change: 0 additions & 1 deletion app/components/ak-select/before-option/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { action } from '@ember/object';
import Component from '@glimmer/component';
import { Select } from 'ember-power-select/components/power-select';
import { later, scheduleOnce } from '@ember/runloop';
import styles from './index.scss';

interface AkSelectBeforeOptionArgs {
select: Select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

export interface FileCompareAnalysisDetailsRegulatoryContentSignature<
T extends object
T extends object,
> {
Args: {
contents: T[];
Expand All @@ -14,13 +14,13 @@ export interface FileCompareAnalysisDetailsRegulatoryContentSignature<
value: [
content: T,
showMoreFor: string | null,
showMoreHandler: (id: string) => void
showMoreHandler: (id: string) => void,
];
};
}

export default class FileCompareAnalysisDetailsRegulatoryComponent<
T extends object
T extends object,
> extends Component<FileCompareAnalysisDetailsRegulatoryContentSignature<T>> {
@tracked showMoreDetailsFor: string | null = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

export interface FileDetailsVulnerabilityAnalysisDetailsRegulatoryContentSignature<
T extends object
T extends object,
> {
Args: {
contents: T[];
Expand All @@ -14,13 +14,13 @@ export interface FileDetailsVulnerabilityAnalysisDetailsRegulatoryContentSignatu
value: [
content: T,
showMoreFor: string | null,
showMoreHandler: (id: string) => void
showMoreHandler: (id: string) => void,
];
};
}

export default class FileDetailsVulnerabilityAnalysisDetailsRegulatoryContentComponent<
T extends object
T extends object,
> extends Component<
FileDetailsVulnerabilityAnalysisDetailsRegulatoryContentSignature<T>
> {
Expand Down
2 changes: 1 addition & 1 deletion app/components/invite-member/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface InviteMemberSignature {
action: () => void;
actionLabel: string;
actionRunning: boolean;
}
},
];
};
}
Expand Down
Loading

0 comments on commit 339bba9

Please sign in to comment.