@dmitryrechkin/eslint-standard 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dmitryrechkin/eslint-standard",
|
|
3
3
|
"description": "This package provides a shared ESLint configuration which includes TypeScript support and a set of specific linting rules designed to ensure high-quality and consistent code style across projects.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.8",
|
|
5
5
|
"main": "eslint.config.mjs",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eslint-standard": "./src/cli/index.mjs"
|
|
@@ -73,7 +73,7 @@ const switchCaseBraceRule = {
|
|
|
73
73
|
messageId: 'expectedNewlineAfterOpeningBrace',
|
|
74
74
|
fix(fixer) {
|
|
75
75
|
// Add newline and proper indentation after opening brace
|
|
76
|
-
const indentation = '\t'.repeat(getIndentLevel(node) +
|
|
76
|
+
const indentation = '\t'.repeat(getIndentLevel(node) + 1);
|
|
77
77
|
const fixes = [];
|
|
78
78
|
|
|
79
79
|
// Add newline after opening brace
|
|
@@ -82,7 +82,7 @@ const switchCaseBraceRule = {
|
|
|
82
82
|
// Also ensure closing brace is on its own line with proper indentation
|
|
83
83
|
const lastStatement = blockStatement.body[blockStatement.body.length - 1];
|
|
84
84
|
const lastToken = sourceCode.getLastToken(lastStatement);
|
|
85
|
-
const closingBraceIndentation = '\t'.repeat(getIndentLevel(node)
|
|
85
|
+
const closingBraceIndentation = '\t'.repeat(getIndentLevel(node));
|
|
86
86
|
|
|
87
87
|
if (lastToken.loc.end.line === closingBrace.loc.start.line) {
|
|
88
88
|
fixes.push(fixer.insertTextBefore(closingBrace, `\n${closingBraceIndentation}`));
|