Skip to content

Commit 61cb7a5

Browse files
mizdraclaude
andauthored
chore(eslint): disable complexity and max-params rules (#306)
These rules are too strict for this project. Disable them globally in eslint.config.js and remove the individual inline disable comments. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a998b29 commit 61cb7a5

7 files changed

Lines changed: 11 additions & 5 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@css-modules-kit/core': patch
3+
'@css-modules-kit/ts-plugin': patch
4+
---
5+
6+
chore: disable complexity and max-params ESLint rules

eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export default [
5252
// Disable because it does not work in the workspace
5353
// ref: https://github.com/eslint-community/eslint-plugin-n/issues/209
5454
'n/no-extraneous-import': 'off',
55+
// Disabled because it's too strict
56+
'complexity': 'off',
57+
// Disabled because it's too strict
58+
'max-params': 'off',
5559
},
5660
},
5761
mizdra.prettierConfig,

packages/core/src/checker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export interface CheckerArgs {
2020
getCSSModule: (path: string) => CSSModule | undefined;
2121
}
2222

23-
// eslint-disable-next-line complexity
2423
export function checkCSSModule(cssModule: CSSModule, args: CheckerArgs): Diagnostic[] {
2524
const { config } = args;
2625
const diagnostics: Diagnostic[] = [];

packages/core/src/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function isTsConfigFileExists(fileName: string): boolean {
101101
return ts.findConfigFile(dirname(fileName), ts.sys.fileExists.bind(ts.sys), basename(fileName)) !== undefined;
102102
}
103103

104-
// eslint-disable-next-line complexity
105104
function parseRawData(raw: unknown, tsConfigSourceFile: ts.TsConfigSourceFile): ParsedRawData {
106105
const result: ParsedRawData = {
107106
config: {},

packages/core/src/typing/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare module 'typescript' {
55
readonly files: readonly string[];
66
readonly directories: readonly string[];
77
}
8-
// eslint-disable-next-line max-params
8+
99
export function matchFiles(
1010
path: string,
1111
extensions: readonly string[] | undefined,

packages/ts-plugin/src/language-service/feature/semantic-diagnostic.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { Language } from '@volar/language-core';
44
import type ts from 'typescript';
55
import { CMK_DATA_KEY, isCSSModuleScript } from '../../language-plugin.js';
66

7-
// eslint-disable-next-line max-params
87
export function getSemanticDiagnostics(
98
language: Language<string>,
109
languageService: ts.LanguageService,

packages/ts-plugin/src/language-service/proxy.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { getApplicableRefactors, getEditsForRefactor } from './feature/refactor.
1010
import { getSemanticDiagnostics } from './feature/semantic-diagnostic.js';
1111
import { getSyntacticDiagnostics } from './feature/syntactic-diagnostic.js';
1212

13-
// eslint-disable-next-line max-params
1413
export function proxyLanguageService(
1514
language: Language<string>,
1615
languageService: ts.LanguageService,

0 commit comments

Comments
 (0)