Skip to content

Commit

Permalink
enable some eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed May 11, 2023
1 parent a6668b3 commit 2a5bfc8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .xo-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
"project": "./tsconfig.spec.json"
},
"rules": {
"no-await-in-loop": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"unicorn/prefer-spread": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/no-this-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off"
"@typescript-eslint/no-unsafe-return": "off",
"no-await-in-loop": "off",
"prefer-spread": "off"
},
"overrides": [
{
"files": "test/*",
"rules": {
"max-nested-callbacks": "off",
"prefer-rest-params": "off",
"unicorn/prefer-spread": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/no-this-assignment": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/restrict-plus-operands": "off",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class HelpMixin extends GeneratorOrigin {
let args = '';

if (this._arguments.length > 0) {
args = this._arguments.map(formatArg).join(' ') + ' ';
args = this._arguments.map(arg => formatArg(arg)).join(' ') + ' ';
}

name = name.replace(/^yeoman:/, '');
Expand Down
2 changes: 1 addition & 1 deletion src/actions/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export abstract class TasksMixin extends GeneratorOrigin {
*/
getTaskNames(): string[] {
const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(this));
let validMethods = methods.filter(methodIsValid);
let validMethods = methods.filter(method => methodIsValid(method));
const { taskPrefix } = this.features;

if (taskPrefix) {
Expand Down
2 changes: 1 addition & 1 deletion src/generator-parent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { BaseEnvironment, BaseGenerator, PromptAnswers, PromptQuestions } f
import type Storage from './util/storage.js';
import type { BaseFeatures, BaseOptions } from './index.js';

export class GeneratorOrigin implements BaseGenerator {
export abstract class GeneratorOrigin implements BaseGenerator {
declare env: BaseEnvironment;
declare _destinationRoot: string | undefined;
declare _namespace: string;
Expand Down
4 changes: 2 additions & 2 deletions src/util/deprecate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import _ from 'lodash';
import chalk from 'chalk';

const deprecate = (message, fn) => {
return function () {
return function (...args) {
deprecate.log(message);
return Reflect.apply(fn, this, arguments);
return Reflect.apply(fn, this, args);
};
};

Expand Down

0 comments on commit 2a5bfc8

Please sign in to comment.