Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore(lint): fix code as per conflicting config
lint code
  • Loading branch information
anshumanv committed Jun 6, 2019
1 parent 5943f26 commit 5bf847c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Expand Up @@ -8,7 +8,6 @@ module.exports = {
},
parserOptions: { ecmaVersion: 2017, sourceType: "module" },
rules: {
"prettier/prettier": "error",
"no-useless-escape": "off",
"quote-props": ["error", "as-needed"],
"no-dupe-keys": "error",
Expand Down
4 changes: 1 addition & 3 deletions bin/cli.js
Expand Up @@ -107,9 +107,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
* used in place of process.stout
*/
const stdout = argv.silent
? {
write: () => {}
} // eslint-disable-line
? { write: () => {} } // eslint-disable-line
: process.stdout;

function ifArg(name, fn, init) {
Expand Down
1 change: 1 addition & 0 deletions bin/config/config-yargs.js
Expand Up @@ -349,6 +349,7 @@ module.exports = function(yargs) {
},
p: {
type: "boolean",
// eslint-disable-next-line quotes
describe: 'shortcut for --optimize-minimize --define process.env.NODE_ENV="production"',
group: BASIC_GROUP
},
Expand Down
1 change: 1 addition & 0 deletions bin/utils/convert-argv.js
Expand Up @@ -24,6 +24,7 @@ module.exports = function(...args) {
}
if (argv.p) {
argv["optimize-minimize"] = true;
// eslint-disable-next-line quotes
argv["define"] = [].concat(argv["define"] || []).concat('process.env.NODE_ENV="production"');
if (!argv.mode) {
argv.mode = "production";
Expand Down
2 changes: 1 addition & 1 deletion packages/generators/init-generator.ts
Expand Up @@ -92,7 +92,7 @@ export default class InitGenerator extends Generator {
}
}

public async prompting() {
public async prompting(): Promise<void | {}> {
const done: () => {} = this.async();
const self: this = this;
let regExpForStyles: string;
Expand Down
2 changes: 0 additions & 2 deletions packages/generators/remove-generator.ts
@@ -1,4 +1,3 @@
import * as fs from "fs";
import * as path from "path";
import * as Generator from "yeoman-generator";

Expand Down Expand Up @@ -34,7 +33,6 @@ export default class RemoveGenerator extends Generator {
};
const { configFile } = opts;
let configPath = path.resolve(process.cwd(), configFile);
const webpackConfigExists = fs.existsSync(configPath);
this.webpackOptions = require(configPath);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/commonsChunkPlugin/commonsChunkPlugin.ts
Expand Up @@ -197,7 +197,7 @@ export default function(j: JSCodeshift, ast: Node): Node {

// eslint-disable-next-line
cacheGroup[chunkKey] = cacheGroup[chunkKey].map(
(prop): any =>
(prop): void | string =>
prop.key.name === "test"
? mergeTestPropArrowFunction(j, chunkKey, pathValue)
: prop
Expand Down
Expand Up @@ -15,7 +15,8 @@ test("plugins-precedence", () => {
"--target",
"async-node",
"--define",
"TEST=\"ok\""
// eslint-disable-next-line quotes
'TEST="ok"'
]);

const summary = extractSummary(stdout);
Expand Down
3 changes: 2 additions & 1 deletion test/binCases/errors/info-verbosity/info-verbosity.test.js
Expand Up @@ -17,6 +17,7 @@ test("info-verbosity", () => {
]);

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

0 comments on commit 5bf847c

Please sign in to comment.