Skip to content

Commit 38a0a64

Browse files
committed
Docs: Clarify linebreak-style docs (fixes #5628)
1 parent 31805ed commit 38a0a64

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

docs/rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ These rules are purely matters of style and are quite subjective.
165165
* [jsx-quotes](jsx-quotes.md) - specify whether double or single quotes should be used in JSX attributes (fixable)
166166
* [key-spacing](key-spacing.md) - enforce spacing between keys and values in object literal properties
167167
* [keyword-spacing](keyword-spacing.md) - enforce spacing before and after keywords (fixable)
168-
* [linebreak-style](linebreak-style.md) - disallow mixed 'LF' and 'CRLF' as linebreaks (fixable)
168+
* [linebreak-style](linebreak-style.md) - enforce linebreak style (fixable)
169169
* [lines-around-comment](lines-around-comment.md) - enforce empty lines around comments
170170
* [max-depth](max-depth.md) - specify the maximum depth that blocks can be nested
171171
* [max-len](max-len.md) - specify the maximum length of a line in your program

docs/rules/linebreak-style.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Disallow mixing CRLF and LF linebreaks (linebreak-style)
1+
# Enforce linebreak style (linebreak-style)
22

33
When developing with a lot of people all having different editors, VCS applications and operating systems it may occur that
44
different line endings are written by either of the mentioned (might especially happen when using the windows and mac versions of SourceTree together).
@@ -12,15 +12,14 @@ Many versioning systems (like git and subversion) can automatically ensure the c
1212

1313
## Rule Details
1414

15-
This rule aims to ensure having consistent line endings independent of operating system, VCS or editor used.
15+
This rule aims to ensure having consistent line endings independent of operating system, VCS or editor used across your codebase.
1616

1717
The following patterns are considered problems:
1818

1919
```js
2020
/*eslint linebreak-style: 2*/
2121

22-
var a = 'a', // \r\n
23-
b = 'b'; // \n
22+
var a = 'a'; // \r\n
2423
```
2524

2625
```js

lib/rules/linebreak-style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @fileoverview Rule to forbid mixing LF and LFCR line breaks.
2+
* @fileoverview Rule to enforce a single linebreak style.
33
* @author Erik Mueller
44
* @copyright 2015 Varun Verma. All rights reserverd.
55
* @copyright 2015 James Whitney. All rights reserved.

0 commit comments

Comments
 (0)