Skip to content

Commit

Permalink
[eslint] fix indentation and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 16, 2022
1 parent 42635cd commit e5f5067
Show file tree
Hide file tree
Showing 16 changed files with 764 additions and 788 deletions.
86 changes: 36 additions & 50 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,54 +1,40 @@
{
"root": true,
"root": true,

"extends": "@ljharb/eslint-config/node/0.4",
"extends": "@ljharb/eslint-config/node/0.4",

"rules": {
"array-bracket-spacing": 0,
"array-element-newline": 0,
"brace-style": 1,
"camelcase": 1,
"comma-dangle": 1,
"comma-spacing": 1,
"complexity": 0,
"curly": 1,
"dot-notation": 1,
"eol-last": 1,
"func-style": 1,
"function-paren-newline": 1,
"indent": [1, 4],
"key-spacing": 1,
"max-lines-per-function": 0,
"max-nested-callbacks": 1,
"max-statements": 0,
"multiline-comment-style": 1,
"no-array-constructor": 1,
"no-continue": 1,
"no-div-regex": 1,
"no-extra-parens": 1,
"no-mixed-operators": 1,
"no-multi-spaces": 1,
"no-multiple-empty-lines": 1,
"no-param-reassign": 1,
"no-plusplus": 1,
"no-proto": 1,
"no-redeclare": 1,
"no-restricted-syntax": 1,
"no-shadow": 1,
"no-trailing-spaces": 1,
"no-unused-vars": 1,
"no-use-before-define": 1,
"object-curly-newline": 1,
"object-curly-spacing": 1,
"operator-linebreak": 1,
"quote-props": 1,
"quotes": 1,
"semi-style": 1,
"semi": 1,
"space-before-blocks": 1,
"space-before-function-paren": 1,
"space-infix-ops": 1,
"strict": 1,
"wrap-regex": 1,
},
"rules": {
"array-element-newline": 0,
"camelcase": 1,
"comma-dangle": 1,
"complexity": 0,
"curly": 1,
"dot-notation": 1,
"func-style": 1,
"max-lines-per-function": 0,
"max-nested-callbacks": 1,
"max-statements": 0,
"multiline-comment-style": 0,
"no-array-constructor": 1,
"no-continue": 1,
"no-div-regex": 1,
"no-extra-parens": 1,
"no-mixed-operators": 1,
"no-param-reassign": 1,
"no-plusplus": 1,
"no-proto": 1,
"no-redeclare": 1,
"no-restricted-syntax": 1,
"no-shadow": 1,
"no-unused-vars": 1,
"no-use-before-define": 1,
"object-curly-newline": 1,
"operator-linebreak": 1,
"quote-props": 1,
"quotes": 1,
"semi-style": 1,
"semi": 1,
"strict": 1,
"wrap-regex": 1,
},
}
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ $ node example/parse.js -a beep -b boop

```
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
x: 3,
y: 4,
n: 5,
a: true,
b: true,
c: true,
beep: 'boop' }
{
_: ['foo', 'bar', 'baz'],
x: 3,
y: 4,
n: 5,
a: true,
b: true,
c: true,
beep: 'boop'
}
```

# methods
Expand Down Expand Up @@ -71,10 +73,12 @@ argument names to use as aliases
* `opts['--']` - when true, populate `argv._` with everything before the `--`
and `argv['--']` with everything after the `--`. Here's an example:

```
```sh
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
{ _: [ 'one', 'two', 'three' ],
'--': [ 'four', 'five', '--six' ] }
{
_: ['one', 'two', 'three'],
'--': ['four', 'five', '--six'],
}
```
Note that with `opts['--']` set, parsing for arguments still stops after the
Expand Down
Loading

0 comments on commit e5f5067

Please sign in to comment.