Bug: `capitalized-comments` yelling about an inline comment
See original GitHub issueTell us about your environment
Environment Info:
Node version: v14.0.0
npm version: v6.14.4
Local ESLint version: v6.8.0 (Currently used)
Global ESLint version: Not found
What parser (default, Babel-ESLint, etc.) are you using?
@typescript-eslint/parser
Please show your full configuration:
Configuration
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
parserOptions: {
// Enable linting rules with type information from our tsconfig
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
sourceType: 'module', // Allow the use of imports / ES modules
ecmaFeatures: {
impliedStrict: true, // Enable global strict mode
},
},
// Specify global variables that are predefined
env: {
node: true, // Enable node global variables & Node.js scoping
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
},
plugins: [
],
extends: [
'@xpring-eng/eslint-config-base',
],
rules: {},
overrides: [],
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
const example = {
nonce: 'abc', // a numeric string
}
eslint . --ext .ts
What did you expect to happen? I expected to not get a warning on an uncapitalized inline comment.
What actually happened? Please include the actual, raw output from ESLint.
55:7 warning Variable 'example' is declared but its value is never read. Allowed unused names must match /^_/ @typescript-eslint/no-unused-vars-experimental
55:7 warning 'example' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars
56:17 warning Comments should not begin with a lowercase character capitalized-comments
Are you willing to submit a pull request to fix this bug?
Yes, with some guidance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
capitalized-comments - ESLint - Pluggable JavaScript Linter
Setting the ignoreInlineComments option to true means that comments in the middle of code (with a token on the same line as the...
Read more >All caps - Wikipedia
In typography, all caps (short for "all capitals") refers to text or a font in which all letters are capital letters, for example:...
Read more >Ruby Style Guide
Use one space between the leading # character of the comment and the text of the comment. English Syntax. Comments longer than a...
Read more >How should I style my code comments for optimal readability ...
I tend to capitalize certain terms so I can find them throughout the code base like “TODO:” and “BUGFIX:”. Other than that, I...
Read more >Inline comment is broken if a page contains a link to ... - Jira
We have this issue to often to consider inline comments as a stable feature. Sometimes I get the error on one word and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can this be open ? this issue seems reasonable
cool, yes I think this will be good change 👍
May be this is an
enhancement
instead ofbug
cause currently, the rule is working as intended 👍