mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 23:37:55 -05:00
[Docs] add reference to spaced-comment rule; flesh out options
This commit is contained in:
@@ -1922,7 +1922,7 @@ Other Style Guides
|
||||
}
|
||||
```
|
||||
|
||||
- [17.3](#comments--spaces) Start all comments with a space to make it easier to read.
|
||||
- [17.3](#comments--spaces) Start all comments with a space to make it easier to read. eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
@@ -351,9 +351,18 @@ module.exports = {
|
||||
}],
|
||||
|
||||
// require or disallow a space immediately following the // or /* in a comment
|
||||
// http://eslint.org/docs/rules/spaced-comment
|
||||
// TODO: semver-major: set balanced to "false"
|
||||
'spaced-comment': ['error', 'always', {
|
||||
exceptions: ['-', '+'],
|
||||
markers: ['=', '!'] // space here to support sprockets directives
|
||||
line: {
|
||||
exceptions: ['-', '+'],
|
||||
markers: ['=', '!'], // space here to support sprockets directives
|
||||
},
|
||||
block: {
|
||||
exceptions: ['-', '+'],
|
||||
markers: ['=', '!'], // space here to support sprockets directives
|
||||
balanced: false,
|
||||
}
|
||||
}],
|
||||
|
||||
// require or disallow the Unicode Byte Order Mark
|
||||
|
||||
Reference in New Issue
Block a user