diff --git a/lib/rules/typescript.js b/lib/rules/typescript.js index 5b8d64b..1dd9fd7 100644 --- a/lib/rules/typescript.js +++ b/lib/rules/typescript.js @@ -15,22 +15,23 @@ module.exports = { }], '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/ban-types': [ - 'error', - { - types: { - '{}': false, - object: false, - }, - extendDefaults: true, - }, - ], + '@typescript-eslint/no-empty-object-type': 'off', + // '@typescript-eslint/ban-types': [ + // 'error', + // { + // types: { + // '{}': false, + // object: false, + // }, + // extendDefaults: true, + // }, + // ], /** * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.mdx */ semi: 'off', - '@typescript-eslint/semi': [ 'error' ], + // '@typescript-eslint/semi': [ 'error' ], /** * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.mdx @@ -81,22 +82,22 @@ module.exports = { */ '@typescript-eslint/explicit-member-accessibility': 'off', - // https://github.com/typescript-eslint/typescript-eslint/issues/1824#issuecomment-957559729 - // ignore - indent: 'off', - - /** - * Enforce consistent indentation (`indent` from TSLint) - * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.mdx - */ - '@typescript-eslint/indent': [ 'error', 2, { - SwitchCase: 1, - ignoredNodes: [ - 'FunctionExpression > .params[decorators.length > 0]', - 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))', - 'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key', - ], - }], + // // https://github.com/typescript-eslint/typescript-eslint/issues/1824#issuecomment-957559729 + // // ignore + // indent: 'off', + + // /** + // * Enforce consistent indentation (`indent` from TSLint) + // * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.mdx + // */ + // '@typescript-eslint/indent': [ 'error', 2, { + // SwitchCase: 1, + // ignoredNodes: [ + // 'FunctionExpression > .params[decorators.length > 0]', + // 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))', + // 'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key', + // ], + // }], /** * Require that interface names be prefixed with `I` (`interface-name` from TSLint) diff --git a/package.json b/package.json index 1c879d9..ac8f3f8 100644 --- a/package.json +++ b/package.json @@ -14,18 +14,18 @@ "lib" ], "dependencies": { - "@typescript-eslint/eslint-plugin": "^7.14.1", - "@typescript-eslint/parser": "^7.14.1", + "@typescript-eslint/eslint-plugin": "^8.19.1", + "@typescript-eslint/parser": "^8.19.1", "eslint-plugin-eggache": "^2.0.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsdoc": "^46.9.1", "eslint-plugin-node": "^11.1.0" }, "devDependencies": { - "coffee": "^5.4.0", - "egg-bin": "6", - "eslint": "^8.3.0", - "typescript": "^5.2.2" + "coffee": "5", + "@eggjs/bin": "7", + "eslint": "8", + "typescript": "5" }, "repository": { "type": "git", @@ -36,7 +36,6 @@ "scripts": { "lint": "eslint test/*.test.js lib *.js --fix", "test": "egg-bin test --ts false", - "ci": "npm run lint && egg-bin cov", - "contributor": "git-contributor" + "ci": "npm run lint && egg-bin cov" } } diff --git a/test/enforce-node-prefix.test.js b/test/enforce-node-prefix.test.js index 19fabeb..9863383 100644 --- a/test/enforce-node-prefix.test.js +++ b/test/enforce-node-prefix.test.js @@ -8,11 +8,11 @@ describe('test/enforce-node-prefix.test.js', () => { describe('normal', () => { it('should works without error', async () => { await coffee.spawn('eslint', [ 'correct.ts' ], { cwd }) - // .debug() + .debug() .expect('code', 0) .end(); await coffee.spawn('eslint', [ 'correct.js' ], { cwd: cwdJS }) - // .debug() + .debug() .expect('code', 0) .end(); }); diff --git a/test/ts.test.js b/test/ts.test.js index 41e112d..e0c3da5 100644 --- a/test/ts.test.js +++ b/test/ts.test.js @@ -39,17 +39,17 @@ describe('test/ts.test.js', () => { }); }); - describe('semicolon', () => { + describe.only('semicolon', () => { it('should success with semicolon', () => { return coffee.spawn('eslint', [ './semi/semi.ts' ], { cwd }) - // .debug() + .debug() .expect('code', 0) .end(); }); it('should fail without semicolon', () => { return coffee.spawn('eslint', [ './semi/semi-error.ts' ], { cwd }) - // .debug() + .debug() .expect('stdout', /Missing semicolon/) .expect('code', 1) .end();