diff --git a/.changeset/disable-complexity-rules.md b/.changeset/disable-complexity-rules.md new file mode 100644 index 00000000..a30251ca --- /dev/null +++ b/.changeset/disable-complexity-rules.md @@ -0,0 +1,6 @@ +--- +'@css-modules-kit/core': patch +'@css-modules-kit/ts-plugin': patch +--- + +chore: disable complexity and max-params ESLint rules diff --git a/eslint.config.js b/eslint.config.js index 74c58e1f..d65f9e2a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -52,6 +52,10 @@ export default [ // Disable because it does not work in the workspace // ref: https://github.com/eslint-community/eslint-plugin-n/issues/209 'n/no-extraneous-import': 'off', + // Disabled because it's too strict + 'complexity': 'off', + // Disabled because it's too strict + 'max-params': 'off', }, }, mizdra.prettierConfig, diff --git a/packages/core/src/checker.ts b/packages/core/src/checker.ts index ee86b3de..d9c2023a 100644 --- a/packages/core/src/checker.ts +++ b/packages/core/src/checker.ts @@ -20,7 +20,6 @@ export interface CheckerArgs { getCSSModule: (path: string) => CSSModule | undefined; } -// eslint-disable-next-line complexity export function checkCSSModule(cssModule: CSSModule, args: CheckerArgs): Diagnostic[] { const { config } = args; const diagnostics: Diagnostic[] = []; diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index dab60beb..ba1848c0 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -101,7 +101,6 @@ function isTsConfigFileExists(fileName: string): boolean { return ts.findConfigFile(dirname(fileName), ts.sys.fileExists.bind(ts.sys), basename(fileName)) !== undefined; } -// eslint-disable-next-line complexity function parseRawData(raw: unknown, tsConfigSourceFile: ts.TsConfigSourceFile): ParsedRawData { const result: ParsedRawData = { config: {}, diff --git a/packages/core/src/typing/typescript.d.ts b/packages/core/src/typing/typescript.d.ts index 8708ebf6..c344a31d 100644 --- a/packages/core/src/typing/typescript.d.ts +++ b/packages/core/src/typing/typescript.d.ts @@ -5,7 +5,7 @@ declare module 'typescript' { readonly files: readonly string[]; readonly directories: readonly string[]; } - // eslint-disable-next-line max-params + export function matchFiles( path: string, extensions: readonly string[] | undefined, diff --git a/packages/ts-plugin/src/language-service/feature/semantic-diagnostic.ts b/packages/ts-plugin/src/language-service/feature/semantic-diagnostic.ts index 1cb8cc87..6b84cdb5 100644 --- a/packages/ts-plugin/src/language-service/feature/semantic-diagnostic.ts +++ b/packages/ts-plugin/src/language-service/feature/semantic-diagnostic.ts @@ -4,7 +4,6 @@ import type { Language } from '@volar/language-core'; import type ts from 'typescript'; import { CMK_DATA_KEY, isCSSModuleScript } from '../../language-plugin.js'; -// eslint-disable-next-line max-params export function getSemanticDiagnostics( language: Language, languageService: ts.LanguageService, diff --git a/packages/ts-plugin/src/language-service/proxy.ts b/packages/ts-plugin/src/language-service/proxy.ts index 95a5cd81..35a57367 100644 --- a/packages/ts-plugin/src/language-service/proxy.ts +++ b/packages/ts-plugin/src/language-service/proxy.ts @@ -10,7 +10,6 @@ import { getApplicableRefactors, getEditsForRefactor } from './feature/refactor. import { getSemanticDiagnostics } from './feature/semantic-diagnostic.js'; import { getSyntacticDiagnostics } from './feature/syntactic-diagnostic.js'; -// eslint-disable-next-line max-params export function proxyLanguageService( language: Language, languageService: ts.LanguageService,