Skip to content

Commit 195683b

Browse files
committed
feat(config): update version and formatting rules 🌺
- Bump version to 0.3.0 - Add brace position and spacing configuration options - Enforce consistent brace usage in conditional statements
1 parent 93a083c commit 195683b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

deno.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@neabyte/deno-lint",
33
"description": "Deno lint plugin collection for identifying and reporting on patterns found in code",
4-
"version": "0.2.1",
4+
"version": "0.3.0",
55
"type": "module",
66
"license": "MIT",
77
"exports": "./src/index.ts",
@@ -30,13 +30,18 @@
3030
"useUnknownInCatchVariables": true
3131
},
3232
"fmt": {
33+
"bracePosition": "sameLine",
3334
"indentWidth": 2,
3435
"lineWidth": 100,
3536
"proseWrap": "preserve",
3637
"semiColons": false,
38+
"singleBodyPosition": "nextLine",
3739
"singleQuote": true,
38-
"useTabs": false,
39-
"trailingCommas": "never"
40+
"spaceAround": false,
41+
"spaceSurroundingProperties": true,
42+
"trailingCommas": "never",
43+
"useBraces": "always",
44+
"useTabs": false
4045
},
4146
"lint": {
4247
"include": ["src/"],

src/utils/FixUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export function createAddSuffixFix(
126126
return (fixer: types.LintFixer): unknown => {
127127
const original = context.sourceCode.getText(node)
128128
const functionName = utils.getFunctionName(node)
129-
if (!functionName) return null
129+
if (!functionName) {
130+
return null
131+
}
130132
const newText = original.replace(
131133
new RegExp(`(async\\s+function\\s+)${utils.escapeRegExp(functionName)}(\\s*\\()`),
132134
`$1${functionName}${suffix}$2`

0 commit comments

Comments
 (0)