Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 0fed316

Browse files
committed
fix: adjust stylistic configs
1 parent 34d24eb commit 0fed316

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

configs/base.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {setFilesIfUndef} from './util.js';
99

1010
/** @typedef {import('eslint').Linter} Linter */
1111

12+
/** @type {Linter.Config[]} */
1213
export const importConfig = [
1314
importPlugin.flatConfigs.recommended,
1415
{
@@ -268,7 +269,6 @@ const baseConfig = [
268269
'@stylistic': stylistic,
269270
},
270271
rules: {
271-
'@stylistic/indent': ['error', 'tab', {tabLength: 2}],
272272
'@stylistic/max-len': [
273273
'warn',
274274
{
@@ -282,6 +282,28 @@ const baseConfig = [
282282
ignoreRegExpLiterals: true,
283283
},
284284
],
285+
'@stylistic/indent': ['error', 'tab', {
286+
SwitchCase: 1,
287+
tabLength: 2,
288+
flatTernaryExpressions: true,
289+
offsetTernaryExpressions: true,
290+
}],
291+
'@stylistic/indent-binary-ops': ['error', 'tab'],
292+
293+
'@stylistic/quotes': ['error', 'single', {
294+
avoidEscape: true,
295+
}],
296+
'@stylistic/function-paren-newline': ['error', 'consistent'],
297+
'@stylistic/arrow-parens': ['error', 'as-needed', {requireForBlockBody: true}],
298+
'@stylistic/operator-linebreak': ['error', 'after'],
299+
'@stylistic/multiline-ternary': ['error', 'always-multiline'],
300+
'@stylistic/no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
301+
'@stylistic/object-curly-newline': ['error', {
302+
ObjectExpression: {multiline: true, consistent: true},
303+
ObjectPattern: {multiline: true, consistent: true},
304+
ImportDeclaration: {multiline: true, consistent: true},
305+
ExportDeclaration: {multiline: true, consistent: true},
306+
}],
285307
},
286308
},
287309
];

0 commit comments

Comments
 (0)