Skip to content

Commit 5bf847c

Browse files
committed
chore(lint): fix code as per conflicting config
lint code
1 parent 5943f26 commit 5bf847c

File tree

9 files changed

+9
-10
lines changed

9 files changed

+9
-10
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
},
99
parserOptions: { ecmaVersion: 2017, sourceType: "module" },
1010
rules: {
11-
"prettier/prettier": "error",
1211
"no-useless-escape": "off",
1312
"quote-props": ["error", "as-needed"],
1413
"no-dupe-keys": "error",

bin/cli.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
107107
* used in place of process.stout
108108
*/
109109
const stdout = argv.silent
110-
? {
111-
write: () => {}
112-
} // eslint-disable-line
110+
? { write: () => {} } // eslint-disable-line
113111
: process.stdout;
114112

115113
function ifArg(name, fn, init) {

bin/config/config-yargs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ module.exports = function(yargs) {
349349
},
350350
p: {
351351
type: "boolean",
352+
// eslint-disable-next-line quotes
352353
describe: 'shortcut for --optimize-minimize --define process.env.NODE_ENV="production"',
353354
group: BASIC_GROUP
354355
},

bin/utils/convert-argv.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = function(...args) {
2424
}
2525
if (argv.p) {
2626
argv["optimize-minimize"] = true;
27+
// eslint-disable-next-line quotes
2728
argv["define"] = [].concat(argv["define"] || []).concat('process.env.NODE_ENV="production"');
2829
if (!argv.mode) {
2930
argv.mode = "production";

packages/generators/init-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default class InitGenerator extends Generator {
9292
}
9393
}
9494

95-
public async prompting() {
95+
public async prompting(): Promise<void | {}> {
9696
const done: () => {} = this.async();
9797
const self: this = this;
9898
let regExpForStyles: string;

packages/generators/remove-generator.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as fs from "fs";
21
import * as path from "path";
32
import * as Generator from "yeoman-generator";
43

@@ -34,7 +33,6 @@ export default class RemoveGenerator extends Generator {
3433
};
3534
const { configFile } = opts;
3635
let configPath = path.resolve(process.cwd(), configFile);
37-
const webpackConfigExists = fs.existsSync(configPath);
3836
this.webpackOptions = require(configPath);
3937
}
4038

packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default function(j: JSCodeshift, ast: Node): Node {
197197

198198
// eslint-disable-next-line
199199
cacheGroup[chunkKey] = cacheGroup[chunkKey].map(
200-
(prop): any =>
200+
(prop): void | string =>
201201
prop.key.name === "test"
202202
? mergeTestPropArrowFunction(j, chunkKey, pathValue)
203203
: prop

test/binCases/configFile/plugins-precedence/plugins-precedence.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ test("plugins-precedence", () => {
1515
"--target",
1616
"async-node",
1717
"--define",
18-
"TEST=\"ok\""
18+
// eslint-disable-next-line quotes
19+
'TEST="ok"'
1920
]);
2021

2122
const summary = extractSummary(stdout);

test/binCases/errors/info-verbosity/info-verbosity.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ test("info-verbosity", () => {
1717
]);
1818

1919
expect(stderr).toContain("Invalid values:");
20-
expect(stderr).toContain("Argument: info-verbosity, Given: \"false\", Choices: \"none\", \"info\", \"verbose\"");
20+
// eslint-disable-next-line quotes
21+
expect(stderr).toContain('Argument: info-verbosity, Given: "false", Choices: "none", "info", "verbose"');
2122
// snapshot not needed
2223
});

0 commit comments

Comments
 (0)