-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle unset and invalid values from editor config #47
Co-authored-by: Barthélemy Laurans <[email protected]>
- Loading branch information
1 parent
429e716
commit 7fb8aa6
Showing
7 changed files
with
135 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = cf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.fixture] | ||
indent_style = foo | ||
indent_size = bar | ||
end_of_line = baz | ||
insert_final_newline = qux | ||
trim_trailing_whitespace = quux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = cf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.fixture] | ||
indent_style = unset | ||
indent_size = unset | ||
end_of_line = unset | ||
insert_final_newline = unset | ||
trim_trailing_whitespace = unset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
charset: { | ||
name: 'encoding', | ||
types: ['string'], | ||
regexp: /^.*$/, | ||
}, | ||
insert_final_newline: { | ||
name: 'newline', | ||
types: ['boolean'], | ||
regexp: false, | ||
}, | ||
indent_style: { | ||
name: 'indentation', | ||
types: ['string'], | ||
regexp: /^tab|space$/i, | ||
}, | ||
indent_size: { | ||
name: 'spaces', | ||
types: ['number'], | ||
regexp: false, | ||
}, | ||
trim_trailing_whitespace: { | ||
name: 'trailingspaces', | ||
types: ['boolean'], | ||
regexp: false, | ||
}, | ||
end_of_line: { | ||
name: 'endOfLine', | ||
types: ['string'], | ||
regexp: /^lf|crlf|cr$/i, | ||
}, | ||
}; |