Format all internal CoffeeScript code to indent_size=2
- Using Atom Beautify's Beautify Directory feature - Using coffee-fmt - Only has one bug: https://github.com/sterpe/coffee-fmt/issues/16
This commit is contained in:
parent
72e4384cf8
commit
b0d8dfa6fb
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"indentation" : {
|
||||
"level" : "error",
|
||||
"value" : 4
|
||||
"value" : 2
|
||||
},
|
||||
"line_endings" : {
|
||||
"value" : "unix",
|
||||
|
|
|
@ -144,10 +144,12 @@
|
|||
],
|
||||
"devDependencies": {
|
||||
"coffee-script": "^1.9.3",
|
||||
"coffeelint": "^1.10.1",
|
||||
"handlebars": "^3.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "npm run docs",
|
||||
"docs": "coffee docs/"
|
||||
"docs": "coffee docs/",
|
||||
"lint": "coffeelint src/"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ describe "BeautifyLanguages", ->
|
|||
# All Atom packages that Atom Beautify is dependent on
|
||||
dependentPackages = [
|
||||
'autocomplete-plus'
|
||||
'linter'
|
||||
# 'linter'
|
||||
# 'atom-typescript' # it logs too much...
|
||||
]
|
||||
# Add language packages to dependentPackages
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"indent_size": 4,
|
||||
"indent_size": 2,
|
||||
"indent_char": " ",
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": false,
|
||||
|
|
|
@ -84,7 +84,7 @@ module.exports = class Beautifier
|
|||
If platform is Windows
|
||||
###
|
||||
isWindows: do ->
|
||||
return /^win/.test(process.platform)
|
||||
return new RegExp('^win').test(process.platform)
|
||||
|
||||
###
|
||||
Get Shell Environment variables
|
||||
|
|
|
@ -7,7 +7,9 @@ module.exports = class CoffeeFmt extends Beautifier
|
|||
options: {
|
||||
# Apply language-specific options
|
||||
CoffeeScript:
|
||||
tab: ["indent_size", "indent_char", "indent_with_tabs", (indentSize, indentChar, indentWithTabs) ->
|
||||
tab: ["indent_size", \
|
||||
"indent_char", "indent_with_tabs", \
|
||||
(indentSize, indentChar, indentWithTabs) ->
|
||||
return "\t" if indentWithTabs
|
||||
Array(indentSize+1).join(indentChar)
|
||||
]
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue