Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/disable-complexity-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@css-modules-kit/core': patch
'@css-modules-kit/ts-plugin': patch
---

chore: disable complexity and max-params ESLint rules
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/typing/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>,
languageService: ts.LanguageService,
Expand Down
1 change: 0 additions & 1 deletion packages/ts-plugin/src/language-service/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>,
languageService: ts.LanguageService,
Expand Down