chore: add comment style rules to eslint config

Add ESLint rules to enforce comment style:
- Require space after // in single-line comments
- Prefer JSDoc style for multi-line comments
- Warn on TODO/FIXME/HACK comments
- Update documentation with comment style guide
This commit is contained in:
imfozilbek
2025-11-23 21:42:51 +05:00
parent f7a02db7df
commit 6fe90a708b
2 changed files with 32 additions and 0 deletions

View File

@@ -129,6 +129,31 @@ export default tseslint.config(
ignoreDeclarationSort: true,
},
],
// ========================================
// Comments
// ========================================
'no-inline-comments': 'off',
'line-comment-position': 'off',
'spaced-comment': [
'error',
'always',
{
markers: ['/'],
exceptions: ['-', '+', '*', '='],
block: {
balanced: true,
},
},
],
'multiline-comment-style': ['warn', 'starred-block'],
'no-warning-comments': [
'warn',
{
terms: ['todo', 'fixme', 'hack', 'xxx'],
location: 'start',
},
],
},
},
);