Skip to content

Commit d3b4163

Browse files
committed
refactor: update ESLint configuration to use Linter.FlatConfig and enhance max-len rule settings
1 parent 961dc99 commit d3b4163

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

eslint.config.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import js from '@eslint/js';
2-
import type { ESLint } from 'eslint';
2+
import type { Linter } from 'eslint';
33
import tseslint from '@typescript-eslint/eslint-plugin';
44
import tsparser from '@typescript-eslint/parser';
55
import prettierConfig from 'eslint-config-prettier';
66
import prettierPlugin from 'eslint-plugin-prettier';
77
import globals from 'globals';
88

9-
const config: ESLint.ConfigData = [
9+
const config: Linter.FlatConfig[] = [
1010
// Base JavaScript configuration
1111
js.configs.recommended,
1212

@@ -56,7 +56,7 @@ const config: ESLint.ConfigData = [
5656
},
5757
},
5858
plugins: {
59-
'@typescript-eslint': tseslint,
59+
'@typescript-eslint': tseslint as any,
6060
prettier: prettierPlugin,
6161
},
6262
rules: {
@@ -99,6 +99,20 @@ const config: ESLint.ConfigData = [
9999
'prefer-const': 'warn',
100100
'no-constant-condition': 'warn',
101101
'no-constant-binary-expression': 'warn',
102+
103+
// Line length limit
104+
'max-len': [
105+
'warn',
106+
{
107+
code: 512,
108+
tabWidth: 2,
109+
ignoreUrls: true,
110+
ignoreStrings: true,
111+
ignoreTemplateLiterals: true,
112+
ignoreRegExpLiterals: true,
113+
ignoreComments: false,
114+
},
115+
],
102116
},
103117
settings: {
104118
react: {

0 commit comments

Comments
 (0)