Skip to content

Commit

Permalink
Apply changes made by npm run lint:typescript:fix.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed Dec 19, 2022
1 parent 2534ebb commit aaebc14
Show file tree
Hide file tree
Showing 44 changed files with 193 additions and 193 deletions.
94 changes: 47 additions & 47 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,49 +39,49 @@ module.exports = {
'vue/no-v-html': 'off',
'wrap-iife': 'off',

'array-bracket-spacing': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': ['warn', { before: true, after: true }],
'block-spacing': ['warn', 'always'],
'brace-style': ['warn', '1tbs'],
'comma-dangle': ['warn', 'always-multiline'],
'comma-spacing': 'warn',
'array-bracket-spacing': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': ['warn', { before: true, after: true }],
'block-spacing': ['warn', 'always'],
'brace-style': ['warn', '1tbs'],
'comma-dangle': ['warn', 'always-multiline'],
'comma-spacing': 'warn',
curly: 'warn',
eqeqeq: 'warn',
'func-call-spacing': ['warn', 'never'],
'implicit-arrow-linebreak': 'warn',
'func-call-spacing': ['warn', 'never'],
'implicit-arrow-linebreak': 'warn',
indent: ['warn', 2],
'keyword-spacing': 'warn',
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
'multiline-ternary': ['warn', 'never'],
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }],
'no-caller': 'warn',
'no-cond-assign': ['warn', 'except-parens'],
'no-console': 'warn',
'no-debugger': 'warn',
'no-eq-null': 'warn',
'no-eval': 'warn',
'no-trailing-spaces': 'warn',
'no-undef': 'warn',
'no-unused-vars': 'warn',
'no-whitespace-before-property': 'warn',
'object-curly-spacing': ['warn', 'always'],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'padded-blocks': ['warn', 'never'],
'prefer-arrow-callback': 'warn',
'prefer-template': 'warn',
'quote-props': 'warn',
'rest-spread-spacing': 'warn',
'keyword-spacing': 'warn',
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
'multiline-ternary': ['warn', 'never'],
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }],
'no-caller': 'warn',
'no-cond-assign': ['warn', 'except-parens'],
'no-console': 'warn',
'no-debugger': 'warn',
'no-eq-null': 'warn',
'no-eval': 'warn',
'no-trailing-spaces': 'warn',
'no-undef': 'warn',
'no-unused-vars': 'warn',
'no-whitespace-before-property': 'warn',
'object-curly-spacing': ['warn', 'always'],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'padded-blocks': ['warn', 'never'],
'prefer-arrow-callback': 'warn',
'prefer-template': 'warn',
'quote-props': 'warn',
'rest-spread-spacing': 'warn',
semi: ['warn', 'always'],
'space-before-function-paren': ['warn', 'never'],
'space-infix-ops': 'warn',
'spaced-comment': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': ['warn', 'always'],
'yield-star-spacing': ['warn', 'both'],
'space-before-function-paren': ['warn', 'never'],
'space-infix-ops': 'warn',
'spaced-comment': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': ['warn', 'always'],
'yield-star-spacing': ['warn', 'both'],

'key-spacing': ['warn', {
'key-spacing': ['warn', {
align: {
beforeColon: false,
afterColon: true,
Expand All @@ -94,12 +94,12 @@ module.exports = {
},
}],

'object-curly-newline': ['warn', {
ObjectExpression: {
'object-curly-newline': ['warn', {
ObjectExpression: {
multiline: true,
minProperties: 3,
},
ObjectPattern: {
ObjectPattern: {
multiline: true,
minProperties: 4,
},
Expand Down Expand Up @@ -208,7 +208,7 @@ Object.assign(module.exports.rules, {
}],

// Existing code only follows a subset of settings for no-unused-vars.
'@typescript-eslint/no-unused-vars': ['warn', {
'@typescript-eslint/no-unused-vars': ['warn', {
args: 'none', ignoreRestSiblings: true, varsIgnorePattern: '^_.',
}],

Expand Down Expand Up @@ -244,16 +244,16 @@ module.exports.overrides = [
rules: {
// For TypeScript, disable no-undef because the compiler checks it.
// Also, it is unaware of TypeScript types.
'no-undef': 'off',
'no-undef': 'off',
// For TypeScript, allow duplicate class members (function overloads).
'no-dupe-class-members': 'off',
'no-dupe-class-members': 'off',
// For TypeScript, allow redeclarations (interface vs class).
'no-redeclare': 'off',
'no-redeclare': 'off',
// For TypeScript, TS does use-before-define statically.
'no-use-before-define': 'off',
'no-use-before-define': 'off',
// For TypeScript, turn of the base "semi" rule as it conflicts with the
// TypeScript-specific one (and also TS/no-extra-semi).
semi: 'off',
semi: 'off',
},
},
];
8 changes: 4 additions & 4 deletions e2e/credentials-server.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,10 @@ describeWithCreds('Credentials server', () => {
const postDeleteEntries = JSON.parse(await doRequest('list'));

expect(postDeleteEntries).not.toMatchObject({
[peopleEntries.bob.ServerURL]: peopleEntries.bob.Username,
[peopleEntries.carol.ServerURL]: peopleEntries.carol.Username,
[peopleEntries.ted.ServerURL]: peopleEntries.ted.Username,
[peopleEntries.alice.ServerURL]: peopleEntries.alice.Username,
[peopleEntries.bob.ServerURL]: peopleEntries.bob.Username,
[peopleEntries.carol.ServerURL]: peopleEntries.carol.Username,
[peopleEntries.ted.ServerURL]: peopleEntries.ted.Username,
[peopleEntries.alice.ServerURL]: peopleEntries.alice.Username,
});
await expect(listEntries(dockerConfig.credsStore, 'https://bobs.fish/clams')).resolves
.toMatchObject({ [peopleEntries.fakeTed.ServerURL]: peopleEntries.fakeTed.Username });
Expand Down
50 changes: 25 additions & 25 deletions e2e/rdctl.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ test.describe('Command server', () => {

test('should return multiple error messages, settings request', async() => {
const newSettings: Record<string, any> = {
kubernetes: {
kubernetes: {
WSLIntegrations: "ceci n'est pas un objet",
stoinks: 'yikes!', // should be ignored
memoryInGB: 'carl',
Expand All @@ -262,7 +262,7 @@ test.describe('Command server', () => {
expect(resp2.status).toEqual(400);
const body = resp2.body.read().toString();
const expectedWSL = {
win32: "Proposed field kubernetes.WSLIntegrations should be an object, got <ceci n'est pas un objet>.",
win32: "Proposed field kubernetes.WSLIntegrations should be an object, got <ceci n'est pas un objet>.",
lima: "Changing field kubernetes.WSLIntegrations via the API isn't supported.",
}[os.platform() === 'win32' ? 'win32' : 'lima'];
const expectedMemory = {
Expand Down Expand Up @@ -1036,9 +1036,9 @@ test.describe('Command server', () => {
expect(stderr).toEqual('');
expect(JSON.parse(stdout)).toMatchObject({
checks: [{
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
}],
});
});
Expand All @@ -1049,12 +1049,12 @@ test.describe('Command server', () => {
expect(JSON.parse(stdout)).toMatchObject({
checks: expect.arrayContaining([
{
category: 'Networking',
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
fixes: [],
passed: expect.any(Boolean),
category: 'Networking',
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
fixes: [],
passed: expect.any(Boolean),
},
]),
});
Expand All @@ -1066,20 +1066,20 @@ test.describe('Command server', () => {
expect(JSON.parse(stdout)).toEqual({
checks: [
{
category: 'Utilities',
id: 'RD_BIN_IN_BASH_PATH',
description: 'The ~/.rd/bin directory has not been added to the PATH, so command-line utilities are not configured in your bash shell.',
mute: false,
fixes: [
category: 'Utilities',
id: 'RD_BIN_IN_BASH_PATH',
description: 'The ~/.rd/bin directory has not been added to the PATH, so command-line utilities are not configured in your bash shell.',
mute: false,
fixes: [
{ description: 'You have selected manual PATH configuration. You can let Rancher Desktop automatically configure it.' },
],
},
{
category: 'Utilities',
id: 'RD_BIN_SYMLINKS',
description: 'Are the files under ~/.docker/cli-plugins symlinks to ~/.rd/bin?',
mute: false,
fixes: [
category: 'Utilities',
id: 'RD_BIN_SYMLINKS',
description: 'Are the files under ~/.docker/cli-plugins symlinks to ~/.rd/bin?',
mute: false,
fixes: [
{ description: 'Replace existing files in ~/.rd/bin with symlinks to the application\'s internal utility directory.' },
],
},
Expand All @@ -1093,10 +1093,10 @@ test.describe('Command server', () => {
expect(JSON.parse(stdout)).toMatchObject({
checks: [
{
category: 'Networking',
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
category: 'Networking',
id: 'CONNECTED_TO_INTERNET',
description: 'The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.',
mute: false,
},
],
});
Expand Down
8 changes: 4 additions & 4 deletions e2e/wsl-integrations.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ test.describe('WSL Integrations', () => {
],
env: {
...(process.env as Record<string, string>),
PATH: path.join(workdir, 'system32') + path.delimiter + process.env.PATH,
RD_TEST_WSL_EXE: path.join(workdir, 'system32', 'wsl.exe'),
RD_MOCK_WSL_DATA: path.join(workdir, 'config.json'),
RD_MOCK_BACKEND: '1',
PATH: path.join(workdir, 'system32') + path.delimiter + process.env.PATH,
RD_TEST_WSL_EXE: path.join(workdir, 'system32', 'wsl.exe'),
RD_MOCK_WSL_DATA: path.join(workdir, 'config.json'),
RD_MOCK_BACKEND: '1',
RD_LOGS_DIR: reportAsset(__filename, 'log'),
},
});
Expand Down
4 changes: 2 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ c.build.extend = (config, { isClient, isDev }) => {

// And substitute our own loader for images
config.module.rules.unshift({
test: /\.(png|jpe?g|gif|svg|webp)$/,
test: /\.(png|jpe?g|gif|svg|webp)$/,
use: [
{
loader: 'url-loader',
Expand Down Expand Up @@ -119,7 +119,7 @@ c.build.extend = (config, { isClient, isDev }) => {

// Prevent warning in log with the md files in the content folder
config.module.rules.push({
test: /\.md$/,
test: /\.md$/,
use: [
{
loader: 'frontmatter-markdown-loader',
Expand Down
4 changes: 2 additions & 2 deletions pkg/rancher-desktop/backend/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ export class KubeClient extends events.EventEmitter {
return {
namespace,
name,
portName: port.name,
port: portNumber,
portName: port.name,
port: portNumber,
listenPort,
};
});
Expand Down
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/backend/kube/lima.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default class LimaKubernetesBackend extends events.EventEmitter implement
}
await this.vm.writeFile('/etc/init.d/cri-dockerd', SERVICE_CRI_DOCKERD_SCRIPT, 0o755);
await this.vm.writeConf('cri-dockerd', {
LOG_DIR: paths.logs,
LOG_DIR: paths.logs,
ENGINE: cfg.kubernetes.containerEngine ?? ContainerEngine.NONE,
});
await this.vm.writeFile('/etc/init.d/k3s', SERVICE_K3S_SCRIPT, 0o755);
Expand Down
10 changes: 5 additions & 5 deletions pkg/rancher-desktop/components/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import Vue from 'vue';
import { mapState } from 'vuex';
export default Vue.extend({
name: 'help',
props: {
name: 'help',
props: {
fixedUrl: {
type: String,
default: null,
type: String,
default: null,
},
tooltip: {
type: String,
Expand All @@ -24,7 +24,7 @@ export default Vue.extend({
return this.helpUrl ? this.tooltip : null;
},
},
methods: {
methods: {
openUrl() {
if (this.helpUrl) {
shell.openExternal(this.helpUrl);
Expand Down
4 changes: 2 additions & 2 deletions pkg/rancher-desktop/components/Images.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
SortableTable,
ImagesOutputWindow,
},
props: {
props: {
images: {
type: Array,
required: true,
Expand Down Expand Up @@ -126,7 +126,7 @@ export default {

data() {
return {
currentCommand: null,
currentCommand: null,
headers:
[
{
Expand Down
12 changes: 6 additions & 6 deletions pkg/rancher-desktop/components/ImagesScanResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import SortableTable from '@pkg/components/SortableTable';
import { BadgeState } from '@rancher/components';
const SEVERITY_MAP = {
LOW: {
LOW: {
color: 'bg-darker',
id: 0,
},
MEDIUM: {
MEDIUM: {
color: 'bg-info',
id: 1,
},
HIGH: {
HIGH: {
color: 'bg-warning',
id: 2,
},
Expand Down Expand Up @@ -42,9 +42,9 @@ export default {
return {
headers: [
{
name: 'Severity',
label: this.t('images.scan.results.headers.severity'),
sort: ['SeverityId:desc', 'PkgName', 'InstalledVersion'],
name: 'Severity',
label: this.t('images.scan.results.headers.severity'),
sort: ['SeverityId:desc', 'PkgName', 'InstalledVersion'],
},
{
name: 'PkgName',
Expand Down
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/components/PathManagementSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default Vue.extend({
RadioGroup,
RadioButton,
},
props: {
props: {
value: {
type: String,
default: PathManagementStrategy.RcFiles,
Expand Down
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/components/PortForwarding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default Vue.extend({
},
},
},
props: {
props: {
services: {
type: Array as PropType<K8s.ServiceEntry[]>,
required: true,
Expand Down
Loading

0 comments on commit aaebc14

Please sign in to comment.