Skip to content

Commit db1e490

Browse files
authored
chore(linter): enable neostandard semicolon mode (#1138)
1 parent 4d967bf commit db1e490

32 files changed

Lines changed: 67 additions & 68 deletions

components/metadata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ export async function getMetadata(argv, skipRefs, cli) {
114114
...result,
115115
json: formatMetadataResult(result)
116116
};
117-
};
117+
}

eslint.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import importPlugin from 'eslint-plugin-import';
77

88
export default [
99
pluginJs.configs.recommended,
10-
...neostandard(),
10+
...neostandard({ semi: true }),
1111
nodePlugin.configs['flat/recommended'],
1212
pluginPromise.configs['flat/recommended'],
1313
importPlugin.flatConfigs.recommended,
@@ -28,7 +28,6 @@ export default [
2828
ecmaVersion: 'latest',
2929
},
3030
rules: {
31-
'@stylistic/semi': ['error', 'always'],
3231
'@stylistic/space-before-function-paren': ['error', 'never'],
3332
'@stylistic/no-multi-spaces': ['error', { ignoreEOLComments: true }],
3433
camelcase: 'off',

lib/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function auth(
9494
'and run the following command to add it to your ncu config: ' +
9595
'ncu-config --global set -x jenkins_token'
9696
);
97-
};
97+
}
9898
check(username, jenkins_token);
9999
const jenkins = encode(username, jenkins_token);
100100
setOwnProperty(result, 'jenkins', jenkins);

lib/backport_session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export default class BackportSession extends Session {
273273
const upstreamCommit = this.getBranchCommit(`${this.upstream}/${branch}`);
274274

275275
return localCommit === upstreamCommit;
276-
};
276+
}
277277

278278
isLocalBranchExists(branch) {
279279
try {

lib/ci/failure_aggregator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class FailureAggregator {
4949
data.push({
5050
reason, type: failures[0].type, failures, prs, machines
5151
});
52-
};
52+
}
5353

5454
const groupedByType = _.groupBy(data, 'type');
5555
for (const type of Object.keys(groupedByType)) {

lib/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export default class CLI {
217217
setExitCode(statusCode) {
218218
process.exitCode = statusCode;
219219
}
220-
};
220+
}
221221

222222
CLI.SPINNER_STATUS = SPINNER_STATUS;
223223
CLI.QUESTION_TYPE = QUESTION_TYPE;

lib/config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function getMergedConfig(dir, home, additional) {
4040
...Object.getOwnPropertyDescriptors(additional),
4141
})
4242
: mergedConfig;
43-
};
43+
}
4444
export function clearCachedConfig() {
4545
mergedConfig = null;
4646
}
@@ -117,7 +117,7 @@ export function getConfig(configType, dir, raw = false) {
117117
} catch (cause) {
118118
throw new Error('Unable to parse config file ' + configPath, { cause });
119119
}
120-
};
120+
}
121121

122122
function getConfigPath(configType, dir) {
123123
switch (configType) {
@@ -135,7 +135,7 @@ function getConfigPath(configType, dir) {
135135
default:
136136
throw Error('Invalid configType');
137137
}
138-
};
138+
}
139139

140140
function writeConfig(configType, obj, dir) {
141141
const configPath = getConfigPath(configType, dir);
@@ -158,20 +158,20 @@ function writeConfig(configType, obj, dir) {
158158
}
159159
writeJson(configPath, obj);
160160
return configPath;
161-
};
161+
}
162162

163163
export function updateConfig(configType, obj, dir) {
164164
const config = getConfig(configType, dir, true);
165165
writeConfig(configType, Object.assign(config, obj), dir);
166-
};
166+
}
167167

168168
export function getHomeDir(home) {
169169
if (process.env.XDG_CONFIG_HOME) {
170170
return process.env.XDG_CONFIG_HOME;
171171
}
172172
return home || os.homedir();
173-
};
173+
}
174174

175175
export function getNcuDir(dir) {
176176
return path.join(dir || process.cwd(), '.ncu');
177-
};
177+
}

lib/file.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function appendFile(file, content) {
88
}
99
// TODO(joyeecheung): what if the file is a dir?
1010
fs.appendFileSync(file, content, 'utf8');
11-
};
11+
}
1212

1313
export function writeFile(file, content) {
1414
const parts = path.parse(file);
@@ -17,26 +17,26 @@ export function writeFile(file, content) {
1717
}
1818
// TODO(joyeecheung): what if the file is a dir?
1919
fs.writeFileSync(file, content, 'utf8');
20-
};
20+
}
2121

2222
export function writeJson(file, obj) {
2323
writeFile(file, `${JSON.stringify(obj, null, 2)}\n`);
24-
};
24+
}
2525

2626
export function readFile(file) {
2727
if (fs.existsSync(file)) {
2828
return fs.readFileSync(file, 'utf8');
2929
}
3030
return '';
31-
};
31+
}
3232

3333
export function readJson(file) {
3434
const content = readFile(file);
3535
if (content) {
3636
return JSON.parse(content);
3737
}
3838
return {};
39-
};
39+
}
4040

4141
export function removeDirectory(directory) {
4242
return fs.promises.rm(directory, { recursive: true, force: true });

lib/landing_session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ export default class LandingSession extends Session {
510510
cli.log('A git rebase/am is in progress.' +
511511
' Please complete it before running git node land --final');
512512
return;
513-
};
513+
}
514514

515515
const stray = this.getStrayCommits();
516516
if (stray.length > 1) {

lib/links.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ export function parsePRFromURL(url) {
100100
};
101101
}
102102
return undefined;
103-
};
103+
}
104104

105105
export function getPrURL({ owner, repo, prid }) {
106106
return `https://github.com/${owner}/${repo}/pull/${prid}`;
107-
};
107+
}
108108

109109
export function getMachineUrl(machine) {
110110
return `[${machine.hostname}](${machine.url})`;
111-
};
111+
}
112112

113113
const PR_URL_RE = /PR-URL: https:\/\/github.com\/.+/;
114114
export function parsePrURL(text) {
@@ -120,4 +120,4 @@ export function parsePrURL(text) {
120120
return undefined;
121121
}
122122
return parsePRFromURL(match[0]);
123-
};
123+
}

0 commit comments

Comments
 (0)