Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:mapbox/carto
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulon42 committed Mar 3, 2016
2 parents fbd5e82 + 299353a commit 2181629
Show file tree
Hide file tree
Showing 27 changed files with 370 additions and 132 deletions.
191 changes: 191 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
parserOptions:
ecmaVersion: 5
sourceType: module
env:
browser: true
node: true
mocha: true
extends: 'eslint:recommended'
rules:
accessor-pairs: 2
array-bracket-spacing: 0
array-callback-return: 2
arrow-body-style: 2
arrow-parens: 2
arrow-spacing: 2
block-scoped-var: 0
block-spacing:
- 2
- always
brace-style: 0
callback-return: 2
camelcase: 0
comma-spacing: 0
comma-style:
- 2
- last
complexity: 0
computed-property-spacing: 0
consistent-return: 0
consistent-this: 2
curly: 0
default-case: 0
dot-location:
- 2
- property
dot-notation: 0
eol-last: 2
eqeqeq: 0
func-names: 0
func-style: 0
generator-star-spacing: 2
global-require: 0
guard-for-in: 0
handle-callback-err: 2
id-blacklist: 2
id-length: 0
id-match: 2
indent: 0
init-declarations: 0
jsx-quotes: 2
key-spacing: 0
keyword-spacing:
- 2
- after: true
before: true
linebreak-style:
- 2
- unix
lines-around-comment: 2
max-depth: 0
max-len: 0
max-nested-callbacks: 2
max-params: 0
new-parens: 2
newline-after-var: 0
newline-per-chained-call: 0
no-alert: 2
no-array-constructor: 2
no-bitwise: 0
no-caller: 2
no-confusing-arrow: 2
no-console: 0
no-continue: 0
no-div-regex: 2
no-else-return: 0
no-empty-function: 0
no-eq-null: 2
no-eval: 2
no-extend-native: 2
no-extra-bind: 2
no-extra-label: 2
no-extra-parens: 0
no-floating-decimal: 2
no-implicit-globals: 0
no-implied-eval: 2
no-inline-comments: 0
no-inner-declarations:
- 2
- functions
no-invalid-this: 2
no-iterator: 2
no-label-var: 2
no-labels: 2
no-lone-blocks: 2
no-lonely-if: 0
no-loop-func: 0
no-magic-numbers: 0
no-mixed-requires: 0
no-multi-spaces: 0
no-multi-str: 2
no-multiple-empty-lines:
- 2
- max: 3
no-native-reassign: 2
no-negated-condition: 0
no-nested-ternary: 0
no-new: 2
no-new-func: 2
no-new-object: 2
no-new-require: 2
no-new-wrappers: 2
no-octal-escape: 0
no-param-reassign: 0
no-path-concat: 2
no-plusplus: 0
no-process-env: 2
no-process-exit: 2
no-proto: 2
no-restricted-imports: 2
no-restricted-modules: 2
no-restricted-syntax: 2
no-return-assign: 0
no-script-url: 2
no-self-compare: 2
no-sequences: 0
no-shadow: 0
no-shadow-restricted-names: 2
no-spaced-func: 0
no-sync: 0
no-ternary: 0
no-throw-literal: 2
no-trailing-spaces: 2
no-undef-init: 2
no-undefined: 0
no-underscore-dangle: 0
no-unmodified-loop-condition: 0
no-unneeded-ternary:
- 2
- defaultAssignment: true
no-unused-expressions: 0
no-use-before-define: 0
no-useless-call: 2
no-useless-concat: 2
no-useless-constructor: 2
no-var: 0
no-void: 2
no-warning-comments: 0
no-whitespace-before-property: 2
no-with: 2
object-curly-spacing: 0
object-shorthand: 0
one-var: 0
one-var-declaration-per-line: 0
operator-assignment: 0
operator-linebreak: 0
padded-blocks: 0
prefer-arrow-callback: 0
prefer-const: 2
prefer-reflect: 0
prefer-rest-params: 0
prefer-spread: 0
prefer-template: 0
quote-props: 0
quotes: 0
radix:
- 2
- always
require-jsdoc: 0
require-yield: 2
semi: 0
semi-spacing:
- 2
- after: true
before: false
sort-imports: 2
sort-vars: 0
space-before-blocks: 0
space-before-function-paren: 0
space-in-parens: 0
space-infix-ops: 0
space-unary-ops: 0
spaced-comment: 0
strict:
- 2
- never
template-curly-spacing: 2
valid-jsdoc: 0
vars-on-top: 0
wrap-regex: 0
yield-star-spacing: 2
yoda: 0
6 changes: 3 additions & 3 deletions lib/carto/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var carto = {
if (typeof(extract[2]) === 'string') {
error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey'));
}
error = options.indent + error.join('\n' + options.indent) + '\033[0m\n';
error = options.indent + error.join('\n' + options.indent) + '\x1B[0m\n';

message = options.indent + message + stylize(ctx.message, 'red');
if (ctx.filename) (message += stylize(' in ', 'red') + ctx.filename);
Expand Down Expand Up @@ -88,6 +88,6 @@ function stylize(str, style) {
'red' : [31, 39],
'grey' : [90, 39]
};
return '\033[' + styles[style][0] + 'm' + str +
'\033[' + styles[style][1] + 'm';
return '\x1B[' + styles[style][0] + 'm' + str +
'\x1B[' + styles[style][1] + 'm';
}
Loading

0 comments on commit 2181629

Please sign in to comment.