[
  {
    "path": ".gitignore",
    "content": "node_modules/\ntmp/\n"
  },
  {
    "path": ".npmignore",
    "content": "test/\ndocs/logos/\ntmp/\nbin/update-authors.sh\n.travis.yml\nbadge.png\nbadge.svg\nCONTRIBUTING.md\nsticker.png\nsticker.svg\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - '4'\n  - '6'\n  - 'node'\n"
  },
  {
    "path": "AUTHORS.md",
    "content": "# Authors\n\n#### Ordered by first contribution.\n\n- Feross Aboukhadijeh (feross@feross.org)\n- Jonny Buchanan (jonathan.buchanan@gmail.com)\n- Dan Flettre (flettre@gmail.com)\n- Brandon Horst (brandonhorst@gmail.com)\n- Yoshua Wuyts (yoshuawuyts@gmail.com)\n- Alexander Gugel (alexander.gugel@gmail.com)\n- Nate Goldman (nnmgoldman@gmail.com)\n- Max Ogden (max@maxogden.com)\n- Ricardo Barros (ricardofbarros@hotmail.com)\n- Yoshua Wuyts (i@yoshuawuyts.com)\n- Shahar Or (mightyiampresence@gmail.com)\n- Brent Burgoyne (bburgoyne@instructure.com)\n- Santiago Gil (gil.educaciontdf@gmail.com)\n- Vasiliy Loginevskiy (yeti-or@yandex-team.ru)\n- Joe Lencioni (joe.lencioni@brigade.com)\n- Leo Melin (leo.melin@eee.do)\n- G. Kay Lee (balancetraveller+github@gmail.com)\n- Lorenzo Villani (lorenzo@villani.me)\n- Ahmad Nassri (ahmad@ahmadnassri.com)\n- Mathias Buus (mathiasbuus@gmail.com)\n- Alex Potsides (alex@achingbrain.net)\n- Dan Lee (dlee@yammer-inc.com)\n- ishamf (ishamf@users.noreply.github.com)\n- Eric Zeng (leizeng@thoughtworks.com)\n- Cesar Andreu (cesarandreu@gmail.com)\n- Daniel Cousens (dcousens@users.noreply.github.com)\n- Enikő Nagy (eenagy@users.noreply.github.com)\n- Matthieu Prat (matthieuprat@gmail.com)\n- Dany Shaanan (danyshaanan@gmail.com)\n- Thomas Reggi (socialtr@gmail.com)\n- Stephen Kubovic (skubovic@gmail.com)\n- David Keijser (keijser@gmail.com)\n- Nick Colley (nickcolley7@gmail.com)\n- Florian Ebeling (mail@florianebeling.com)\n- Rico Sta. Cruz (rstacruz@users.noreply.github.com)\n- reggi (thomas@reggi.com)\n- Machisté N. Quintana (mnquintana@users.noreply.github.com)\n- Jiri Spac (capajj@gmail.com)\n- Sonny Piers (sonny@fastmail.net)\n- fscherwi (fscherwi@users.noreply.github.com)\n- Gustav Nikolaj Olsen (gno@one.com)\n- skorlir (skorlir@gmail.com)\n- JP Richardson (jprichardson@gmail.com)\n- chenxsan (chenxsan@users.noreply.github.com)\n- Tara Z. Manicsic (tara@modulus.io)\n- Jakub Elżbieciak (jelz@post.pl)\n- Dale Jefferson (dale@dalejefferson.com)\n- Paul Kernfeld (paulkernfeld@gmail.com)\n- Wes Todd (wes@wesleytodd.com)\n- rajcoss (nagrajan@ciena.com)\n- Jed Watson (jed.watson@me.com)\n- Joe Whitfield-Seed (joeseed86@gmail.com)\n- botbotbot (tkroputa@gmail.com)\n- Žiga Vidic (zigomir@gmail.com)\n- Wade Simmons (wsimmons@gmail.com)\n- Tushar Mathur (tusharmath@gmail.com)\n- Joshua Jabbour (code@joshuajabbour.com)\n- Zeke Sikelianos (zeke@sikelianos.com)\n- darren higgins (darrhiggs@users.noreply.github.com)\n- Joris Blaak (joris@label305.com)\n\n#### Generated by bin/update-authors.sh.\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nThis project adheres to [Semantic Versioning](http://semver.org/).\n\n## 10.0.2 - 2017-04-14\n\n### Changed rules\n\n- Relax rule: Disallow import of modules using absolute paths ([import/no-absolute-path](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md)) [#861](https://github.com/standard/standard/issues/861)\n  - This rule was responsible for up to 25% of the running time of `standard`, so we are disabling it until its performance improves.\n\n## 10.0.1 - 2017-04-06\n\n- Internal changes (incremented dependency versions)\n\n## 10.0.0 - 2017-04-04\n\n**`standard` just turned 10.0.0!** 🎉\n\nAs with every new major release, there are lots of new rules in 10.0.0 designed to\nhelp catch bugs and make programmer intent more explicit.\n\n`standard` is more popular than ever – **330,000 downloads per month!** It's even\nmore popular – **670,000 downloads per month** – if you include the\n[shareable ESLint config](https://www.npmjs.com/package/eslint-config-standard)\nthat we also publish.\n\nThe most important change in 10.0.0 is that **using deprecated Node.js APIs is now\nconsidered an error**. It's finally time to update those dusty old APIs!\n\nDeprecated APIs are problematic because they may print warning messages in the\nconsole in recent versions of Node.js. This often confuses users and leads to\nunnecessary support tickets for project maintainers.\n\nSome deprecated APIs are even insecure (or at least prone to incorrect usage) which\ncan have serious security implications. For that reason, `standard` now considers\nusage of `Buffer(num)` to be an error, since this function returns uninitialized\nprogram memory which could contain confidential information like passwords or keys.\n\nInstead of `Buffer(num)`, consider using `Buffer.alloc(num)` or `Buffer.from(obj)`\nwhich make the programmer's intent clearer. These functions exist in all currently\nsupported versions of Node.js, including Node.js 4.x. For more background,\n[see this Node.js issue](https://github.com/nodejs/node/issues/4660).\n\nWe also improved some rules to support common patterns in code bases that use\nReact, JSX, and Flow.\n\nWhen you upgrade, consider running `standard --fix` to automatically fix some of\nthe issues caught by this new version.\n\n### New features\n\n- Update ESLint from 3.15.x to 3.19.x.\n- Node.js API: Add `standard.lintTextSync` method\n\n### New rules\n\n*(Estimated % of affected standard users, based on test suite in parens)*\n\n- Disallow using deprecated Node.js APIs ([node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)) [#693](https://github.com/standard/standard/issues/693) (13%)\n  - Ensures that code always runs without warnings on the latest versions of Node.js\n  - Ensures that safe Buffer methods (`Buffer.from()`, `Buffer.alloc()`) are used instead of `Buffer()`\n- Enforce callbacks always called with Node.js-style error first ([standard/no-callback-literal](https://github.com/xjamundx/eslint-plugin-standard#rules-explanations)) [#623](https://github.com/standard/standard/issues/623) (3%)\n  - Functions named `callback` or `cb` must be invoked with `null`, `undefined`, or an `Error` as the first argument\n  - Disallows using a string instead of an `Error` object\n  - Disallows confusing callbacks that do not follow the standard Node.js pattern\n- Disallow any imports that come after non-import statements ([import/first](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md)) [#806](https://github.com/standard/standard/issues/806) (1%)\n- Disallow unnecessary return await ([no-return-await](http://eslint.org/docs/rules/no-return-await)) [#695](https://github.com/standard/standard/issues/695) (0%)\n- Disallow comma-dangle in functions ([comma-dangle](http://eslint.org/docs/rules/comma-dangle)) [#787](https://github.com/standard/standard/issues/787) (0%)\n- Disallow repeated exports of names or defaults ([import/export](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md)) [#806](https://github.com/standard/standard/issues/806) (0%)\n- Disallow import of modules using absolute paths ([import/no-absolute-path](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md)) [#806](https://github.com/standard/standard/issues/806) (0%)\n- Disallow Webpack loader syntax in imports ([import/no-webpack-loader-syntax](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md)) [#806](https://github.com/standard/standard/issues/806) (0%)\n- Disallow comparing against -0 ([no-compare-neg-zero](http://eslint.org/docs/rules/no-compare-neg-zero)) [#812](https://github.com/standard/standard/issues/812) (0%)\n\n### Changed rules\n\n- Relax rule: allow using `...rest` to omit properties from an object ([no-unused-vars](http://eslint.org/docs/rules/no-unused-vars)) [#800](https://github.com/standard/standard/issues/800)\n  - This is a common and useful pattern in React/JSX apps!\n- Relax rule: allow Flow `import type` statements ([import/no-duplicates](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md)) [#599](https://github.com/standard/standard/issues/599)\n  - These are no longer considered to be \"duplicate imports\"\n- Relax rule: Treat `process.exit()` the same as `throw` in code path analysis ([node/process-exit-as-throw](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/process-exit-as-throw.md)) [#699](https://github.com/standard/standard/issues/699)\n  - Makes certain other rules work better and give fewer false positives\n- Relax rule: allow Unnecessary Labels ([no-extra-label](http://eslint.org/docs/rules/no-extra-label))\n  - Redundant, since \"no-labels\" is already enabled, which is more restrictive\n\n## 9.0.2 - 2017-03-17\n\n### Changed rules\n\n- Relax rule: Allow tagged template string expressions ([no-unused-expressions](http://eslint.org/docs/rules/no-unused-expressions)) [#822](https://github.com/standard/standard/issues/822)\n\n## 9.0.1 - 2017-03-07\n\n### Changed rules\n\n- Relax rule: Allow mixing basic operators without parens ([no-mixed-operators](http://eslint.org/docs/rules/no-mixed-operators)) [#816](https://github.com/standard/standard/issues/816)\n  - Specifically, these operators: `+`, `-`, `*`, `/`, `%`, and `**`\n\n## 9.0.0 - 2017-02-28\n\nIt's time for a new major version of `standard`! As usual, this release contains a\nbunch of awesomeness to help you keep your code in tip-top shape!\n\nWe've added several new rules designed to **catch potential programmer errors**\n(i.e. bugs), as well as rules to make programmer intent **more explicit** in\ncertain circumstances.\n\nThis release continues our trend of tightening up rules so that, wherever possible,\nthere's one \"right\" way to do things. This design goal is intended to reduce the\ntime that teams and maintainers spend giving code review feedback in pull requests.\n\nWhen you upgrade, consider running `standard --fix` to automatically fix some of the\nerrors caught by the new rules in this version.\n\n*Note: If you use the Chai test framework, you will need to make some changes to\nyour tests to improve their robustness. [Read about the changes you need to make](https://github.com/standard/standard/issues/690#issuecomment-278533482).*\n\n### New features\n\n- Update ESLint from 3.10.x to 3.15.x\n- 3 additional rules are now fixable with `standard --fix`\n\n### New rules\n\n*(Estimated % of affected standard users, based on test suite in parens)*\n\n- Disallow mixing different operators without parens ([no-mixed-operators](http://eslint.org/docs/rules/no-mixed-operators)) [#566](https://github.com/standard/standard/issues/566) (5%)\n- Enforce 1 newline at end of file (previously 1 or 2 were ok) ([no-multiple-empty-lines](http://eslint.org/docs/rules/no-multiple-empty-lines)) [#733](https://github.com/standard/standard/issues/733) (3%)\n- Disallow Unused Expressions ([no-unused-expressions](http://eslint.org/docs/rules/no-unused-expressions)) [#690](https://github.com/standard/standard/issues/690) (3%)\n  - Note: this affects users of the Chai test framework. [Read about the changes you need to make](https://github.com/standard/standard/issues/690#issuecomment-278533482).\n- Disallow redundant return statements ([no-useless-return](http://eslint.org/docs/rules/no-useless-return)) [#694](https://github.com/standard/standard/issues/694) (1%)\n- Disallow Incorrect Early Use ([no-use-before-define](http://eslint.org/docs/rules/no-use-before-define)) [#636](https://github.com/standard/standard/issues/636) (0%)\n- Enforce that Promise rejections are passed an Error object as a reason ([prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)) [#777](https://github.com/standard/standard/issues/777) (0%)\n- Enforce comparing `typeof` expressions against string literals ([valid-typeof](http://eslint.org/docs/rules/valid-typeof)) [#629](https://github.com/standard/standard/issues/629) (0%)\n- Enforce spacing around * in generator functions ([generator-star-spacing](http://eslint.org/docs/rules/generator-star-spacing)) [#724](https://github.com/standard/standard/issues/724) (0%)\n- Disallow Unnecessary Labels ([no-extra-label](http://eslint.org/docs/rules/no-extra-label)) [#736](https://github.com/standard/standard/issues/736) (0%)\n- Disallow spacing between template tags and their literals ([template-tag-spacing](http://eslint.org/docs/rules/template-tag-spacing)) [#755](https://github.com/standard/standard/issues/775) (0%)\n- Disallow padding within switch statements and classes ([padded-blocks](http://eslint.org/docs/rules/padded-blocks)) [#610](https://github.com/standard/standard/issues/610) (0%)\n- Enforce that Symbols are passed a description ([symbol-description](http://eslint.org/docs/rules/symbol-description)) [#630](https://github.com/standard/standard/issues/630) (0%)\n\n### Changed rules\n\n- Relax rule: allow TypeScript Triple-Slash Directives ([spaced-comment](http://eslint.org/docs/rules/spaced-comment)) [#660](https://github.com/standard/standard/issues/660)\n- Relax rule: allow Flow Comments ([spaced-comment](http://eslint.org/docs/rules/spaced-comment)) [#661](https://github.com/standard/standard/issues/661)\n\n## 8.6.0 - 2016-11-22\n\n- Update ESLint from 3.8.x to 3.10.x\n- 3 additional rules are now fixable with `standard --fix`\n\n## 8.5.0 - 2016-10-25\n\n- Update ESLint from 3.7.x to 3.8.x\n- 2 additional rules are now fixable with `standard --fix`\n\n## 8.4.0 - 2016-10-10\n\n- Update ESLint from 3.6.x to 3.7.x\n- 5 additional rules are now fixable with `standard --fix`\n- Use more conservative semver ranges [#654](https://github.com/standard/standard/issues/654)\n\n## 8.3.0 - 2016-09-29\n\nThe last release (`8.2.0`) added ES7 support. This release (`8.3.0`) adds ES8\nsupport ...just 3 days later!\n\nThis release should eliminate the need to specify `babel-eslint` as a custom\nparser, since `standard` can now parse ES8 (i.e. ES2017) syntax out of the box.\nThat means `async` and `await` will just work.\n\n- Support ES8 (i.e. ES2017) syntax.\n\n## 8.2.0 - 2016-09-26\n\nFor many users, this release should eliminate the need to specify `babel-eslint` as\na custom parser, since `standard` can now parse ES7 (i.e. ES2016) syntax out of the\nbox.\n\n- Support ES7 (i.e. ES2016) syntax.\n- Update ESLint from 3.5.x to 3.6.x\n- 4 additional rules are now fixable with `standard --fix`\n\n## 8.1.0 - 2016-09-17\n\n- Update ESLint from 3.3.x to 3.5.x\n- Around 10 additional rules are now fixable with `standard --fix`\n\n## 8.0.0 - 2016-08-23\n\nThis release contains a bunch of goodies, including new rules that catch potential\nprogrammer errors (i.e. bugs) and enforce additional code consistency.\n\nHowever, the best feature is surely the new `--fix` command line flag to\nautomatically fix problems. If you ever used\n[`standard-format`](https://www.npmjs.com/package/standard-format)\nand ran into issues with the lack of ES2015+ support, you'll be happy about\n`--fix`.\n\n`standard --fix` is built into `standard` v8.0.0 for maximum convenience, it\nsupports ES2015, and it's lightweight (no additional dependencies since it's part\nof ESLint which powers `standard`). Lots of problems are already fixable, and more\nare getting added with each ESLint release.\n\n`standard` also outputs a message (\"Run `standard --fix` to automatically fix\nsome problems.\") when it detects problems that can be fixed automatically so you\ncan save time!\n\nWith `standard` v8.0.0, we are also dropping support for Node.js versions prior to\nv4. Node.js 0.10 and 0.12 are in maintenance mode and will be unsupported at the\nend of 2016. Node.js 4 is the current LTS version. If you are using an older\nversion of Node.js, we recommend upgrading to at least Node.js 4 as soon as\npossible. If you are unable to upgrade to Node.js 4 or higher, then we recommend\ncontinuing to use `standard` v7.x until you are ready to upgrade Node.js.\n\n**Important:** We will not be updating the `standard` v7.x versions going forward.\nAll bug fixes and enhancements will land in `standard` v8.x.\n\nFull changelog below. Cheers!\n\n### New features\n\n- Upgrade to ESLint v3 (http://eslint.org/docs/user-guide/migrating-to-3.0.0) [#565](https://github.com/standard/standard/pull/565)\n  - **BREAKING:** Drop support for node < 4 (this was a decision made by the ESLint team)\n- Expose ESLint's `--fix` command line flag [#540](https://github.com/standard/standard/issues/540) [standard-engine/#107](https://github.com/Flet/standard-engine/issues/107)\n  - Lightweight, no additional dependencies, fixes dozens of rules automatically\n\n### New rules\n\n*(Estimated % of affected standard users, based on test suite in parens)*\n\n- Enforce placing object properties on separate lines ([object-property-newline](http://eslint.org/docs/rules/object-property-newline)) [#524](https://github.com/standard/standard/issues/524) (2%)\n- Require block comments to be balanced ([spaced-comment \"balanced\"](http://eslint.org/docs/rules/spaced-comment)) [#572](https://github.com/standard/standard/issues/572) (2%)\n- Disallow constant expressions in conditions ([no-constant-condition](http://eslint.org/docs/rules/no-constant-condition)) [#563](https://github.com/standard/standard/issues/563) (1%)\n- Disallow renaming import, export, and destructured assignments to the same name ([no-useless-rename](http://eslint.org/docs/rules/no-useless-rename)) [#537](https://github.com/standard/standard/issues/537) (0%)\n- Disallow spacing between rest and spread operators and their expressions ([rest-spread-spacing](http://eslint.org/docs/rules/rest-spread-spacing)) [#567](https://github.com/standard/standard/issues/567) (0%)\n- Disallow the Unicode Byte Order Mark (BOM) ([unicode-bom](http://eslint.org/docs/rules/unicode-bom)) [#538](https://github.com/standard/standard/issues/538) (0%)\n- Disallow assignment to native objects/global variables ([no-global-assign](http://eslint.org/docs/rules/no-global-assign)) [#596](https://github.com/standard/standard/issues/596) (0%)\n- Disallow negating the left operand of relational operators ([no-unsafe-negation](http://eslint.org/docs/rules/no-unsafe-negation)) [#595](https://github.com/standard/standard/issues/595) (0%)\n- Disallow template literal placeholder syntax in regular strings ([no-template-curly-in-string](http://eslint.org/docs/rules/no-template-curly-in-string)) [#594](https://github.com/standard/standard/issues/594) (0%)\n- Disallow tabs in file ([no-tabs](http://eslint.org/docs/rules/no-tabs)) [#593](https://github.com/standard/standard/issues/593) (0%)\n\n### Changed rules\n\n- Relax rule: Allow template literal strings (backtick strings) to avoid escaping  [#421](https://github.com/standard/standard/issues/421)\n- Relax rule: Do not enforce spacing around * in generator functions (https://github.com/standard/standard/issues/564#issuecomment-234699126)\n  - This is a temporary workaround for `babel` users who use async generator functions.\n\n## 7.1.2 - 2016-06-03\n\n- Fix install errors for some users by updating eslint peer dependency\n\n## 7.1.1 - 2016-05-26\n\n- Add back full node 0.10, 0.12 support\n\n## 7.1.0 - 2016-05-16\n\n- Upgrade eslint to version ~2.10.2\n\n## 7.0.1 - 2016-05-04\n\n- Relax \"no-duplicate-imports\" rule to not include `export` so the following is allowed:\n\n```js\nimport { foo } from 'bar'\nexport * from 'bar'\n```\n\n## 7.0.0 - 2016-05-02\n\n### Changes\n\n- Upgrade eslint to version ~2.9.0\n- Remove \"rules\" configuration option [#367](https://github.com/standard/standard/issues/367) from `package.json` (Reasoning is [here](https://github.com/standard/standard/issues/399#issuecomment-180961891))\n\n### New rules\n\n*Estimated % of affected standard users, based on test suite*\n\n- Require camelCase ([camelcase](http://eslint.org/docs/rules/camelcase)) [4%]\n- Disallow unnecessary escape usage ([no-useless-escape](http://eslint.org/docs/rules/no-useless-escape)) [4% -- but, including many bugs]\n- Disallow duplicate imports ([no-duplicate-imports](http://eslint.org/docs/rules/no-duplicate-imports)) [0%]\n- Disallow unmodified conditions of loops ([no-unmodified-loop-condition](http://eslint.org/docs/2.0.0/rules/no-unmodified-loop-condition)) [0%]\n- Disallow whitespace before properties ([no-whitespace-before-property](http://eslint.org/docs/2.0.0/rules/no-whitespace-before-property)) [0%]\n- Disallow control flow statements in `finally` blocks ([no-unsafe-finally](http://eslint.org/docs/rules/no-unsafe-finally)) [0%]\n- Disallow unnecessary computed property keys on objects ([no-useless-computed-key](http://eslint.org/docs/rules/no-useless-computed-key)) [0%]\n- Validate spacing before closing bracket in JSX ([react/jsx-space-before-closing](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md)) [0%]\n\n### Removed rules\n\n- Require parens in arrow function arguments ([arrow-parens](http://eslint.org/docs/rules/arrow-parens))\n\n## 6.0.8 - 2016-03-07\n\n- Pin eslint to version ~2.2.0\n- Update eslint-plugin-react to version 4.0.0\n\n## 6.0.7 - 2016-02-18\n\n- Revert: Use install location of standard as eslint `cwd` (fixes [#429](https://github.com/standard/standard/issues/429))\n\n## 6.0.6 - 2016-02-18\n\n- Use eslint 2.1.0\n- Fix: Use install location of standard as eslint `cwd` (fixes [snazzy/#8](https://github.com/standard/snazzy/issues/8))\n\n## 6.0.5 - 2016-02-12\n\n- Use eslint 2.0.0 stable\n\n## 6.0.4 - 2016-02-07\n\n- Relax rule: Validate closing bracket location in JSX ([jsx-closing-bracket-location](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md))\n\n## 6.0.3 - 2016-02-06\n\n- Fix \"Error: Cannot find module 'eslint-config-standard-jsx'\" with npm 2 (node 0.10, 0.12, 4)\n\n## 6.0.2 - 2016-02-06\n\n- Internal change: Remove .eslintrc file, and use inline config\n\n## 6.0.1 - 2016-02-05\n\n- Internal change: Move .eslintrc file to root folder\n\n## 6.0.0 - 2016-02-05\n\nThe goal of this release is to make `standard` faster to install, and simpler to use.\n\n### Remove `standard-format` ([#340](https://github.com/standard/standard/issues/340)) ([#397](https://github.com/standard/standard/issues/397))\n\n- Eliminates 250 packages, and cuts install time in half!\n- For npm 2, install time goes from 20 secs —> 10 secs.\n- For npm 3, install time goes from 24 secs —> 12 secs.\n- To continue using `standard-format`, just install it separately: `npm install -g standard-format`\n\n### React-specific linting rules are removed ([#351](https://github.com/standard/standard/issues/351)) ([#367](https://github.com/standard/standard/issues/367)) ([eslint-config-standard-react/#13](https://github.com/standard/eslint-config-standard-react/pull/13))\n\n- JSX is still supported, and it continues to be checked for style.\n- There were only a few React-specific rules, but they made it extremely difficult for users of alternatives like `virtual-dom` or `deku`, and unecessarily tied `standard` to a single library.\n- JSX rules come from `eslint-config-standard-jsx`. The `eslint-config-standard-react` dependency was removed.\n\n### New Rules\n\n*The percentage (%) of users that rule changes will effect, based on real-world testing of the top ~400 npm packages is denoted in brackets.*\n\n- Disallow `__dirname`/`__filename` string concatenation ([#403](https://github.com/standard/standard/issues/403)) ([no-path-concat](http://eslint.org/docs/2.0.0/rules/no-path-concat)) [5%]\n- Require parens in arrow function arguments  ([#309](https://github.com/standard/standard/issues/309)) ([arrow-parens](http://eslint.org/docs/2.0.0/rules/arrow-parens.html)) [5%]\n- Ensure that `new Promise()` is instantiated with the parameter names\n`resolve`, `reject` ([#282](https://github.com/standard/standard/issues/282)) ([promise/param-names](https://github.com/xjamundx/eslint-plugin-promise#param-names)) [1%]\n- Enforce Usage of Spacing in Template Strings ([template-curly-spacing](http://eslint.org/docs/2.0.0/rules/template-curly-spacing)) [1%]\n- Template strings are only allowed when necessary, i.e. template string features are being used (eslint got stricter: https://github.com/eslint/eslint/issues/5147) [1%]\n- Better dead code detection after conditional statements (eslint got stricter) [1%]\n- Enforce spaces around `*` in `yield * something` ([#335](https://github.com/standard/standard/issues/335)) ([yield-star-spacing](http://eslint.org/docs/2.0.0/rules/yield-star-spacing)) [0%]\n- Disallow labels on loops/switch statements too (made rule stricter) ([no-labels](http://eslint.org/docs/2.0.0/rules/no-labels.html)) [0%]\n- Disallow unnecessary constructor ([no-useless-constructor](http://eslint.org/docs/2.0.0/rules/no-useless-constructor)) [0%]\n- Disallow empty destructuring patterns ([no-empty-pattern](http://eslint.org/docs/2.0.0/rules/no-empty-pattern)) [0%]\n- Disallow Symbol Constructor ([no-new-symbol](http://eslint.org/docs/2.0.0/rules/no-new-symbol)) [0%]\n- Disallow Self Assignment ([no-self-assign](http://eslint.org/docs/2.0.0/rules/no-self-assign)) [0%]\n\n### Removed Rules\n\n- `parseInt()` radix rule because ES5 fixes this issue ([#384](https://github.com/standard/standard/issues/384))  ([radix](http://eslint.org/docs/2.0.0/rules/radix.html)) [0%]\n\n### Expose eslint configuration via command line options and `package.json`\n\nFor power users, it might be easier to use one of these new hooks instead of forking\n`standard`, though that's still encouraged, too!\n\n- Set eslint \"plugins\" ([#386](https://github.com/standard/standard/issues/386))\n- Set eslint \"rules\" ([#367](https://github.com/standard/standard/issues/367))\n- Set eslint \"env\" ([#371](https://github.com/standard/standard/issues/371))\n\nTo set custom ESLint plugins, rules, or envs, use the command line `--plugin`, `--rules`, and `--env` flags.\n\nIn `package.json`, use the \"standard\" property:\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"my-plugin\" ]\n  }\n}\n```\n\n### Upgrade to ESLint v2\n- There may be slight behavior changes to existing rules. When possible, we've noted these in the \"New Rules\" and \"Removed Rules\" section.\n\n### Improve test suite\n\n- Rule changes can be tested against every package on npm. For sanity, this is limited to packages with at least 4 dependents. Around ~400 packages.\n\n### Known Issues\n\n- Using prerelease eslint version (2.0.0-rc.0). There may be breaking changes before the stable release.\n- `no-return-assign` behavior changed with arrow functions (https://github.com/eslint/eslint/issues/5150)\n\n### Relevant diffs\n\n- standard ([v5.4.1...v6.0.0](https://github.com/standard/standard/compare/v5.4.1...v6.0.0))\n- eslint-config-standard ([v4.4.0...v5.0.0](https://github.com/standard/eslint-config-standard/compare/v4.4.0...v5.0.0))\n- eslint-config-standard-jsx ([v1.0.0](https://github.com/standard/eslint-config-standard-jsx/commit/47d5e248e2e078eb87619493999e3e74d4b7e70e))\n- standard-engine ([v2.2.4...v3.2.1](https://github.com/Flet/standard-engine/compare/v2.2.4...v3.2.1))\n\n## 5.4.1 - 2015-11-16\n[view diff](https://github.com/standard/standard/compare/v5.4.0...v5.4.1)\n\n### Fixed\n\n* Fix for `standard-engine` change. Fix error tagline.\n\n## 5.4.0 - 2015-11-16\n[view diff](https://github.com/standard/standard/compare/v5.3.1...v5.4.0)\n\n### Added\n\n* eslint-config-standard-react@1.2.0 ([history](eslint-config-standard-react))\n  * Disallow duplicate JSX properties\n\n## 5.3.1 - 2015-09-18\n[view diff](https://github.com/standard/standard/compare/v5.3.0...v5.3.1)\n\n### Changed\n* eslint-plugin-react@3.4.2 ([history](eslint-plugin-react))\n\n## 5.3.0 - 2015-09-16\n[view diff](https://github.com/standard/standard/compare/v5.2.2...v5.3.0)\n\n### Changed\n* eslint-config-standard@4.4.0 ([history][eslint-config-standard])\n  * **New rule:** must have space after semicolon in for-loop ([commit](https://github.com/standard/eslint-config-standard/commit/6e5025eef8900f686e19b4a31836743d98323119))\n  * **New rule:** No default assignment with ternary operator ([commit](https://github.com/standard/eslint-config-standard/commit/0903c19ca6a8bc0c8625c41ca844ee69968bf948))\n  * **New rule:** Require spaces before keywords ([commit](https://github.com/standard/eslint-config-standard/commit/656ba93cda9cd4ab38e032649aafb795993d5176))\n* eslint-config-standard-react@1.1.0 ([history][eslint-config-standard-react])\n* eslint-plugin-react@3.4.0 ([history][eslint-plugin-react])\n* eslint-plugin-standard@1.3.1 ([history][eslint-plugin-standard])\n\n## 5.2.2\n[view diff](https://github.com/standard/standard/compare/v5.2.1...v5.2.2)\n\n### Fixed\n* We have a changelog now, and you're reading it!\n* Minor README update\n* Removed direct dependency on `eslint` (its now moved to [standard-engine](https://github.com/flet/standard-engine))\n\n## 5.2.1 - 2015-09-03\n[view diff](https://github.com/standard/standard/compare/v5.2.0...v5.2.1)\n\n### Changed\n* eslint-config-standard@4.3.1 ([history][eslint-config-standard])\n  * **Revert rule**: Disallow unncessary concatenation of strings\n\n### Fixed\n* eslint-config-standard@4.3.1 ([history][eslint-config-standard])\n  * fix regression with ternary operator handling\n\n## 5.2.0 - 2015-09-03\n[view diff](https://github.com/standard/standard/compare/v5.1.1...v5.2.0)\n\n### Added\n* eslint-config-standard@4.3.0 ([history][eslint-config-standard])\n  * **New rule:** Disallow unncessary concatenation of strings\n  * **New rule:** Disallow duplicate name in class members\n  * **New rule:** enforce spaces inside of single line blocks\n  * **Re-add rule:** padded-blocks ([Closes #170](https://github.com/standard/standard/issues/170))\n\n### Changed\n* Bump `eslint` from 1.1.0 to 1.3.1 ([CHANGELOG][eslint])\n* eslint-plugin-standard@1.3.0 ([history][eslint-plugin-standard])\n  * A small change to make the plugin compatible with browserify which does not affect behavior.\n\n### Fixed\n* eslint-plugin-react@3.3.1 ([CHANGELOG][eslint-plugin-react])\n  * Fix object rest/spread handling.\n* Added white background to badge.svg to make it work with dark backgrounds ([Closes #234](https://github.com/standard/standard/issues/234))\n* Minor updates to README.md\n\n## 5.1.1 - 2015-08-28\n[view diff](https://github.com/standard/standard/compare/v5.1.0...v5.1.1)\n\n### Fixed\n* Update to RULES.md to remove a missing hyperlink\n* Add atom linter information to README.md\n* Fixed duplicated word in the tagline message on the CLI\n* Removed failing repository from tests (yoshuawuyts/initialize)\n\n## 5.1.0 - 2015-08-14\n[view diff](https://github.com/standard/standard/compare/v5.0.2...v5.1.0)\n\n## Fixed\n* eslint-config-standard@4.1.0 ([history][eslint-config-standard])\n  * Added rest/spread feature to `eslintrc.json` to fix [#226](https://github.com/standard/standard/issues/226) and [eslint-plugin-standard#3](https://github.com/xjamundx/eslint-plugin-standard/issues/3)\n* eslint-plugin-react@3.2.2 ([CHANGELOG][eslint-plugin-react])\n  * Fix crash when propTypes don't have any parent\n  * Fix jsx-no-literals reporting errors outside JSX\n\n### Changed\n* Bump eslint from 1.0.0 to 1.2.0 ([CHANGELOG][eslint])\n* Added more test repositories and disabled some that were failing\n* Update bikeshedding link on README.md\n\n## 5.0.2 - 2015-08-06\n[view diff](https://github.com/standard/standard/compare/v5.0.1...v5.0.2)\n\n### Changed\n* eslint-config-standard-react@1.0.4 ([history][eslint-config-standard-react])\n  - **Disable Rule:** react/wrap-multilines\n* Minor README updates\n\n## 5.0.1 - 2015-08-05\n[view diff](https://github.com/standard/standard/compare/v5.0.0...v5.0.1)\n\n## 5.0.0 - 2015-08-03\n[view diff](https://github.com/standard/standard/compare/v4.5.4...v5.0.0)\n\n## 4.5.4 - 2015-07-13\n[view diff](https://github.com/standard/standard/compare/v4.5.3...v4.5.4)\n\n## 4.5.3 - 2015-07-10\n[view diff](https://github.com/standard/standard/compare/v4.5.2...v4.5.3)\n\n## 4.5.2 - 2015-07-02\n[view diff](https://github.com/standard/standard/compare/v4.5.1...v4.5.2)\n\n## 4.5.1 - 2015-06-30\n[view diff](https://github.com/standard/standard/compare/v4.5.0...v4.5.1)\n\n## 4.5.0 - 2015-06-30\n[view diff](https://github.com/standard/standard/compare/v4.4.1...v4.5.0)\n\n## 4.4.1 - 2015-06-29\n[view diff](https://github.com/standard/standard/compare/v4.4.0...v4.4.1)\n\n## 4.4.0 - 2015-06-27\n[view diff](https://github.com/standard/standard/compare/v4.3.3...v4.4.0)\n\n## 4.3.3 - 2015-06-26\n[view diff](https://github.com/standard/standard/compare/v4.3.2...v4.3.3)\n\n## 4.3.2 - 2015-06-23\n[view diff](https://github.com/standard/standard/compare/v4.3.1...v4.3.2)\n\n## 4.3.1 - 2015-06-18\n[view diff](https://github.com/standard/standard/compare/v4.3.0...v4.3.1)\n\n## 4.3.0 - 2015-06-16\n[view diff](https://github.com/standard/standard/compare/v4.2.1...v4.3.0)\n\n## 4.2.1 - 2015-06-12\n[view diff](https://github.com/standard/standard/compare/v4.2.0...v4.2.1)\n\n## 4.2.0 - 2015-06-11\n[view diff](https://github.com/standard/standard/compare/v4.1.1...v4.2.0)\n\n## 4.1.1 - 2015-06-11\n[view diff](https://github.com/standard/standard/compare/v4.1.0...v4.1.1)\n\n## 4.1.0 - 2015-06-10\n[view diff](https://github.com/standard/standard/compare/v4.0.1...v4.1.0)\n\n## 4.0.1 - 2015-06-01\n[view diff](https://github.com/standard/standard/compare/v4.0.0...v4.0.1)\n\n## 4.0.0 - 2015-05-30\n[view diff](https://github.com/standard/standard/compare/v3.9.0...v4.0.0)\n\n[eslint-config-standard-react]: https://github.com/standard/eslint-config-standard-react/commits/master\n[eslint-config-standard]: https://github.com/standard/eslint-config-standard/commits/master\n[eslint-plugin-react]: https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md\n[eslint-plugin-standard]: https://github.com/xjamundx/eslint-plugin-standard/commits/master\n[eslint]: https://github.com/eslint/eslint/blob/master/CHANGELOG.md\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing Guidelines\n\nContributions welcome!\n\n**Before spending lots of time on something, ask for feedback on your idea first!**\n\nPlease search issues and pull requests before adding something new to avoid duplicating\nefforts and conversations.\n\nThis project welcomes non-code contributions, too! The following types of contributions\nare welcome:\n\n- **Ideas**: participate in an issue thread or start your own to have your voice heard.\n- **Writing**: contribute your expertise in an area by helping expand the included docs.\n- **Copy editing**: fix typos, clarify language, and improve the quality of the docs.\n- **Formatting**: help keep docs easy to read with consistent formatting.\n\n## Code Style\n\n[![happiness][happiness-image]][happiness-url]\n\nThis repository uses [`happiness`][happiness-url] to maintain code style and consistency,\nand to avoid style arguments. `npm test` runs `happiness` automatically, so you don't have\nto!\n\n[happiness-image]: https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg\n[happiness-url]: https://github.com/JedWatson/happiness\n\n## Project Governance\n\nIndividuals making significant and valuable contributions are given commit-access to the\nproject to contribute as they see fit. This project is more like an open wiki than a\nhappiness guarded open source project.\n\n### Rules\n\nThere are a few basic ground-rules for contributors:\n\n1. **No `--force` pushes** or modifying the Git history in any way.\n2. **Non-master branches** should be used for ongoing work.\n3. **Significant modifications** like API changes should be subject to a **pull request**\n   to solicit feedback from other contributors.\n4. **Pull requests** are *encouraged* for all contributions to solicit feedback, but left to\n   the discretion of the contributor.\n\n### Releases\n\nDeclaring formal releases remains the prerogative of the project maintainer.\n\n### Changes to this arrangement\n\nThis is an experiment and feedback is welcome! This document may also be subject to pull-\nrequests or changes by contributors where you believe you have something valuable to add\nor change.\n\n## Developer's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n- (a) The contribution was created in whole or in part by me and I have the right to\n  submit it under the open source license indicated in the file; or\n\n- (b) The contribution is based upon previous work that, to the best of my knowledge, is\n  covered under an appropriate open source license and I have the right under that license\n  to submit that work with modifications, whether created in whole or in part by me, under\n  the same open source license (unless I am permitted to submit under a different\n  license), as indicated in the file; or\n\n- (c) The contribution was provided directly to me by some other person who certified\n  (a), (b) or (c) and I have not modified it.\n\n- (d) I understand and agree that this project and the contribution are public and that a\n  record of the contribution (including all personal information I submit with it,\n  including my sign-off) is maintained indefinitely and may be redistributed consistent\n  with this project or the open source license(s) involved.\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) Jed Watson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<h4 align=\"center\">One Style You Might Like</h4>\n\n[![travis][travis-image]][travis-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://travis-ci.org/JedWatson/happiness.svg?branch=master\n[travis-url]: https://travis-ci.org/JedWatson/happiness\n[npm-image]: https://img.shields.io/npm/v/happiness.svg?style=flat\n[npm-url]: https://npmjs.org/package/happiness\n[downloads-image]: https://img.shields.io/npm/dm/happiness.svg?style=flat\n[downloads-url]: https://npmjs.org/package/happiness\n\n[Standard](https://github.com/feross/standard) customised to make [us](#maintainers) happy.\n\nThis is a fork of Standard with two changes:\n\n- **Tabs** for indentions\n- **Semicolons** always\n\nIt is called happiness, because we hope that it brings you joy, love and ends strife among your fellow developers.\n\n**Reminder**: Happiness is not for everyone.  Some people will choose to be sad, normal and some might even say \"standard\".\nThat is alright.  A happy person is comfortable with being them and fine to let others be who they want to be.  *\"You do you\"*\n\nIf the information you are looking for is not in this readme, you should take a look at the [Standard readme](https://github.com/feross/standard), it might have what you are looking for.\n\n## Install\n\n```bash\n$ npm install happiness\n```\n\n## Usage\n\nThe easiest way to use JavaScript Happiness Style to check your code is to install it\nglobally as a Node command line program. To do so, simply run the following command in\nyour terminal (flag `-g` installs `happiness` globally on your system, omit it if you want\nto install in the current working directory):\n\n```bash\n$ npm install happiness -g\n```\n\nAfter you've done that you should be able to use the `happiness` program. The simplest use\ncase would be checking the style of all JavaScript files in the current working directory:\n\n```bash\n$ happiness\nError: Use JavaScript happiness Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nYou can optionally pass in a directory (or directories) using the glob pattern. Be sure to quote paths containing glob patterns so that they are expanded by standard instead of your shell:\n\n```bash\n$ happiness \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\nMany people like to add happiness to their testing setup. To do this, save the packge as a dev dependency and add happiness to your package.json's test script:\n\n```bash\n$ npm install --save-dev happiness\n```\n\n```json\n{\n  \"scripts\": {\n    \"test\": \"happiness && mocha # <- or whatever test runner you use\"\n  }\n}\n```\n\n**Note:** by default `happiness` will look for all files matching the patterns: `**/*.js`, `**/*.jsx`.\n\n## Badge\n\nUse this in one of your projects? Include one of these badges in your readme to\nlet people know that your code is using the standard style.\n\n[![js-happiness-style](https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg)](https://github.com/JedWatson/happiness)\n\n```markdown\n[![js-happiness-style](https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg)](https://github.com/JedWatson/happiness)\n```\n\n[![js-happiness-style](https://img.shields.io/badge/code%20style-happiness-brightgreen.svg)](https://github.com/JedWatson/happiness)\n\n```markdown\n[![js-happiness-style](https://img.shields.io/badge/code%20style-happiness-brightgreen.svg)](https://github.com/JedWatson/happiness)\n```\n\n### Text editor plugins\n\n**Coming Soon**\n\n## Maintainers\n\n- [Jed Watson](https://www.github.com/JedWatson)\n- [Daniel Cousens](https://www.github.com/dcousens)\n- [Wes Todd](https://www.github.com/wesleytodd)\n\n### I want to contribute to `happiness`. What packages should I know about?\n\n- **[happiness](https://github.com/JedWatson/happiness)** - this repo\n  - **[standard-engine](https://github.com/flet/standard-engine)** - cli engine for arbitrary eslint rules\n  - **[eslint-config-happiness](https://github.com/wesleytodd/eslint-config-happiness)** - eslint rules for happiness\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - custom eslint rules for standard (not part of eslint core)\n  - **[eslint](https://github.com/eslint/eslint)** - the linter that powers happiness\n- **[happiness-format]()** - **Coming Soon** automatic code formatter\n- **[snazzy](https://github.com/feross/snazzy)** - pretty terminal output for happiness\n\n## License\n\nMIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "RULES.md",
    "content": "## JavaScript Happiness Style\n\n[![js-happiness-style](https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg)](https://github.com/JedWatson/happiness)\n\nThis is a TL;DR of the [happiness](https://github.com/JedWatson/happiness) JavaScript\nrules.\n\nThe best way to learn about `happiness` is to just install it and give it a try on\nyour code.\n\n## Rules\n\n* **Use tabs** for indentation.\n\n  ```js\n  function hello (name) {\n\tconsole.log('hi', name)\n  }\n  ```\n\n* **Use single quotes for strings** except to avoid escaping.\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **No unused variables.**\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ avoid\n  }\n  ```\n\n* **Add a space after keywords.**\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ avoid\n  ```\n\n* **Add a space before a function declaration's parentheses.**\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ avoid\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ avoid\n  ```\n\n* **Always use** `===` instead of `==`.<br>\n  Exception: `obj == null` is allowed to check for `null || undefined`.\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ avoid\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ avoid\n  ```\n\n* **Infix operators** must be spaced.\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ avoid\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **Commas should have a space** after them.\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ avoid\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **Keep else statements** on the same line as their curly braces.\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **For multi-line if statements,** use curly braces.\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **Always handle the** `err` function parameter.\n\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ avoid\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **Always prefix browser globals** with `window.`.<br>\n  Exceptions are: `document`, `console` and `navigator`.\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **Multiple blank lines not allowed.**\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ avoid\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **For the ternary operator** in a multi-line setting, place `?` and `:` on their own lines.\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ avoid\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **For var declarations,** write each declaration in its own statement.\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ avoid\n  var silent = true, verbose = true\n\n  // ✗ avoid\n  var silent = true,\n      verbose = true\n  ```\n\n* **Wrap conditional assignments** with additional parentheses. This makes it clear that the expression is intentionally an assignment (`=`) rather than a typo for equality (`===`).\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ avoid\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n*\n## Semicolons\n\n* Always use semicolons.\n\n  ```js\n  window.alert('hi'); // ✓ ok\n  window.alert('hi')  // ✗ avoid\n  ```\n"
  },
  {
    "path": "bin/cmd.js",
    "content": "#!/usr/bin/env node\n\nif (process.version.match(/v(\\d+)\\./)[1] < 4) {\n\tconsole.error('happiness: Node v4 or greater is required. `happiness` did not run.');\n} else {\n\tvar opts = require('../options');\n\trequire('standard-engine').cli(opts);\n}\n"
  },
  {
    "path": "bin/update-authors.sh",
    "content": "#!/bin/sh\n# Update AUTHORS.md based on git history.\n\ngit log --reverse --format='%aN (%aE)' | perl -we '\nBEGIN {\n  %seen = (), @authors = ();\n}\nwhile (<>) {\n  s/fletd01\\@yahoo.com/flettre\\@gmail.com/;\n\n  next if $seen{$_};\n  next if /(support\\@greenkeeper.io)/;\n  next if /(nate\\@ngoldman.me)/;\n  next if /(ahmad\\@codeinchaos.com)/;\n  next if /(wayou )/;\n  $seen{$_} = push @authors, \"- \", $_;\n}\nEND {\n  print \"# Authors\\n\\n\";\n  print \"#### Ordered by first contribution.\\n\\n\";\n  print @authors, \"\\n\";\n  print \"#### Generated by bin/update-authors.sh.\\n\";\n}\n' > AUTHORS.md\n"
  },
  {
    "path": "docs/README-en.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/standard/standard/master/sticker.svg\" alt=\"Standard - JavaScript Style Guide\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/standard/standard/master.svg\" alt=\"travis\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/eslint-config-standard\"><img src=\"https://img.shields.io/npm/dm/eslint-config-standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n</p>\n\n<h4 align=\"center\">One JavaScript Style to Rule Them All</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n## JavaScript style guide, with linter & automatic code fixer\n\nThis module saves you (and others!) time in three ways:\n\n- **No configuration.** The easiest way to enforce consistent style in your\n  project. Just drop it in.\n- **Automatically format code.** Just run `standard --fix` and say goodbye to\n  messy or inconsistent code.\n- **Catch style issues & programmer errors early.** Save precious code review\n  time by eliminating back-and-forth between reviewer & contributor.\n\nNo decisions to make. No `.eslintrc`, `.jshintrc`, or `.jscsrc` files to manage. It just\nworks.\n\nInstall with:\n\n```\nnpm install standard --save-dev\n```\n\n## The Rules\n\n- **2 spaces** – for indentation\n- **Single quotes for strings** – except to avoid escaping\n- **No unused variables** – this one catches *tons* of bugs!\n- **No semicolons** – [It's][1] [fine.][2] [Really!][3]\n- **Never start a line with `(`, `[`, or `` ` ``**\n  - This is the **only** gotcha with omitting semicolons – *automatically checked for you!*\n  - [More details][4]\n- **Space after keywords** `if (condition) { ... }`\n- **Space after function name** `function name (arg) { ... }`\n- Always use `===` instead of `==` – but `obj == null` is allowed to check `null || undefined`.\n- Always handle the node.js `err` function parameter\n- Always prefix browser globals with `window` – except `document` and `navigator` are okay\n  - Prevents accidental use of poorly-named browser globals like `open`, `length`,\n    `event`, and `name`.\n- **And [more goodness][5]** – *give `standard` a try today!*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\nTo get a better idea, take a look at\n[a sample file](https://github.com/expressjs/body-parser/blob/master/index.js) written\nin JavaScript Standard Style. Or, check out one of the\n[thousands of projects](https://raw.githubusercontent.com/standard/standard-packages/master/all.json)\nthat use `standard`!\n\n## Table of Contents\n\n- Quick start\n  - [Install](#install)\n  - [Usage](#usage)\n  - [What you might do if you're clever](#what-you-might-do-if-youre-clever)\n- FAQ\n  - [Why should I use JavaScript Standard Style?](#why-should-i-use-javascript-standard-style)\n  - [Who uses JavaScript Standard Style?](#who-uses-javascript-standard-style)\n  - [Are there text editor plugins?](#are-there-text-editor-plugins)\n  - [Is there a readme badge?](#is-there-a-readme-badge)\n  - [I disagree with rule X, can you change it?](#i-disagree-with-rule-x-can-you-change-it)\n  - [But this isn't a real web standard!](#but-this-isnt-a-real-web-standard)\n  - [Is there an automatic formatter?](#is-there-an-automatic-formatter)\n  - [How do I ignore files?](#how-do-i-ignore-files)\n  - [How do I hide a certain warning?](#how-do-i-hide-a-certain-warning)\n  - [I use a library that pollutes the global namespace. How do I prevent \"variable is not defined\" errors?](#i-use-a-library-that-pollutes-the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors)\n  - [How do I use experimental JavaScript (ES Next) features?](#how-do-i-use-experimental-javascript-es-next-features)\n  - [Can I use a JavaScript language variant, like Flow or TypeScript?](#can-i-use-a-javascript-language-variant-like-flow-or-typescript)\n  - [What about Mocha, Jasmine, QUnit, etc?](#what-about-mocha-jasmine-qunit-etc)\n  - [What about Web Workers?](#what-about-web-workers)\n  - [Can I check code inside of Markdown or HTML files?](#can-i-check-code-inside-of-markdown-or-html-files)\n  - [Is there a Git `pre-commit` hook?](#is-there-a-git-pre-commit-hook)\n  - [How do I make the output all colorful and *pretty*?](#how-do-i-make-the-output-all-colorful-and-pretty)\n  - [Is there a Node.js API?](#is-there-a-nodejs-api)\n  - [How do I contribute to `standard`?](#how-do-i-contribute-to-standard)\n- [License](#license)\n\n## Install\n\nThe easiest way to use JavaScript Standard Style is to install it globally as a\nNode command line program. Run the following command in Terminal:\n\n```bash\n$ npm install standard --global\n```\n\nOr, you can install `standard` locally, for use in a single project:\n\n```bash\n$ npm install standard --save-dev\n```\n\n*Note: To run the preceding commands, [Node.js](http://nodejs.org) and [npm](https://npmjs.com) must be installed.*\n\n## Usage\n\nAfter you've installed `standard`, you should be able to use the `standard` program. The\nsimplest use case would be checking the style of all JavaScript files in the\ncurrent working directory:\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nYou can optionally pass in a directory (or directories) using the glob pattern. Be\nsure to quote paths containing glob patterns so that they are expanded by\n`standard` instead of your shell:\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**Note:** by default `standard` will look for all files matching the patterns:\n`**/*.js`, `**/*.jsx`.\n\n## What you might do if you're clever\n\n1. Add it to `package.json`\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. Style is checked automatically when you run `npm test`\n\n  ```bash\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. Never give style feedback on a pull request again!\n\n## Why should I use JavaScript Standard Style?\n\nThe beauty of JavaScript Standard Style is that it's simple. No one wants to\nmaintain multiple hundred-line style configuration files for every module/project\nthey work on. Enough of this madness!\n\nThis module saves you (and others!) time in three ways:\n\n- **No configuration.** The easiest way to enforce consistent style in your\n  project. Just drop it in.\n- **Automatically format code.** Just run `standard --fix` and say goodbye to\n  messy or inconsistent code.\n- **Catch style issues & programmer errors early.** Save precious code review\n  time by eliminating back-and-forth between reviewer & contributor.\n\nAdopting `standard` style means ranking the importance of code clarity and\ncommunity conventions higher than personal style. This might not make sense for\n100% of projects and development cultures, however open source can be a hostile\nplace for newbies. Setting up clear, automated contributor expectations makes a\nproject healthier.\n\n## Who uses JavaScript Standard Style?\n\nLots of folks!\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/github.png>](https://github.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/taser.png>](https://www.taser.com) | [<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/neo4j.png>](https://www.neo4j.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/rentograph.png>](https://rentograph.com) |\n|---|---|---|---|---|\n\nIn addition to companies, many community members use `standard` on packages that\nare [too numerous](https://raw.githubusercontent.com/standard/standard-packages/master/all.json)\nto list here.\n\n`standard` is also the top-starred linter in GitHub's\n[Clean Code Linter](https://github.com/showcases/clean-code-linters) showcase.\n\n## Are there text editor plugins?\n\nFirst, install `standard`. Then, install the appropriate plugin for your editor:\n\n### Sublime Text\n\nUsing **[Package Control][sublime-1]**, install **[SublimeLinter][sublime-2]** and\n**[SublimeLinter-contrib-standard][sublime-3]**.\n\nFor automatic formatting on save, install **[StandardFormat][sublime-4]**.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n### Atom\n\nInstall **[linter-js-standard][atom-1]**.\n\nAlternatively, you can install **[linter-js-standard-engine][atom-4]**. Instead of\nbundling a version of `standard` it will automatically use the version installed\nin your current project. It will also work out of the box with other linters based\non **[standard-engine][atom-5]**.\n\nFor automatic formatting, install **[standard-formatter][atom-2]**. For snippets,\ninstall **[standardjs-snippets][atom-3]**.\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n[atom-4]: https://atom.io/packages/linter-js-standard-engine\n[atom-5]: https://github.com/Flet/standard-engine\n\n### Visual Studio Code\n\nInstall **[vscode-standardjs][vscode-1]**. (Includes support for automatic formatting.)\n\nFor JS snippets, install: **[vscode-standardjs-snippets][vscode-2]**. For React snippets, install **[vscode-react-standard][vscode-3]**.\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n### Vim\n\nInstall **[ale][vim-1]**.\n\nFor automatic formatting on save, add these lines to `.vimrc`:\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\nAlternative plugins to consider include [neomake][vim-2] and [syntastic][vim-3], both of which have built-in support for `standard` (though configuration may be necessary).\n\n[vim-1]: https://github.com/w0rp/ale\n[vim-2]: https://github.com/neomake/neomake\n[vim-3]: https://github.com/vim-syntastic/syntastic\n\n### Emacs\n\nInstall **[Flycheck][emacs-1]** and check out the **[manual][emacs-2]** to learn\nhow to enable it in your projects.\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n### Brackets\n\nSearch the extension registry for **[\"Standard Code Style\"][brackets-1]** and click \"Install\".\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n### WebStorm (PhpStorm, IntelliJ, RubyMine, JetBrains, etc.)\n\nWebStorm [recently announced native support](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/)\nfor `standard` directly in the IDE.\n\nIf you still prefer to configure `standard` manually, [follow this guide][webstorm-1]. This applies to all JetBrains products, including PhpStorm, IntelliJ, RubyMine, etc.\n\n[webstorm-1]: webstorm.md\n\n## Is there a readme badge?\n\nYes! If you use `standard` in your project, you can include one of these badges in\nyour readme to let people know that your code is using the standard style.\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```md\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n```md\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n```\n\n## I disagree with rule X, can you change it?\n\nNo. The whole point of `standard` is to save you time by avoiding\n[bikeshedding][bikeshedding] about code style. There are lots of debates online about\ntabs vs. spaces, etc. that will never be resolved. These debates just distract from\ngetting stuff done. At the end of the day you have to 'just pick something', and\nthat's the whole philosophy of `standard` -- its a bunch of sensible 'just pick\nsomething' opinions. Hopefully, users see the value in that over defending their\nown opinions.\n\nIf you really want to configure hundreds of ESLint rules individually, you can\nalways use `eslint` directly with\n[eslint-config-standard](https://github.com/standard/eslint-config-standard) to\nlayer your changes on top.\n\nPro tip: Just use `standard` and move on. There are actual real problems that you\ncould spend your time solving! :P\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## But this isn't a real web standard!\n\nOf course it's not! The style laid out here is not affiliated with any official web\nstandards groups, which is why this repo is called `standard/standard` and not\n`ECMA/standard`.\n\nThe word \"standard\" has more meanings than just \"web standard\" :-) For example:\n\n- This module helps hold our code to a high *standard of quality*.\n- This module ensures that new contributors follow some basic *style standards*.\n\n## Is there an automatic formatter?\n\nYes! You can use `standard --fix` to fix most issues automatically.\n\n`standard --fix` is built into `standard` for maximum convenience. Most problems\nare fixable, but some errors (like forgetting to handle errors) must be fixed\nmanually.\n\nTo save you time, `standard` outputs the message \"`Run standard --fix to\nautomatically fix some problems`\" when it detects problems that can be fixed\nautomatically.\n\n## How do I ignore files?\n\nCertain paths (`node_modules/`, `coverage/`, `vendor/`, `*.min.js`, `bundle.js`,\nand files/folders that begin with `.` like `.git/`) are automatically ignored.\n\nPaths in a project's root `.gitignore` file are also automatically ignored.\n\nSometimes you need to ignore additional folders or specific minified files. To do\nthat, add a `standard.ignore` property to `package.json`:\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## How do I hide a certain warning?\n\nIn rare cases, you'll need to break a rule and hide the warning generated by\n`standard`.\n\nJavaScript Standard Style uses [ESLint](http://eslint.org/) under-the-hood and\nyou can hide warnings as you normally would if you used ESLint directly.\n\nTo get verbose output (so you can find the particular rule name to ignore), run:\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\nDisable **all rules** on a specific line:\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line\n```\n\nOr, disable **only** the `\"no-use-before-define\"` rule:\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line no-use-before-define\n```\n\nOr, disable the `\"no-use-before-define\"` rule for **multiple lines**:\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## I use a library that pollutes the global namespace. How do I prevent \"variable is not defined\" errors?\n\nSome packages (e.g. `mocha`) put their functions (e.g. `describe`, `it`) on the\nglobal object (poor form!). Since these functions are not defined or `require`'d\nanywhere in your code, `standard` will warn that you're using a variable that is\nnot defined (usually, this rule is really useful for catching typos!). But we want\nto disable it for these global variables.\n\nTo let `standard` (as well as humans reading your code) know that certain variables\nare global in your code, add this to the top of your file:\n\n```js\n/* global myVar1, myVar2 */\n```\n\nIf you have hundreds of files, it may be desirable to avoid adding comments to\nevery file. In this case, run:\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\nOr, add this to `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n*Note: `global` and `globals` are equivalent.*\n\n## How do I use experimental JavaScript (ES Next) features?\n\n`standard` supports the latest ECMAScript features, ES8 (ES2017), including\nlanguage feature proposals that are in \"Stage 4\" of the proposal process.\n\nTo support experimental language features, `standard` supports specifying a\ncustom JavaScript parser. Before using a custom parser, consider whether the added\ncomplexity is worth it.\n\nTo use a custom parser, first install it from npm:\n\n```bash\nnpm install babel-eslint --save-dev\n```\n\nThen run:\n\n```bash\n$ standard --parser babel-eslint\n```\n\nOr, add this to `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\nIf `standard` is installed globally (i.e. `npm install standard --global`), then\nbe sure to install `babel-eslint` globally as well, with\n`npm install babel-eslint --global`.\n\n## Can I use a JavaScript language variant, like Flow or TypeScript?\n\n`standard` supports the latest ECMAScript features. However, Flow and TypeScript add new\nsyntax to the language, so they are not supported out-of-the-box.\n\nTo support JavaScript language variants, `standard` supports specifying a custom JavaScript\nparser as well as an ESLint plugin to handle the changed syntax. Before using a JavaScript\nlanguage variant, consider whether the added complexity is worth it.\n\n### Flow\n\nTo use Flow, you need to run `standard` with `babel-eslint` as the parser and\n`eslint-plugin-flowtype` as a plugin.\n\n```bash\nnpm install babel-eslint eslint-plugin-flowtype --save-dev\n```\n\nThen run:\n\n```bash\n$ standard --parser babel-eslint --plugin flowtype\n```\n\nOr, add this to `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\",\n    \"plugins\": [ \"flowtype\" ]\n  }\n}\n```\n\n*Note: `plugin` and `plugins` are equivalent.*\n\nIf `standard` is installed globally (i.e. `npm install standard --global`), then\nbe sure to install `babel-eslint` and `eslint-plugin-flowtype` globally as well, with\n`npm install babel-eslint eslint-plugin-flowtype --global`.\n\n### TypeScript\n\nTo use TypeScript, you need to run `standard` with `typescript-eslint-parser` as the parser,\n`eslint-plugin-typescript` as a plugin, and tell standard to lint `*.ts` files (since it\ndoesn't by default).\n\n```bash\nnpm install typescript-eslint-parser eslint-plugin-typescript --save-dev\n```\n\nThen run:\n\n```bash\n$ standard --parser typescript-eslint-parser --plugin typescript *.ts\n```\n\nOr, add this to `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"typescript-eslint-parser\",\n    \"plugins\": [ \"typescript\" ]\n  }\n}\n```\n\nWith that in `package.json`, you can run:\n\n```bash\nstandard *.ts\n```\n\nIf `standard` is installed globally (i.e. `npm install standard --global`), then\nbe sure to install `typescript-eslint-parser` and `eslint-plugin-typescript` globally as well,\nwith `npm install typescript-eslint-parser eslint-plugin-typescript --global`.\n\n## What about Mocha, Jasmine, QUnit, etc?\n\nTo support mocha in test files, add this to the top of the test files:\n\n```js\n/* eslint-env mocha */\n```\n\nOr, run:\n\n```bash\n$ standard --env mocha\n```\n\nWhere `mocha` can be one of `jasmine`, `qunit`, `phantomjs`, and so on. To see a\nfull list, check ESLint's\n[specifying environments](http://eslint.org/docs/user-guide/configuring.html#specifying-environments)\ndocumentation. For a list of what globals are available for these environments,\ncheck the\n[globals](https://github.com/sindresorhus/globals/blob/master/globals.json) npm\nmodule.\n\n*Note: `env` and `envs` are equivalent.*\n\n## What about Web Workers?\n\nAdd this to the top of worker files:\n\n```js\n/* eslint-env serviceworker */\n```\n\nThis lets `standard` (as well as humans reading the code) know that `self` is a\nglobal in web worker code.\n\n## Can I check code inside of Markdown or HTML files?\n\nTo check code inside Markdown files, use [`standard-markdown`](https://www.npmjs.com/package/standard-markdown).\n\nAlternatively, there are ESLint plugins that can check code inside Markdown, HTML,\nand many other types of language files:\n\nTo check code inside Markdown files, use an ESLint plugin:\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\nThen, to check JS that appears inside code blocks, run:\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\nTo check code inside HTML files, use an ESLint plugin:\n\n```bash\n$ npm install eslint-plugin-html\n```\n\nThen, to check JS that appears inside `<script>` tags, run:\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## Is there a Git `pre-commit` hook?\n\nFunny you should ask!\n\n```sh\n#!/bin/sh\n# Ensure all javascript files staged for commit pass standard code style\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n## How do I make the output all colorful and *pretty*?\n\nThe built-in output is simple and straightforward, but if you like shiny things,\ninstall [snazzy](https://www.npmjs.com/package/snazzy):\n\n```bash\n$ npm install snazzy\n```\n\nAnd run:\n\n```bash\n$ standard --verbose | snazzy\n```\n\nThere's also [standard-tap](https://www.npmjs.com/package/standard-tap),\n[standard-json](https://www.npmjs.com/package/standard-json),\n[standard-reporter](https://www.npmjs.com/package/standard-reporter), and\n[standard-summary](https://www.npmjs.com/package/standard-summary).\n\n## Is there a Node.js API?\n\nYes!\n\n### `standard.lintText(text, [opts], callback)`\n\nLint the provided source `text`. An `opts` object may be provided:\n\n```js\n{\n  cwd: '',      // current working directory (default: process.cwd())\n  filename: '', // path of the file containing the text being linted (optional, though some eslint plugins require it)\n  fix: false,   // automatically fix problems\n  globals: [],  // custom global variables to declare\n  plugins: [],  // custom eslint plugins\n  envs: [],     // custom eslint environment\n  parser: ''    // custom js parser (e.g. babel-eslint)\n}\n```\n\nAdditional options may be loaded from a `package.json` if it's found for the\ncurrent working directory.\n\nThe `callback` will be called with an `Error` and `results` object.\n\nThe `results` object will contain the following properties:\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0,\n      output: '' // fixed source code (only present with {fix: true} option)\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `results = standard.lintTextSync(text, [opts])`\n\nSynchronous version of `standard.lintText()`. If an error occurs, an exception is\nthrown. Otherwise, a `results` object is returned.\n\n### `standard.lintFiles(files, [opts], callback)`\n\nLint the provided `files` globs. An `opts` object may be provided:\n\n```js\nvar opts = {\n  ignore: [],   // file globs to ignore (has sane defaults)\n  cwd: '',      // current working directory (default: process.cwd())\n  fix: false,   // automatically fix problems\n  globals: [],  // global variables to declare\n  plugins: [],  // eslint plugins\n  envs: [],     // eslint environment\n  parser: ''    // js parser (e.g. babel-eslint)\n}\n```\n\nThe `callback` will be called with an `Error` and `results` object (same as above).\n\n## How do I contribute to `standard`?\n\nContributions are welcome! Check out the [issues](https://github.com/standard/standard/issues) or the [PRs](https://github.com/standard/standard/pulls), and make your own if you want something that you don't see there.\n\nWant to chat? Join contributors on IRC in the `#standard` channel on freenode.\n\nHere are some important packages in the `standard` ecosystem:\n\n- **[standard](https://github.com/standard/standard)** - this repo\n  - **[standard-engine](https://github.com/flet/standard-engine)** - cli engine for arbitrary eslint rules\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - eslint rules for standard\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - eslint rules for standard (JSX)\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - custom eslint rules for standard (not part of eslint core)\n  - **[eslint](https://github.com/eslint/eslint)** - the linter that powers standard\n- **[snazzy](https://github.com/standard/snazzy)** - pretty terminal output for standard\n- **[standard-www](https://github.com/standard/standard-www)** - code for https://standardjs.com\n- **[semistandard](https://github.com/Flet/semistandard)** - standard, with semicolons (if you must)\n\nThere are also many **[editor plugins](#are-there-text-editor-plugins)**, a list of\n**[npm packages that use `standard`](https://github.com/standard/standard-packages)**,\nand an awesome list of\n**[packages in the `standard` ecosystem](https://github.com/standard/awesome-standard)**.\n\n## License\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-esla.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard - JavaScript Style Guide\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"Travis\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/dm/standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n</p>\n\n<h4 align=\"center\">Una guía de estilos JavaScript para gobernarlos a todos</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n## Guía de estilos JavaScript, con linter y corrección automática de código\n\nEste modulo te ahorra tiempo a ti (y otros) tres maneras:\n\n- **Sin configuración.** La manera mas fácil de usar estilos consistentes\n  en tu proyecto.\n- **Automaticamente formatea el código.** Ejecuta `standard --fix` y dile adios a las\n  inconsistencias en tu código.\n- **De manera temprana captura problemas de estilos y errores de programador.** Te ahorras el tiempo\n  de hacer revisiones de código eliminando inconsistencias entre el dueño del\n  repositorio y los contribuidores.\n\nInstalar con:\n\n```\nnpm install standard --save-dev\n```\n\n### Las reglas\n\n- **2 espacios** como sangría.\n- **Usar comillas simples en cadenas de texto** con la excepción de escapado de texto\n- **No dejar variables sin usar** – esta captura *toneladas* de bugs!\n- **Sin punto y coma** – [Está][1] [bien.][2] [¡En serio!][3]\n- **Nunca empezar una línea con `(`, `[`, o `` ` ``**\n  - Este es el **único** problema al evitar punto y coma – *automáticamente verificado para ti!*\n  - [Más detalles][4]\n- **Espacio después de las palabras claves** `if (condition) { ... }`\n- **Espacio después del nombre de función** `function name (arg) { ... }`\n- Usar siempre  `===` en vez de `==` – pero `obj == null` está permitido para verificar `null || undefined`.\n- Gestionar siempre el parámetro de función `err` de node.js\n- Usar siempre el prefijo `window` en los globales del navegador – A excepción de `document` y `navigator` esto está bien\n  - Previene el uso accidental de mal-llamados globales del navegador como `open`, `length`,\n    `event`, y `name`.\n- **Y [mucho más][5]** – *prueba `standard` hoy mismo!*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\nPara una mejor idea, mira este\n[archivo de ejemplo](https://github.com/expressjs/body-parser/blob/master/index.js) escrito\nen JavaScript Standard Style. O, mira alguno de los\n[miles de proyectos](https://raw.githubusercontent.com/feross/standard-packages/master/all.json)\nque usan `standard`!\n\n## Tabla de Contenido\n\n- Inicio Rápido\n  - [Instalación](#instalación)\n  - [Uso](#uso)\n  - [Lo que podrías hacer si eres inteligente](#lo-que-podrías-hacer-si-eres-inteligente)\n\n- FAQ\n  - [¿Por qué debería usar JavaScript Standard Style?](#por-qué-deberia-usar-javascript-standard-style)\n  - [¿Quién usa JavaScript Standard Style?](#quién-usa-javascript-standard-style)\n  - [¿Hay plugins para editores de textos?](#hay-plugins-para-editores-de-textos)\n  - [¿Hay alguna medalla para al readme?](#hay-alguna-medalla-para-al-readme)\n  - [No estoy de acuerdo con la regla X, ¿la puedo cambiar?](#no-estoy-de-acuerdo-con-la-regla-x-la-puedo-cambiar)\n  - [¡Pero esto no un estandar web real!](#pero-esto-no-un-estandar-web-real)\n  - [¿Hay algún formateador automático?](#hay-algún-formateador-automático)\n  - [¿Cómo hago para ignorar archivos?](#cómo-hago-para-ignorar-archivos)\n  - [¿Cómo oculto cierta alerta?](#cómo-oculto-cierta-alerta)\n  - [Yo uso una librería que contamina el espacio de nombres global. ¿Cómo puedo evitar los errores  \"variable is not defined\"?](#yo-uso-una-librería-que-contamina-el-espacio-de-nombres-global-cómo-puedo-evitar-los-errores--variable-is-not-defined)\n  - [¿Puedo usar un parser JavaScript que soporte ES última-generación?](#puedo-usar-un-parser-javascript-que-soporte-es-última-generación)\n  - [¿Puedo usar una variación de lenguaje JavaScript, como Flow?](#puedo-usar-una-variación-de-lenguaje-javascript-como-flow)\n  - [¿Qué pasa con Mocha, Jasmine, QUnit y etc?](#qué-pasa-con-mocha-jasmine-qunit-y-etc)\n  - [¿Qué pasa con Web Workers?](#qué-pasa-con-web-workers)\n  - [¿Puedo verificar código dentro de archivos Markdown o HTML?](#puedo-verificar-codigo-dentro-de-archivos-markdown-o-html)\n  - [¿Hay algún gancho git `pre-commit`?](#hay-algún-gancho-git-pre-commit)\n  - [¿Cómo hago la salida (output) toda colorida y *bonita*?](#cómo-hago-la-salida-output-toda-colorida-y-bonita)\n  - [Node.js API](#nodejs-api)\n  - [¿Cómo puedo contribuir a `standard`?](#cómo-puedo-contribuir-a-standard)\n\n- [Licencia](#licencia)\n\n## Instalación\n\nLa manera más fácil de usar JavaScript Standard Style es instalarlo globalmente como un programa de línea de comandos de Node. Ejecuta el siguiente comando en la terminal:\n\n```bash\n$ npm install standard --global\n```\n\nO, puedes instalar `standard` localmente, para usar en un solo proyecto:\n\n```bash\n$ npm install standard --save-dev\n```\n\n*Nota: para ejecutar los comandos anteriores [Node.js](http://nodejs.org) y [npm](https://npmjs.com) deben estar instalados.*\n\n## Uso\n\nUna vez tenga instalado `standard`, ya deberías poder usar `standard`. Un simple caso de uso podría ser comprobar estilos de todos los archivos JavaScript en el directorio actual:\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nOpcionalmente puedes pasar un directorio (o directorios) usando el patrón glob.\nAsegúrese de usar comillas en las rutas que contengan el patrón glob\npara que sean expandidos por `standard` y no por el shell:\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**Nota:** Por defecto `standard`  buscará todos los archivos que concuerden con los patrones:\n`**/*.js`, `**/*.jsx`.\n\n## Lo que podrías hacer si eres inteligente\n\n1. Agregar esto `package.json`\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. Los estilos son comprobados automáticamente cuando ejecutes `npm test`\n\n  ```\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. No vuelvas a dar feedback de estilos en una PR jamás!\n\n## ¿Por qué deberia usar JavaScript Standard Style?\n\nLa belleza de JavaScript Standard Style es qué es simple.\nNadie quiere mantener configuración de estilos en múltiples archivos\nde cientos de líneas para cada módulo/proyecto en los que trabajan.\n¡Se acabó esta locura!\n\nEste módulo te ahorra tiempo a ti (y otros) en tres maneras:\n\n- **Sin configuración.** La manera mas fácil de usar estilos consistentes\n  en tu proyecto.\n- **Automáticamente formatea el código.** Ejecuta `standard --fix` y dile adios a las\n  inconsistencias en tu código.\n- **Captura problemas de estilos y errores del programador muy pronto.** Te ahorras el tiempo\n  de hacer revisiones de código eliminando inconsistencias entre el dueño del\n  repositorio y los contribuidores.\n\nAdoptar estilos `standard` significa clasificar la importancia de la claridad del código y las convenciones de la comunidad mucho más que estilo personal. Esto quizás no tenga sentido para el 100% de proyectos y culturas de desarrollo, pero los proyectos de código abierto pueden llegar a ser hostiles para los novatos. Estableciendo expectativas de contribución limpia y automatizada puede hacer el proyecto más saludable.\n\n## ¿Quién usa JavaScript Standard Style?\n\nUn montón de gente!\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/github.png>](https://github.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/taser.png>](https://www.taser.com) |\n|---|---|---|---|---|\n\nAdicionalmente a compañías, muchos miembros de la comunidad usan `standard` en modulos que son\n[muy numerosos](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) para listar aquí.\n\nTambién `standard` es el linter con más estrellas en GitHub\n[Clean Code Linter](https://github.com/showcases/clean-code-linters).\n\n## ¿Hay plugins para editores de textos?\n\nPrimero, instale `standard`. Luego, instale el plugin apropiado para su editor:\n\n#### Sublime Text\n\nUsando **[Package Control][sublime-1]**, instale **[SublimeLinter][sublime-2]** y\n**[SublimeLinter-contrib-standard][sublime-3]**.\n\nPara formateo automático al guardar, instale **[StandardFormat][sublime-4]**.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n#### Atom\n\nInstale **[linter-js-standard][atom-1]**.\n\nPara formateo automático al guardar, instale **[standard-formatter][atom-2]**. Para snippets,\ninstale **[standardjs-snippets][atom-3]**.\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n\n#### Visual Studio Code\n\nInstale **[vscode-standardjs][vscode-1]**. (Incluye soporte para formateo automático.)\n\nPara snippets JS, instale: **[vscode-standardjs-snippets][vscode-2]**.\nPara snippets React, instale **[vscode-react-standard][vscode-3]**.\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n#### Vim\n\ninstale **[Syntastic][vim-1]** y agregue esta línea a su `.vimrc`:\n\n```vim\nlet g:syntastic_javascript_checkers = ['standard']\n```\n\nPara formateo automático al guardar, agregue estas dos líneas a su `.vimrc`:\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\n[vim-1]: https://github.com/scrooloose/syntastic\n\n#### Emacs\n\nInstale **[Flycheck][emacs-1]** y revise **[manual][emacs-2]** para aprender\ncomo habilitarlo en sus proyectos.\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n#### Brackets\n\nBusque el registro de extension para **[\"Standard Code Style\"][brackets-1]**.\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n#### [WebStorm and other JetBrains products][webstorm-1]\n\nWebStorm [recientemente anuncio soporte nativo](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/) para `standard` diractemente en el IDE.\n\nSi aun prefieres configurar `standard` manualmente [sigue esta guia](webstorm-2). Esto se aplica a todos los productos de JetBrains, incluyendo PhpStorm, IntelliJ, RubyMine y etc.\n\n[webstorm-1]: https://www.jetbrains.com/webstorm/\n[webstorm-2]: webstorm.md\n\n## Hay alguna medalla para readme?\n\nSi! Si estas usando `standard` en tu proyecto, puedes includir una de estas en tu readme para\nhacerle saber a las personas que en tu código estas usando estilos standard.\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```markdown\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/)\n\n```markdown\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/)\n```\n\n## No estoy de acuerdo con la regla X, ¿la puedo cambiar?\n\nNo. El objetivo de `standard` es evitar [bikeshedding][bikeshedding] en el estilo. Existen un montón de debates online acerca de tabs vs espacios, etc. que nunca serán resueltos. Estos debates solo te distraen de hacer tu trabajo. Al final del día tienes simplemente que “usar alguno”, y esa es toda la filosofía de `standard` -- es un montón de sensibles opiniones de “usar alguno”. Con la esperanza que los usuarios vean el valor en esto más que defender sus propias opiniones.\n\nSi realmente quieres configurar cientos de reglas individualmente, puedes usar `eslint` directamente con [eslint-config-standard](https://github.com/standard/eslint-config-standard) aplicando\ncambios encima de este.\n\nTip: ¡Simplemente usa `standard` y ya está. Existen problemas reales\nen los cuales debes usar tu tiempo! :P\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## ¡Pero esto no un estandar web real!\n\n¡Por su puesto que no lo es! Este estilo no está afiliado a ningún grupo oficial de estándar web, por eso este repositorio se llama `feross/standard` y no `ECMA/standard`.\n\nLa palabra “estándar” tiene más significados que solo “estándar web” :-) Por ejemplo:\n\n- Este módulo ayuda a mantener el código a la más alta *calidad estándar*.\n- Este módulo asegura que las nuevas contribuciones sigan los *estilos estándar* básicos.\n\n## ¿Hay algún formateador automático?\n\n¡Sí! Puedes usar `standard --fix` para arreglar la mayoría de problemas automáticamente.\n\n`standard --fix` está integrado en `standard` (desde v8.0.0) para máxima conveniencia.\nLa mayoría de los problemas se arreglan, pero algunos errores (olvidar gestionar errores en callbacks) deben ser arreglados manualmente.\n\nPara no perder el tiempo, `standard` emite un mensaje (\"Run `standard --fix` to\nautomatically fix some problems.\") cuando detecta errores que pueden ser arreglados automáticamente.\n\n## ¿Cómo hago para ignorar archivos?\n\nCiertas rutas (`node_modules/`, `coverage/`, `vendor/`, `*.min.js`, `bundle.js`, y archivos/directorios que empiezan con `.` cómo `.git`) son ignorados automáticamente.\n\nLas rutas del `.gitignore` del proyecto raíz son ignorados automáticamente.\n\nA veces necesitas ignorar directorios o archivos específicos. Para hacerlo, agrega la propiedad `standard.ignore` al `package.json`:\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## ¿Cómo oculto cierta alerta?\n\nEn raros casos, necesitarás romper una regla y ocultar la alerta generada por `standard`.\n\nJavaScript Standard Style usa [ESLint](http://eslint.org/) bajo la capucha y puedes ocultar las alertas como normalmente lo harías si usaras ESLint directamente.\n\nPara obtener una salida mas especifica (así puedes encontrar el nombre de la regla a ignorar) ejecute:\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\nInhabilitar **toda las reglas** en una linea especifica:\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line\n```\n\nO, inhabilitar **solo** la regla `\"no-use-before-define\"`:\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line no-use-before-define\n```\n\nO, inhabilitar la regla `\"no-use-before-define\"` para **múltiples lineas**:\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## Yo uso una librería que contamina el espacio de nombres global. ¿Cómo puedo evitar los errores \"variable is not defined\"?\n\nAlgunos paquetes (ej `mocha`) colocan sus funciones (ej: `describe`, `it`) en el objeto global (¡mala manera!). Como estas funciones no están definidas o requeridas (ej: `require`) en ningún lugar del código, `standard` te alertara que están usando una variable que no está definida (usualmente, esta regla es realmente útil para detectar errores de tipeo). Pero queremos inhabilitar estas variables globales.\n\nPara hacerle saber a `standard` (como también a los humanos que leen tu código) que ciertas variables son globales en tu código, agregar esto en la parte superior de tu código:\n\n```js\n/* global myVar1, myVar2 */\n```\n\nSi tienes cientos de archivos, seria deseable evitar agregar comentarios a cada archivo.\nEn este caso ejecute:\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\nO, agregar esto a su `package.json`\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n*Nota: `global` y `globals` son equivalentes*\n\n## ¿Cómo puedo usar características experimentales JavaScript (ES Next)?\n\n`standard` soporta las ultimas características de ECMAscript, ES8 (ES2017) incluyendo todas las características del lenguaje\nde las propuestas que estan en \"Stage 4\" del proceso de propuestas.\n\nPara soportar características experimentales del lenguaje, `standard` soporta especificar un parser JS customizado. Antes de que uses un parser customizado, considera si la complejidad agregada vale la pena.\n\nPara usar un parser customizado, instálalo desde npm (ejemplo: `npm install babel-eslint`) y ejecuta esto:\n\n```bash\n$ standard --parser babel-eslint\n```\n\nO, agrega esto a `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\nSi `standard` está instalado globalmente (ej: `npm install standard --global`), entonces asegúrate de instalar `babel-eslint` globalmente también com `npm install babel-eslint --global`.\n\n## ¿Puedo usar una variación de lenguaje JavaScript, como Flow?\n\nAntes de usar una variable del lenguaje JavaScript customizado, considera si la complejidad agregada\n(y esfuerzo requerido para obtener los contribuidores alcanzarle con rapidez) vale la pena.\n\n`standard` soporta plugins ESLint. Usa uno de estos para transformar el código a JavaScript válido antes de que `standard` lo vea. Para usar un parser customizado, instálalo desde\nnpm (example: `npm install eslint-plugin-flowtype`) y ejecuta:\n\n```bash\n$ standard --plugin flowtype\n```\n\nO, agrega esto a `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\",\n    \"plugins\": [\n      \"flowtype\"\n    ]\n  }\n}\n```\n\nSi `standard` está instalado globalmente (ej: `npm install standard --global`), entonces asegúrate de instalar `eslint-plugin-flowtype` globalmente también, con `npm install eslint-plugin-flowtype -g`.\n\n*Nota: `plugin` y `plugins` son equivalentes*\n\n## ¿Qué pasa con Mocha, Jasmine, QUnit y etc?\n\nPara soportar mocha en tus archivos de tests, agrega esto al inicio de los archivos:\n\n```js\n/* eslint-env mocha */\n```\n\nO, ejecuta:\n\n```bash\n$ standard --env mocha\n```\n\nDonde `mocha` puede ser `jasmine`, `qunit`, `phantomjs`, y así sucesivamente.\nPara ver la lista completa, comprueba la documentación de ESLint [especificando entornos](http://eslint.org/docs/user-guide/configuring.html#specifying-environments).\nPara una lista de qué variables globales están disponibles en estos entornos comprueba el módulo npm [globals](https://github.com/sindresorhus/globals/blob/master/globals.json).\n\n*Nota: `env` y `envs` son equivalentes*\n\n## ¿Qué pasa con Web Workers?\n\nAgrega esto al inicio de tus archivos:\n\n```js\n/* eslint-env serviceworker */\n```\n\nEsto le hará saber a` standard` (como también humanos que leen tu código) que\n`self` es una variable global en el codigo web worker.\n\n## ¿Puedo verificar código dentro de archivos Markdown o HTML?\n\nPara verificar código dentro de archivos Markdown use [`standard-markdown`](https://www.npmjs.com/package/standard-markdown).\n\nAlternativamente, hay plugins ESLint para verificar código de Markdown,\nHTML y otros tipos de lenguajes:\n\nPara verificar código dentro de archivos Markdown, usa el plugin ESLint:\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\nLuego para verificar código JS que aparece dentro de bloques código, ejecute:\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\nPara verificar código dentro de archivos HTML, use el plugin ESLint:\n\n```bash\n$ npm install eslint-plugin-html\n```\n\nLuego para verificar el código que aparece dentro de etiquetas `<script>`, ejecute:\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## ¿Hay algún gancho git `pre-commit`?\n\n¡Qué bien que lo preguntes!\n\n```sh\n#!/bin/sh\n# Asegura que todos los archivos javascript especificados\n# para hacer commit pasan los estandares de estilo de código\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n## ¿Cómo hago la salida (output) toda colorida y *bonita*?\n\nLa salida integrada es simple y directa, pero si te gustan las cosas brillantes, puedes instalar [snazzy](https://www.npmjs.com/package/snazzy):\n\n```bash\n$ npm install snazzy\n```\n\ny ejecutar:\n\n```bash\n$ standard --verbose | snazzy\n```\n\nTambién tienes [standard-tap](https://www.npmjs.com/package/standard-tap),\n[standard-json](https://www.npmjs.com/package/standard-json),\n[standard-reporter](https://www.npmjs.com/package/standard-reporter), y\n[standard-summary](https://www.npmjs.com/package/standard-summary).\n\n## Node.js API\n\n### `standard.lintText(text, [opts], callback)`\n\nHacer Lint al texto fuente previsto para hacer cumplir JavaScript Standard Style.\nUn objeto `opts` puede ser proporcionado:\n\n```js\nvar opts = {\n  fix: false,   // automatically fix problems\n  globals: [],  // global variables to declare\n  plugins: [],  // eslint plugins\n  envs: [],     // eslint environment\n  parser: ''    // js parser (e.g. babel-eslint)\n}\n```\n\nEl `callback` será llamado con un objeto de `Error` y `results`:\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `standard.lintFiles(files, [opts], callback)`\n\nHacer Lint a los archivos que concuerden con el patrón globs.\nUn objeto `opts` puede ser proporcionado:\n\n```js\nvar opts = {\n  ignore: [],   // file globs to ignore (has sane defaults)\n  cwd: '',      // current working directory (default: process.cwd())\n  fix: false,   // automatically fix problems\n  globals: [],  // global variables to declare\n  plugins: [],  // eslint plugins\n  envs: [],     // eslint environment\n  parser: ''    // js parser (e.g. babel-eslint)\n}\n```\n\nEl `callback` será llamado con un objeto de `Error` y `results`: (igual al de arriba).\n\n## ¿Cómo puedo contribuir a `standard`?\n\nLas contribuciones son bienvenidas! Comprueba los [issues](https://github.com/standard/standard/issues) o [PRs](https://github.com/standard/standard/pulls), o haz el tuyo propio si quieres algo que nos ves allí\n\nUnete a nosotros `#standard` en freenode.\n\n- **[standard](https://github.com/standard/standard)** - este repositorio\n  - **[standard-engine](https://github.com/flet/standard-engine)** - motor arbitrario cli de relgas eslint\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - reglas eslint para standard\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - reglas eslint para standard (JSX)\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - reglas customizadas eslint para standard (no es parte del nucleo eslint)\n  - **[eslint](https://github.com/eslint/eslint)** - linter que da poder a standard\n- **[snazzy](https://github.com/standard/snazzy)** - salida colorida o *bonita* en el terminal para standard\n- **[standard-www](https://github.com/standard/standard-www)** - codigo de https://standardjs.com\n- **[semistandard](https://github.com/Flet/semistandard)** - standard, con punto y coma (sí es necesario)\n\nTambién  hay un montón **[plugins editores de textos](#plugins-editores-de-textos)**, una lista de\n**[paquetes npm que usan `standard`](https://github.com/standard/standard-packages)**,\ny una impresionante lista de\n**[paquetes en el ecosistema `standard`](https://github.com/standard/awesome-standard)**.\n\n## Licencia\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-iteu.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard - JavaScript Style Guide\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"travis\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/eslint-config-standard\"><img src=\"https://img.shields.io/npm/dm/eslint-config-standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n</p>\n\n<h4 align=\"center\">Un solo Stile JavaScript per domarli tutti</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n## Guida allo stile JavaScript, con linter e autocorrettore del codice\n\nQuesto modulo fa risparmiare tempo a te (e altri!) in tre modi:\n\n- **Nessuna configurazione** La maniera più veloce per rafforzare un stile consistente\n  nel tuo progetto. Basta solo installarlo.\n- **Codice automatica formattato** Esegui solamente `standard --fix` e puoi dire addio\n  a tutto quel codice inconsistente e disordinato.\n- **Trova errori di stile ed errori di programmazione** Risparmia tempo durante i controlli\n  del codice senza fare avanti e indietro tra i vari collaboratori\n\nNon ci sono decisioni da prendere. Nessun `.eslintrc`, `jshintrc`, o `.jscsrc` file da mantenere.\nFunziona e basta.\n\nInstalla con:\n\n```\nnpm install standard --save-dev\n```\n\n## Le regole\n\n- **2 spazi** per indentare\n- **Singolo apostrofo per le stringhe** - eccetto per evitare l'escaping\n- **Nessuna variabile non utilizzata** - questo cattura *molti* errori!\n- **Nessun punto e virgola** [È][1] [OK.][2] [Davvero!][3]\n- **Mai iniziare una linea di codice con `(`, `[`, or `` ` ``**\n  - Questa è l'unica scappatoia per omettere i punto e virgola *automaticamente controllato per te!*\n  - [Maggiori dettagli][4]\n- **Spazio dopo le parole chiave** `if (condition) { ... }`\n- **Spazio dopo il nome di una funzione** `function name (arg) { ... }`\n- Usare sempre `===` invece di `==` ma `obj == null` è consentito per controllare `null || undefined`.\n- Sempre gestire l'errore node.js `err` dato come parametro da una funzione\n- Usare sempre il prefisso per le variabili globali del browser con `window` - eccezione per `document` e `navigator`\n  - Previene l'uso di nomi riservati per le variabili globali del browser, come ad esempio `open`, `length`,\n    `event`, e `name`.\n- **E [ancora di più][5]** *prova `standard`, oggi!*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\nPer avere le idee più chiari, da un'occhiata al\n[file d'esempio](https://github.com/expressjs/body-parser/blob/master/index.js) scritto\nusando JavaScript Standard Style. O guarda i\n[millemila progetti](https://raw.githubusercontent.com/feross/standard-packages/master/all.json)\nche usano `standard`!\n\n## Tabella dei contenuti\n\n- Settaggio veloce\n  - [Installazione](#installazione)\n  - [Utilizzo](#utilizzo)\n  - [Cosa vorresti fare se sei intelligente](#cosa-vorresti-fare-sei-intelligente)\n- FAQ\n  - [Perchè dovrei usare JavaScript Standard Style?](#perche-dovrei-usare-javascript-standard-style)\n  - [Chi usa JavaScript Standard Style?](#chi-usa-javascript-standard-style)\n  - [Ci sono dei plugin per gli editor di testo?](#ci-sono-dei-plugin-per-gli-editor-di-testo)\n  - [Esiste un banner?](#esiste-un-banner)\n  - [Non sono d'accordo con la regola X, posso cambiarla?](#non-sono-daccordo-con-la-regola-x-posso-cambiarla)\n  - [Ma questo non è un vero web standard!](#bma-questo-non-e-un-vero-web-standard)\n  - [Esiste un formattatore automatico?](#esiste-un-formattatore-automatico)\n  - [Come posso ignorare dei file?](#come-posso-ignorare-dei-file)\n  - [Come posso nascondere un determinato warning?](#come-posso-nascondere-un-determinato-warning)\n  - [Utilizzo una libreria che inquina il namespace globale. Come posso prevenire errori del tipo \"variable is not defined\"?](#tilizzo-una-libreria-che-inquina-il-namespace-globale-come-posso-prevenire-errori-del-tipo-variable-is-not-defined)\n  - [Come posso usare funzionalità sperimentali di JavaScript (ES Next)?](#ome-posso-usare-funzionalita-sperimentali-di-javascript-es-next)\n  - [Posso usare varianti di JavaScript come Flow?](#posso-usare-varianti-di-javascript-come-flow)\n  - [Riguardo Mocha, Jasmine, QUnit, ecc.?](#riguardo-mocha-jasmine-qunit-ecc)\n  - [Riguardo Web Workers?](#riguardo-web-workers)\n  - [Posso controllare codice dentro file di tipo Markdown o HTML?](#osso-controllare-codice-dentro-file-di-tipo-markdown-o-html)\n  - [C'è un hook Git per `pre-commit`?](#ce-un-hook-git-per-pre-commit)\n  - [Come posso mostrare l'output del mio codice colorato e *carino*?](#ome-posso-mostrare-loutput-del-mio-codice-colorato-e-carino)\n  - [C'è un API per Node.js?](#ce-un-api-per-nodejs)\n  - [Come posso contribuire a `standard`?](#come-posso-contribuire-per-standard)\n- [Licenza](#licenza)\n\n## Installazione\n\nLa maniera più semplice per usare JavaScript Standard Style è quella di installarlo globalmente usando la linea di comando di Node. Esegui il seguente comando da terminale:\n\n```bash\n$ npm install standard --global\n```\n\nO, se vuoi installare `standard` localmente, da utilizzare in un singolo progetto:\n\n```bash\n$ npm install standard --save-dev\n```\n\n*Nota: per eseguire i precedenti comandi, [Node.js](http://nodejs.org) and [npm](https://npmjs.com) deve essere già installato\nsulla propria macchina.*\n\n## Utilizzo\n\nDopo aver installato `standard`, dovresti essere in grado di utilizzarlo come programma. Lo scenario d'uso più comune sarebbe quello di\ncontrollare lo stile di tutti i tuoi file JavaScript attualmente presenti nel tuo progetto:\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nPuoi opzionalmente passare una cartella (o cartelle) usando il pattern globale. Assicurati di mettere\ntra virgolette i percorsi contenenti il pattern globale, così verranno espansi da `standard` invece che dalla tua shell:\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**Nota**: di default `standard` controllerà tutti i file che corrispondono al seguente pattern:\n`**/*.js`, `**/*.jsx`.\n\n## Cosa vorresti fare se sei intelligente\n\n1. Aggiungerlo al tuo `package.json`\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n\n2. Lo stile del tuo codice verrà controllato automaticamente quando esegui `npm test`\n  ```bash\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n3. Mai più suggerimenti riguardo lo stile del tuo codice durante le pull request!\n\n## Perchè dovrei usare JavaScript Standard Style?\n\nLa bellezza di JavaScript Standard Style è la sua semplicità. Nessuno vuole mantenere migliaia di linee di codice di configurazione per lo stile del codice per ogni progetto/module sul quale si lavora. Basta impazzire!\n\nQuesto modulo fa risparmiare tempo a te (e altri!) in tre modi:\n\n- **Nessuna configurazione** La maniera più veloce per rafforzare un stile consistente\n  nel tuo progetto. Basta solo installarlo.\n- **Codice automatica formattato** Esegui solamente `standard --fix` e puoi dire addio\n  a tutto quel codice inconsistente e disordinato.\n- **Trova errori di stile ed errori di programmazione** Risparmia tempo durante i controlli\n  del codice senza fare avanti e indietro tra i vari collaboratori\n\n  Adottare lo stile `standard` signica dare più importanza alla chiarezza del codice e convenzioni della comunità rispetto che allo stile personale. Questo non potrebbe avere senso per il 100% dei progetti e modi di sviluppo, ma l'open source può essere un posto ostile per i nuovi arrivati. Decidere le aspettative dei collaboratori in modo chiaro e automatizzato rendere un progetto più sano.\n\n## Chi usa JavaScript Standard Style?\n\nUn sacco di gente!\n\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/github.png>](https://github.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/taser.png>](https://www.taser.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/neo4j.png>](https://www.neo4j.com) |\n|---|---|---|---|---|\n\n\nOltre alle aziende, anche molti membri della comunità usano `standard` su pacchetti che sono [troppo numerosi](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) da mostrare qui.\n\n`standard` è inoltre il miglior linter favorito dal caso d'uso dalla GitHub [Clean Code Linter](https://github.com/showcases/clean-code-linters).\n\n## Ci sono dei plugin per gli editor di testo?\n\nPrimo, installa `standard`. Dopo di che installa il plugin più appropriato per il tuo editor:\n\n### Sublime Text\n\nUsano **[Package Control][sublime-1]**, installa **[SublimeLinter][sublime-2]** e\n**[SublimeLinter-contrib-standard][sublime-3]**.\n\nPer la formattazione automatica durante il salvataggio, installa **[StandardFormat][sublime-4]**.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n### Atom\n\nInstalla **[linter-js-standard][atom-1]**.\n\nIn alternativa, puoi installare **[linter-js-standard-engine][atom-4]**. Invece di installare la sua versione di `standard`, userà automaticamente la version installata all'interno del tuo progetto. Funzionerà automaticamente anche con altri linters che si basano su **[standard-engine][atom-5]**.\n\nPer la formattazione automatica, installa **[standard-formatter][atom-2]**. Per aiuti (snippets),\ninstalla **[standardjs-snippets][atom-3]**.\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n[atom-4]: https://atom.io/packages/linter-js-standard-engine\n[atom-5]: https://github.com/Flet/standard-engine\n\n### Visual Studio Code\n\nInstalla **[vscode-standardjs][vscode-1]**. (Include supporto per la formattazione automatica.)\n\nPer JS snippets, installa: **[vscode-standardjs-snippets][vscode-2]**. Per ReactJS snippets, installa **[vscode-react-standard][vscode-3]**.\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n### Vim\n\nInstalla **[ale][vim-1]**.\n\nPer la formattazione automatica al salvataggio, aggiungi quelle linee a `.vimrc`:\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\nPacchetti alternativi che possono essere inclusi sono [neomake][vim-2] e [syntastic][vim-3], entrambi hanno all'interno il supporto per `standard` (configurazione potrebbe essere necessaria).\n\n[vim-1]: https://github.com/w0rp/ale\n[vim-2]: https://github.com/neomake/neomake\n[vim-3]: https://github.com/vim-syntastic/syntastic\n\n### Emacs\n\nInstalla **[Flycheck][emacs-1]** e controlla **[manual][emacs-2]** per imparare come abilitarlo all'interno del tuo progetto.\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n### Brackets\n\nCerca l'estenzione di registro per **[\"Standard Code Style\"][brackets-1]** and clicca \"Install\".\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n### WebStorm (PhpStorm, IntelliJ, RubyMine, JetBrains, etc.)\n\nWebStorm [ha annunciato recentemente supporto nativo](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/)\nper `standard` direttamente nell'IDE.\n\nSe preferisci configurare `standard` manualmente, [segui questa guida][webstorm-1]. Questa guida va bene per tutti i prodotti JetBrains, come ad esempio PhpStorm, IntelliJ, RubyMine, ecc.\n\nIf you still prefer to configure `standard` manually, [follow this guide][webstorm-1]. This applies to all JetBrains products, including PhpStorm, IntelliJ, RubyMine, etc.\n\n[webstorm-1]: docs/webstorm.md\n\n## Esiste un banner?\n\nSì! Se usi `standard` nel tuo progetto, puoi includere uno di questi banner nel tuo readme file per far sapere alle persone the il tuo codice usa JavaScript Standard Style.\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```md\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n```md\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n```\n## Non sono d'accordo con la regola X, posso cambiarla?\n\nNo. Il punto essenziale di `standard` è di aiutarti a salvare tempo evitando [bikeshedding][bikeshedding] (discussioni su piccole cose mentre la cosa più importante non è terminata) sullo stile del codice. Ci sono un sacco di grandi discussioni riguardo tabs vs. spazi, ecc. che non saranno mai risolte. Queste discussioni semplicemente fanno perdere tempo. Alla fine, quello che ti rimane da fare è solamente 'scegli qualcosa', è questa la filosofia di `standard` - un sensato insieme di opinioni di 'scegli qualcosa'. Con un po' di fiducia, gli utenti vedranno il valore in ciò invece di difendere il proprie opinioni personali.\n\nSe davvero vuoi configurare centinaia di regole ESLint individualmente, puoi sempre usare `eslint` direttamente con [eslint-config-standard](https://github.com/standard/eslint-config-standard) in modo da usare le tue regole.\n\nSuggerimento: usa semplicemente `standard` e vai avanti. Ci sono problemi più reali dove puoi spendere il tuo prezioso tempo! :P\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## Ma questo non è un vero web standard!\n\nOvvio che no! Lo stile presentato qui non è affiliato con nessuno degli gruppi standard web, ecco perchè questo repository si chiama `feross/standard` e non `ECMA/standard`.\n\nLa parola \"standard\" signica più di un \"web standard\" :-) Per esempio:\n\n- Questo module aiuta a tenere il codice vicino ad uno *standard di qualità*\n- Questo module assicura che nuovi contribtori seguano gli *stili standard*\n\n## Esiste un formattatore automatico?\n\nSì! Puoi usare `standard --fix` per correggere la maggior parte degli errori automaticamente.\n\n`standard --fix` è direttamente offerto da `standard` per offrire il massimo della convenienza. La maggior parte degli errori possono essere corretti, ma alcuni errori (come ad esempio dimenticarsi di gestire gli errori) devono essere corretti a mano.\n\nPer risparmiare tempo, l'ouput di `standard` è un messaggio del tipo \"`Run standard --fix to automatically fix some problems`\" quando rileva problemi che possono essere risolti automaticamente.\n\n## Come posso ignorare dei file?\n\nAlcuni percorsi (`node_modules/`, `coverage/`, `vendor/`, `*.min.js`, `bundle.js`,\ne file/cartelle the iniziano con `.` come `.git/`) sono automaticamente ignorati.\n\nAnche i percorsi specificati all'interno del file `.gitignore` sono automaticamente ignorati.\n\nAlle volte hai bisogno di ignorare file minificati o cartelle in più.  Per farlo, aggiungi la proprietà `standard.ignore` all'interno di `package.json`:\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## Come posso nascondere un determinato avviso?\n\nIn rari casi, avarai la necessità di rompere le regole e nascondere l'avviso generato da `standard`.\n\nJavaScript Standard Style usa [ESLint](http://eslint.org/) al di sotto del suo engine e puoi nascondere gli avvisi come se lo facessi direttamente per ESLint.\n\nPer avere un output più verboso (e così avere accesso al nome della regola), esegui:\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\nDisabilita **tutte le regole** in una specifica riga:\n\n```js\nfile = 'So cosa sto facendo' // eslint-disable-line\n```\n\nO, disabilita **solo** la regola `\"no-use-before-define\"`:\n\n```js\nfile = 'So cosa sto facendo'  // eslint-disable-line no-use-before-define\n```\n\nO, disabilita la regola `\"no-use-before-define\"` per **più righe**:\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## Utilizzo una libreria che inquina il namespace globale. Come posso prevenire errori del tipo \"variable is not defined\"?\n\nAlcune librerie (es. `mocha`) mettono le loro funzionalità (es. `describe`, `it`) nell'oggetto globale. Considerato il fatto che queste funzioni definite o non sono importate usando il `require` all'interno del tuo codice, `standard` vi avviserà che stai per utilizzare una variabile che non è non stata definita. (di solito questa regola è utile per trovare errori di scrittura!). Ma vogliamo disabilitarlo per questi oggetti globali.\n\nPer permettere a `standard` (anche per quando qualcun altro leggerà il tuo codice) di far sapere che certe variabili  sono globali all'interno del tuo codice, aggiungi questo all'inizio del tuo file:\n\n```js\n/* global myVar1, myVar2 */\n```\n\nSe hai centiaia di file, sarebbe più conveniente evitare di aggiungere commenti su ogni file. In questo caso, esegui:\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\nOppure aggiungi questo al tuo `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n*Nota: `global` e `globals` sono equivalenti.*\n\n## Come posso usare funzionalità sperimentali di JavaScript (ES Next)?\n\n`standard` supporta le ultime funzionalità di ECMAScript, ES8 (ES2017), includendo anche funzionalità proposte (proposals) che si trovano allo \"Stage 4\" del processo decisionale.\n\nPer supportare funzionalità sperimentali, `standard` permette di configurare uno perser JavaScript su misura (custom). Prima di aggiungere un diverso parser, considera se la complessità che si andrà ad aggiungere ne valga la pena.\n\nPer usare un parser su misura (custom), installalo da npm (esempio: `npm install --save-dev babel-eslint`) ed esegui:\n\n```bash\n$ standard --parser babel-eslint\n```\n\nOppure aggiungi questo al tuo `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\nSe `standard` è installato globalmente (i.e. `npm install standard --global`), allora assicurati che anche `babel-eslint` sia installato globalmente, con\n`npm install babel-eslint --global`.\n\n## Posso usare varianti di JavaScript come Flow?\n\nPrima di usare una variante di JavaScript, considera se l'aggiunta di complessità (ed energie richieste per permettere i nuovi sviluppatori di essere pronti) ne valga la pena.\n\n`standard` supporta plugins ESLint. Utilizza uno di questi plugins per trasformare il codice in valido JavaScript prima che `standard` lo veda. Per usare un parser ad-hoc, installalo tramite npm ed esegui:\n\n```bash\n$ standard --plugin PLUGIN_NAME\n```\n\nOppure aggiungi questo al tuo `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"PLUGIN_NAME\" ]\n  }\n}\n```\n\nPer usare Flow, hai bisogno di usare `babel-eslint` come parser, Quindi, esegui `npm install eslint-plugin-flowtype babel-eslint` e dopo di che esegui:\n\n```bash\n$ standard --plugin flowtype --parser babel-eslint\n```\n\nOppure aggiungi questo al tuo `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"flowtype\" ],\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\nSe `standard` è installato globalmente (es. `npm install standard --global`), allora assicurati che anche `eslint-plugin-flowtype` sia installato globalmente, con\n`npm install eslint-plugin-flowtype --global`.\n\n*Nota: `plugin` e `plugins` sono equivalenti.*\n\n## Riguardo Mocha, Jasmine, QUnit, ecc.?\n\nPer supportare mocha nei tuoi file di test, aggiungi questo all'inizio dei tuoi file:\n\n```js\n/* eslint-env mocha */\n```\n\nO esegui:\n\n```bash\n$ standard --env mocha\n```\n\nDove `mocha` può essere anche `jasmine`, `qunit`, `phantomjs`, e così via. Per vedere l'intera lista, controlla la documentazione di ESlint su come\n[specificare degli ambienti](http://eslint.org/docs/user-guide/configuring.html#specifying-environments). Per una lista completa degli oggetti globali a disposizione degli ambienti, controlla la sezione\n[globals](https://github.com/sindresorhus/globals/blob/master/globals.json) del modulo npm.\n\n*Nota: `env` e `envs` sono equivalenti.*\n\n## Riguardo Web Workers?\n\nAggiungi questo all'inizio del tuo file:\n\n```js\n/* eslint-env serviceworker */\n```\nPer permettere a `standard` (anche per quando qualcun altro leggerà il tuo codice) di far sapere\nche `self` è un oggetto globale all'interno del codice del tuo web worker.\n\n## Posso controllare codice dentro file di tipo Markdown o HTML?\n\nPer controllare codice all'interno di file di tipo Markdown, usa [`standard-markdown`](https://www.npmjs.com/package/standard-markdown).\n\nIn alternativa, ci sono diversi plugin di ESLint per controllare il codice all'interno di Markdown, HTML e altri tipi di file:\n\nPer controllare il codice dentro un file Markdown, usa il plugin ESLint:\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\nDopodiche, per controllare codice JavaScript che compare dentro un blocco di codice, esegui:\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\nPer controllare codice dentro file HTML, usa il plugin ESLint:\n\n```bash\n$ npm install eslint-plugin-html\n```\n\nDopodiche, per controllare codice JavaScript che compare dentro i tag `<script>`, esegui:\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## C'è un hook Git per `pre-commit`?\n\nDivertente!\n\n```sh\n#!/bin/sh\n#Assicurati che tutti i file javascript pronti per il commit passano lo standard code style\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n\n## Come posso mostrare l'output del mio codice colorato e *carino*?\n\nL'output all'interno della libreria è alquanto basilare, ma se ti piacciono le cose sfarzose, allora installa [snazzy](https://www.npmjs.com/package/snazzy):\n\n```bash\n$ npm install snazzy\n```\n\nEd esegui:\n\n```bash\n$ standard --verbose | snazzy\n```\n\nCi sono anche [standard-tap](https://www.npmjs.com/package/standard-tap),\n[standard-json](https://www.npmjs.com/package/standard-json),\n[standard-reporter](https://www.npmjs.com/package/standard-reporter), e\n[standard-summary](https://www.npmjs.com/package/standard-summary).\n\n## C'è un API per Node.js?\n\nSì!\n\n### `standard.lintText(text, [opts], callback)`\n\nEsegue il lint sul parametro passato come input `text`. Il parametro `opts` è un oggetto con le seguenti opzioni:\n\n```js\n{\n  cwd: '',      // l'attuale cartella del tuo progetto (default: process.cwd())\n  filename: '', // percorso del file al quale verrà eseguito il lint (opzionale, visto che alcuni plugin ne hanno bisogno)\n  fix: false,   // corregge gli errori automaticamente\n  globals: [],  // particolari variabili globali da dichiarare\n  plugins: [],  // particolari plugin eslint\n  envs: [],     // particolari eslint environments\n  parser: ''    // particolari parser JavaScript (es. babel-eslint)\n}\n```\n\nUlteriori opzioni possono essere caricate usando `package.json` se si trova all'interno della cartella del tuo progetto.\n\nIl parametro `callback` sarà chiamato con un `Error` ed un oggetto `results`.\n\nL'oggetto `results` conterrà se seguenti proprietà:\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0,\n      output: '' // codice sorgente fissato (accessibile solo con opzione {fix: true})\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `results = standard.lintTextSync(text, [opts])`\n\nVersione sincrona di `standard.lintText()`. Se si verifica un errore, viene lanciata un'eccezione. Altrimenti viene ritornato l'oggetto `results`.\n\n### `standard.lintFiles(files, [opts], callback)`\n\nEsegue il lint sui `files` glob. È possibile passare un oggetto `opts`:\n\n```js\nvar opts = {\n  ignore: [],   // file globs da ignorare (ha alcuni defaults)\n  cwd: '',      // l'attuale cartella del tuo progetto (default: process.cwd())\n  fix: false,   // corregge gli errori automaticamente\n  globals: [],  // particolari variabili globali da dichiarare\n  plugins: [],  // particolari plugin eslint\n  envs: [],     // particolari eslint environments\n  parser: ''    // particolari parser JavaScript (es. babel-eslint)\n}\n```\n\nIl parametro `callback` sarà chiamato con un `Error` ed un oggetto `results`. (lo stesso di prima).\n\n\n## Come posso contribuire a `standard`?\n\nI collaboratori sono i benvenuti! Controlla le [issue](https://github.com/standard/standard/issues) o le [PR](https://github.com/standard/standard/pulls) e crea la tua di PR se vuoi qualcosa che non vedi.\n\nVuoi chattare? Unisciti ai collaboratori su IRC nel canale `#standard` su freenode.\n\nEccoti importanti module che sono importanti nell'ecosistema di `standard`:\n\n- **[standard](https://github.com/standard/standard)** - questo repository\n  - **[standard-engine](https://github.com/flet/standard-engine)** - motore cli per regole eslint arbitrarie\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - regole eslint per standard\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - regole eslint per standard (JSX)\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - regole eslint personalizzate per standard (non fanno parte del cuore di eslint)\n  - **[eslint](https://github.com/eslint/eslint)** - il linter che da energie a standard\n- **[snazzy](https://github.com/standard/snazzy)** - generate output carino nel terminale per standard\n- **[standard-www](https://github.com/standard/standard-www)** - codice per https://standardjs.com\n- **[semistandard](https://github.com/Flet/semistandard)** - standard, ma con i punti e virgola (se proprio sei obbligato)\n\nCi sono anche molti **[plugin per l'editor di testo](#ci-sono-dei-plugin-per-gli-editor-di-testo)**, una lista di **[npm packages che usano `standard`](https://github.com/standard/standard-packages)**,\nuna incredibile lista di\n**[packages nell'ecosistema di `standard`](https://github.com/standard/awesome-standard)**.\n\n## Licenza\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-kokr.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard - JavaScript Style Guide\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"travis\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/eslint-config-standard\"><img src=\"https://img.shields.io/npm/dm/eslint-config-standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n</p>\n\n<h4 align=\"center\">One JavaScript Style to Rule Them All</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n## 교정 & 자동 코드 수정을 도와주는 JavaScript 스타일 가이드\n\n이 모듈은 다음과 같은 세 가지 방법으로 시간을 절약할 수 있습니다.\n\n- **환경설정이 필요없습니다.** 프로젝트에서 일관된 스타일을 적용하는 가장 쉬운 방법입니다. 그냥 넣기만 하면 됩니다.\n- **자동으로 코드 포멧을 맞춰줍니다.** `standard --fix`를 실행하면 지저분하거나 일관성없는 코드와 작별인사 할 수 있습니다.\n- **스타일 이슈 및 프로그래머의 오류를 조기에 파악할 수 있습니다.** 리뷰어와 기여자 사이의 관계를 제거함으로써 귀중한 코드 리뷰 시간을 절약할 수 있습니다.\n\n만드는 것의 대해 결정할 필요가 없습니다. `.eslintrc`, `.jshintrc`, `.jscsrc` 파일들을 관리할 필요가 없이 바로 가능합니다.\n\n\n설치하는 방법입니다.\n\n```\nnpm install standard --save-dev\n```\n\n## 규칙\n\n- **2칸 공백을 사용합니다.** – 들여쓰기\n- **문자열에 작은 따옴표를 사용합니다.** – 누락된 곳은 제외합니다.\n- **사용되지 않는 변수가 없어야 합니다.** – 이 것은 대량의 버그를 초래하는 원인입니다.\n- **세미콜론이 없어야 합니다.** – [It's][1] [fine.][2] [Really!][3]\n- **`(`, `[`, or `` ` ``과 같이 라인을 시작하지 말아야 합니다.**\n  - 세미콜론 생략시 반드시 문제가 생길 수 있습니다. – *자동으로 체크할 수 있도록 준비되어 있습니다.*\n  - [More details][4]\n- **키워드 뒤에 공백을 사용합니다.** `if (condition) { ... }`\n- **함수명 뒤에 공백을 사용합니다.** `function name (arg) { ... }`\n- 항상 `==` 대신 `===`을 사용합니다. - 단, `null || undefined`는 `obj == null`로 확인할 수 있습니다.\n- node.js에서 err 파라미터는 항상 처리해야 합니다.\n- 항상 브라우저 전역에 `window` 접두사를 붙입니다. - `document`와 `navigator`는 괜찮습니다.\n  - `open`, `length`, `event`, `name` 등 불분명하게 브라우저 전역을 우연히 사용하는 것을 방지합니다.\n- **[더 많은 장점][5]이 있습니다.** - *`standard`를 시도해보세요!*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\n더 나은 아이디어를 얻으려면 JavaScript Standard 스타일로 작성된 [샘플 파일](https://github.com/expressjs/body-parser/blob/master/index.js)을 살펴보십시오. 또는 `standard`을 사용하는 [수천 개의 프로젝트](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) 중 하나를 확인하십시오!\n\n## 목차\n\n- 빠른 시작\n  - [설치](#설치)\n  - [사용법](#사용법)\n  - [이해가 잘되면 다음을 수행합니다](#이해가-잘되면-다음을-수행합니다)\n- 질의응답\n  - [왜 JavaScript Standard Style을 사용해야 할까요?](#왜-JavaScript-Standard-Style을-사용해야-할까요)\n  - [누가 JavaScript Standard Style을 사용하나요?](#누가-JavaScript-Standard-Style을-사용하나요)\n  - [텍스트 편집 플러그인이 있나요?](#텍스트-편집-플러그인이-있나요)\n  - [readme에 넣을 수 있는 뱃지로고가 있나요?](#readme에-넣을-수-있는-뱃지로고가-있나요)\n  - [나와는 룰이 맞지 않습니다. 변경 가능합니까?](#나와는-룰이-맞지-않습니다.-변경-가능합니까)\n  - [그러나 이 것은 실제 웹표준이 아닙니다!](#그러나-이-것은-실제-웹표준이-아닙니다)\n  - [자동으로 포멧을 맞춰주는 것이 있나요?](#자동으로-포멧을-맞춰주는-것이-있나요)\n  - [어떻게하면 파일들을 무시할 수 있나요?](#어떻게하면-파일들을-무시할-수-있나요)\n  - [어떻게하면 경고를 숨길 수 있나요?](#어떻게하면-경고를-숨길-수-있나요)\n  - [전역 namespace를 오염시키는 라이브러리를 사용합니다. \"vaiable is not defined\" 오류를 방지하려면 어떻게 해야 하나요?](#전역-namespace를-오염시키는-라이브러리를-사용합니다-vaiable-is-not-defined-오류를-방지하려면-어떻게-해야-하나요)\n  - [실험용 JavaScript (ES Next) 기능은 어떻게 사용하나요?](#실험용-javascript-es-next-기능은-어떻게-사용하나요)\n  - [Flow와 같은 JavaScrpt 언어 변형을 사용할 수 있나요?](#flow와-같은-javascrpt-언어-변형을-사용할-수-있나요)\n  - [Mocha, Jasmine, QUnit 등은 어떻습니까?](#mocha-jasmine-qunit-등은-어떻습니까)\n  - [Web Workes는 어떻습니까?](#web-workes는-어떻습니까)\n  - [Markdown 또는 HTML 파일 내부의 코드를 확인할 수 있나요?](#markdown-또는-html-파일-내부의-코드를-확인할-수-있나요)\n  - [Git `pre-commit` hook이 있나요?](#git-pre-commit-hook이-있나요)\n  - [출력을 모두 화려하고 예쁘게 만드려면 어떻게 해야 하나요?](#출력을-모두-화려하고-예쁘게-만드려면-어떻게-해야-하나요)\n  - [Node.js API가 있나요?](#nodejs-api가-있나요)\n  - [`standard` 기여는 어떻게 하나요?](#standard-기여는-어떻게-하나요)\n- [라이선스](#라이선스)\n\n## 설치\n\nJavaScript Standard Style을 사용하는 가장 쉬운 방법은 Node 명령 프로그램을 통해 전역으로 설치하는 것입니다. 터미널에서 다음 명령을 실행하세요.\n\n```bash\n$ npm install standard --global\n```\n\n또는 `standard`를 로컬에 설치하여 단일 프로젝트에서 사용할 수 있습니다.\n\n```bash\n$ npm install standard --save-dev\n```\n\n*메모: 위 명령을 실행하려면 [Node.js](http://nodejs.org)와 [npm](https://npmjs.com)이 설치되어 있어야 합니다.*\n\n## 사용법\n\n`standard`를 설치 한 후에 `standard` 프로그램을 사용할 수 있습니다. 가장 간단한 사용 사례는 현재 작업 디렉토리에있는 모든 JavaScript 파일의 스타일을 확인하는 것입니다.\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nYou can optionally pass in a directory (or directories) using the glob pattern. Be\nsure to quote paths containing glob patterns so that they are expanded by\n`standard` instead of your shell:\nglob 패턴을 사용하여 디렉토리(또는 디렉토리들)를 선택적으로 전달할 수 있습니다. glob 패턴을 포함하는 경로를 인용 부호로 묶어 쉘 대신에 `standard`에 의해 확장되도록 할 수 있습니다.\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**메모** 기본적으로`standard`는 `**/*.js`, `**/*.jsx` 패턴과 일치하는 모든 파일을 찾을 것입니다.\n\n## 이해가 잘되면 다음을 수행합니다\n\n1. `package.json`에 다음코드를 추가합니다.\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. `npm test`를 실행할 때 자동으로 스타일을 검사합니다.\n\n  ```bash\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. style 의견의 대해 절대로 풀 리퀘스트를 요청하지 마세요.\n\n## 왜 JavaScript Standard Style을 사용해야 할까요?\n\nJavaScript Standard Style의 장점은 간단하다는 것입니다. 어느누구도 작업하는 모든 모듈/프로젝트에 대해 수백 줄 style의 구성 파일을 유지하려고하지 않습니다. 더 이상 바보같은 짓은 그만하세요.\n\n이 모듈은 세가지의 방법으로 당신(또는 주변사람들)의 시간을 절약할 수 있습니다.\n\n- **환경설정이 필요없습니다.** 프로젝트에서 일관된 스타일을 적용하는 가장 쉬운 방법입니다. 그냥 넣기만 하면 됩니다.\n- **자동으로 코드 포멧을 맞춰줍니다.** `standard --fix`를 실행하면 지저분하거나 일관성없는 코드와 작별인사 할 수 있습니다.\n- **스타일 이슈 및 프로그래머의 오류를 조기에 파악할 수 있습니다.** 리뷰어와 기여자 사이의 관계를 제거함으로써 귀중한 코드 리뷰 시간을 절약할 수 있습니다.\n\n`standard` 스타일을 채택한다는 것은 개인적 스타일보다 코드 명확성과 커뮤니티 협업의 중요성을 우선으로 하는 것을 의미합니다. 이것은 프로젝트와 개발문화에 100% 타당하지 않을 수도 있지만, 오픈소스는 초보자들에게 적대적인 장소가 될 수 있습니다. 명확하고 자동화된 기여를 기대할수록 프로젝트가 더욱 건강해 집니다.\n\n## 누가 JavaScript Standard Style을 사용하나요?\n\n주변에 많은 사람들!\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/github.png>](https://github.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/taser.png>](https://www.taser.com) |\n|---|---|---|---|\n\n회사 이외에 많은 커뮤니티 회원은 여기에 나열하기에는 [너무 많은](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) 패키지들이 `standard`를 사용합니다.\n\n또한 GitHub의 [Clean Code Linter](https://github.com/showcases/clean-code-linters) 쇼케이스에서도 볼 수 있습니다.\n\n## 텍스트 편집 플러그인이 있나요?\n\n먼저, `standard`를 설치합니다. 그런 다음, 편집기에 적절한 플러그인을 설치하세요.\n\n### Sublime Text\n\n**[Package Control][sublime-1]** 을 사용하여, **[SublimeLinter][sublime-2]** 와 **[SublimeLinter-contrib-standard][sublime-3]** 를 설치합니다.\n\n저장시 자동포멧을 적용하려면 **[StandardFormat][sublime-4]** 을 설치하세요.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n### Atom\n\n**[linter-js-standard][atom-1]** 를 설치합니다.\n\n저장시 자동포멧을 적용하려면 **[standard-formatter][atom-2]** 를 설치합니다. 스니펫의 경우 **[standardjs-snippets][atom-3]** 을 설치합니다.\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n\n### Visual Studio Code\n\n**[vscode-standardjs][vscode-1]** 를 설치합니다. (자동포멧을 지원합니다.)\n\nJS 스니펫의 경우 **[vscode-standardjs-snippets][vscode-2]** 을 설치합니다. React 스니펫의 경우 **[vscode-react-standard][vscode-3]** 를 설치합니다.\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n### Vim\n\n**[ale][vim-1]** 를 설치합니다.\n\nFor automatic formatting on save, add these lines to `.vimrc`:\n\n저장시 자동포멧을 적용하려면 해당 코드를 `.vimrc`에 추가하세요.\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\n고려해야 할 대체 플러그인으로는 [neomake][vim-2] 및 [syntastic][vim-3]이 있으며, 둘 다 표준에 대한 지원이 내장되어 있습니다. (추가적으로 구성이 필요할 수도 있습니다)\n\n[vim-1]: https://github.com/w0rp/ale\n[vim-2]: https://github.com/neomake/neomake\n[vim-3]: https://github.com/vim-syntastic/syntastic\n\n### Emacs\n\n**[Flycheck][emacs-1]** 를 설치하고 **[manual][emacs-2]** 을 확인하여 프로젝트에서 활성화하는 방법을 확인하십시오.\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n### Brackets\n\nextension registry에서 **[\"Standard Code Style\"][brackets-1]** 을 검색하여 \"Install\"을 클릭하세요.\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n### WebStorm (PhpStorm, IntelliJ, RubyMine, JetBrains, etc.)\n\nWebStrom은 `standard`가 직접적으로 IDE에서 사용가능다고 [기본적인 지원에 관한 최근 발표](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/) 했습니다.\n\n만약 수동으로 `standard`를 구성하려면 [안내서]([webstorm-1])를 따르십시오. 이것은 PhpStorm, IntelliJ, RubyMine 등 모든 JetBrains 제품에 적용됩니다.\n\n[webstorm-1]: docs/webstorm.md\n\n## readme에 넣을 수 있는 뱃지로고가 있나요?\n\n네! 프로젝트에서 `standard`를 사용한다면, readme에 이 뱃지들 중 하나를 포함시켜 코드가 standard 스타일을 사용하고 있음을 사람들에게 알릴 수 있습니다.\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```md\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n```md\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n```\n\n## 나와는 룰이 맞지 않습니다. 변경 가능합니까?\n\n안됩니다. `standard`의 전체적인 요점은 코드 스타일에 대한 [bikeshedding][bikeshedding]을 피함으로써 시간을 절약하는 것입니다. 탭과 공백 등에 관해서는 온라인으로 많은 논쟁이 있기때문에 해결되지 않을 것입니다. 이러한 논쟁은 어떠한 것도 얻지 못하게합니다. 결국 `뭔가를 골라야 한다`입니다. 그것은 `standard`의 철학입니다. 이는 `단지 뭔가를 선택하세요`라는 의견입니다. 바라건대, 사용자들이 자신들의 의견을 방어하는 것에 대해 가치를 보게 되기를 바랍니다.\n\n수백 개의 ESLint 규칙을 개별적으로 구성하려는 경우 `eslint`를 직접 [eslint-config-standard](https://github.com/standard/eslint-config-standard)와 함께 사용하여 변경 사항을 맨 위에 배치 할 수 있습니다.\n\n팁 : 표준을 사용하고 계속 진행하십시오. 당신의 시간을 소비하고 있는 실질적인 문제를 해결하세요! :P\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## 그러나 이 것은 실제 웹표준이 아닙니다!\n\n물론 표준이 아닙니다! 여기에 제시된 스타일은 공식 웹 표준 그룹과 관련이 없으므로 `ECMA/standard`이 아닌 `feross/standard`라고하는 이유입니다.\n\n\"standard\"이라는 단어는 \"web standard\"이상의 의미를 가지고 있습니다 :-)\n\n예를 들어,\n- 이 모듈은 우리의 코드를 높은 수준의 품질로 유지하는 데 도움이됩니다.\n- 이 모듈은 새로운 기여자가 몇 가지 기본 스타일 표준을 준수하도록합니다.\n\n## 자동으로 포멧을 맞춰주는 것이 있나요?\n\n예! `standard --fix`를 사용하면 자동으로 대부분의 문제를 자동으로 해결할 수 있습니다.\n\n`standard --fix`는 최대의 편의를 위해 `standard`에 내장되어 있습니다. 대부분의 문제점은 고칠 수 있지만 일부 오류(오류 처리를 잊어 버리는 것)는 수동으로 해결해야합니다.\n\n시간을 절약하기 위해 `standard`는 자동으로 수정할 수있는 문제를 발견하면 \"`Run standard --fix to automatically fix some problems`\" 메시지를 출력합니다.\n\n## 어떻게하면 파일들을 무시할 수 있나요?\n\n특정 경로 (`node_modules/`, `coverage/`, `vendor/`, `*.min.js`, `bundle.js`, `.git/`와 같이 `.`으로 시작하는 파일/폴더)는 자동으로 무시됩니다.\n\n프로젝트의 루트 `.gitignore` 파일에 있는 경로도 자동으로 무시됩니다.\n\n때로는 추가 폴더 또는 특정 축소 파일을 무시해야합니다. 이를 수행하려면 `package.json`에 `standard.ignore` 속성을 추가하십시오.\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## 어떻게하면 경고를 숨길 수 있나요?\n\n드문 경우이지만 규칙을 위반하고 `standard`에 의해 생성 된 경고를 숨길 필요가 있습니다.\n\nJavaScript 표준 스타일은 [ESLint](http://eslint.org/)를 사용하며 ESLint를 직접 사용한 경우 일반적으로 경고를 숨길 수 있습니다.\n\n자세한 출력을 얻으려면 (무시할 특정 규칙 이름을 찾을 수 있도록) 다음을 실행하십시오.\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\n특정 줄에서 **모든 규칙** 을 비활성화할 수 있습니다.\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line\n```\n\n혹은, 특정 줄에서 **`\"no-use-before-define\"` 규칙만** 비활성화 할 수 있습니다.\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line no-use-before-define\n```\n\n`\"no-use-before-define\"` 규칙을 여러 줄에 적용할 수 있습니다.\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## 전역 namespace를 오염시키는 라이브러리를 사용합니다. \"vaiable is not defined\" 오류를 방지하려면 어떻게 해야 하나요?\n\n일부 패키지 (예 : `mocha`)는 전역 개체 (가난한 형태!)에 기능 (예 : `describe`, `it`)을 지정합니다. 이 함수는 정의되지 않았거나 코드의 어느 곳에서든지 요구 될 수 있기 때문에 `standard`에서는 정의되지 않은 변수를 사용하고 있다고 경고합니다 (일반적으로 이 규칙은 오타를 잡는 데 유용합니다). 그러나 우리는 이 전역 변수들에 대해 이를 비활성화 하고자합니다.\n\n`standard` (코드를 읽는 사람뿐만 아니라)에서 특정 변수가 코드에서 전역이라는 것을 알 수 있도록 파일의 맨 위에 추가하십시오.\n\n```js\n/* global myVar1, myVar2 */\n```\n\n수백 개의 파일이 있다면 모든 파일에 주석을 추가하지 않는 것이 좋습니다. 이 경우 다음을 실행하십시오.\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\n혹은 `package.json`에 다음코드를 추가하세요.\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n*노트: `global`과 `globals`는 같습니다.\n\n## 실험용 JavaScript (ES Next) 기능은 어떻게 사용하나요?\n\n`standard`는 제안 프로세스의 \"단계 4\"에있는 언어 기능 제안을 포함하여 최신 ECMAScript 기능인 ES8 (ES2017)을 지원합니다.\n\n실험용 언어 기능을 지원하기 위해 `standard`는 맞춤 JavaScript 파서를 지정하는 것을 지원합니다. 커스텀 파서를 사용하기 전에 추가 된 복잡성이 그럴 가치가 있는지 고려하십시오.\n\n```bash\n$ standard --parser babel-eslint\n```\n\n혹은, `package.json`에 아래코드를 추가하세요.\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\n`standard'가 전역으로 설치되면 (즉,`npm install standard --global`), `babel-eslint`를 `npm install babel-eslint --global`과 함께 설치하십시오.\n\n## Flow와 같은 JavaScrpt 언어 변형을 사용할 수 있나요?\n\n커스텀 JS 언어 변형을 사용하기 전에 추가된 복잡성 (그리고 새로운 기여자를 최신으로 만드는데 필요한 노력)이 그만한 가치가 있는지 고려하십시오.\n\n`standard`는 ESLint 플러그인을 지원합니다. `standard` 중 하나를 보기 전에 코드를 유효한 JavaScript로 변환하려면 이 중 하나를 사용하십시오. 맞춤 구문 분석기를 사용하려면 npm에서 설치하고 다음을 실행하십시오.\n\n```bash\n$ standard --plugin 플러그인_이름\n```\n\n아니면, `package.json`에 아래 코드를 추가하세요.\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"플러그인_이름\" ]\n  }\n}\n```\n\nFlow를 사용하려면 `babel-eslint`를 파서로 사용해야합니다. 따라서 `npm install eslint-plugin-flowtype babel-eslint`를 수행한 후에, 다음을 실행하십시오.\n\n```bash\n$ standard --plugin flowtype --parser babel-eslint\n```\n\n아니면, `package.json`에 아래 코드를 추가하세요.\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"flowtype\" ],\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\n`standard`가 전역으로 설치된 경우 (즉, `npm install standard --global`) `npm install-eslint-plugin-flowtype --global`을 사용하여 `eslint-plugin-flowtype`을 전역으로 설치해야합니다.\n\n**참고 : 플러그인 및 플러그인은 동일합니다.**\n\n## Mocha, Jasmine, QUnit 등은 어떻습니까?\n\n테스트 파일에서 mocha를 지원하려면 테스트 파일의 시작 부분에 다음을 추가하십시오.\n\n```js\n/* eslint-env mocha */\n```\n\n혹은 다음을 실행하세요.\n\n```bash\n$ standard --env mocha\n```\n\n`mocha`는 `jasmine`, `qunit`, `phantomjs` 중 하나가 될 수 있습니다. 전체 목록을 보려면 ESLint의 [specifying environments(스펙문서)](http://eslint.org/docs/user-guide/configuring.html#specifying-environments)를 확인하십시오. 이러한 환경에서 사용할 수있는 전역의 목록을 보려면 [globals](https://github.com/sindresorhus/globals/blob/master/globals.json) npm 모듈을 확인하십시오.\n\n**참고 : `env` 및 `envs`는 동일합니다.**\n\n## Web Workes는 어떻습니까?\n\n적용하려는 파일 상단에 아래 주석코드를 추가하세요.\n\n```js\n/* eslint-env serviceworker */\n```\n\n이것은 `standard` (자신의 코드를 읽는 사람뿐만 아니라)이 web worker 코드에서 `자신`이 전역(global)이라는 것을 알 수 있게 해줍니다.\n\n## Markdown 또는 HTML 파일 내부의 코드를 확인할 수 있나요?\n\nMarkdown 파일 내의 코드를 확인하려면 [`standard-markdown`](https://www.npmjs.com/package/standard-markdown)을 사용하십시오.\n\n또는 Markdown, HTML 및 기타 여러 유형의 언어 파일에서 코드를 확인할 수있는 ESLint 플러그인이 있습니다.\n\nMarkdown 파일 내의 코드를 확인하려면 ESLint 플러그인을 사용하십시오.\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\n그런 다음, 코드 블록 안에있는 JS를 확인하려면 다음을 실행하십시오.\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\nHTML 파일 내부의 코드를 확인하려면 ESLint 플러그인을 사용하십시오.\n\n```bash\n$ npm install eslint-plugin-html\n```\n\n그런 다음, `<script>`태그 안에있는 JS를 확인하려면 다음을 실행하십시오.\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## Git `pre-commit` hook이 있나요?\n\n재미있는 질문이네요!\n\n```sh\n#!/bin/sh\n# 커밋을 위해 준비된 모든 자바 스크립트 파일이 표준 코드 스타일을 통과하는지 확인합니다.\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n## 출력을 모두 화려하고 *예쁘게* 만드려면 어떻게 해야 하나요?\n\n내장 된 출력물은 간단하고 간단하지만 반짝이는 물건을 원한다면 [snazzy](https://www.npmjs.com/package/snazzy) 설치하십시오.\n\n```bash\n$ npm install snazzy\n```\n\n그리고 아래 명령어를 실행합니다.\n\n```bash\n$ standard --verbose | snazzy\n```\n\n[standard-tap](https://www.npmjs.com/package/standard-tap),\n[standard-json](https://www.npmjs.com/package/standard-json),\n[standard-reporter](https://www.npmjs.com/package/standard-reporter),\n[standard-summary](https://www.npmjs.com/package/standard-summary)도 있습니다..\n\n## Node.js API가 있나요?\n\n네!\n\n### `standard.lintText(text, [opts], callback)`\n\n린트에 제공할 소스 `text`를 준비합니다. `opts` 객체를 추가할 수 있습니다.\n\n```js\n{\n  cwd: '',      // 현재 작업 디렉토리 (기본: process.cwd())\n  filename: '', // 린트 텍스트를 포함하는 파일의 경로 (선택, 일부 eslint 플러그인이 필요함)\n  fix: false,   // 자동 문제 해결\n  globals: [],  // 선언할 커스텀 글로벌 변수\n  plugins: [],  // 커스텀 eslint 플러그인\n  envs: [],     // 커스텀 eslint 환경\n  parser: ''    // 커스텀 js 파서  (예: babel-eslint)\n}\n```\n\n`package.json`가 현재 작업 디렉토리에서 발견되면 추가옵션을 로드 할 수 있습니다.\n\n`콜백(callback)`은 `Error`와 `results`객체와 함께 호출 될 것입니다.\n\n`results`객체는 다음과 같은 속성을 포함합니다.\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0,\n      output: '' // 고정 소스 코드 ({fix : true} 옵션과 함께 제공)\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `results = standard.lintTextSync(text, [opts])`\n\n`standard.lintText()`의 동기화 버전. 오류가 발생하면 예외가 발생합니다. 그렇지 않으면 `results`객체가 반환됩니다.\n\n### `standard.lintFiles(files, [opts], callback)`\n\n제공된 'files' 덩어리를 린트에 적용할 수 있습니다. `opts` 객체를 추가할 수 있습니다.\n\n```js\nvar opts = {\n  ignore: [],   // 파일뭉치를 무시합니다. (기본적인 무시파일들이 포함되어 있습니다)\n  cwd: '',      // 현재 작업 디렉토리 (기본: process.cwd())\n  fix: false,   // 자동 문제 해결\n  globals: [],  // 선언할 글로벌 변수\n  plugins: [],  // eslint 플러그인\n  envs: [],     // eslint 환경\n  parser: ''    // js 파서 (예: babel-eslint)\n}\n```\n\n`callback`은 `Error`와 `results`객체로 호출됩니다. (위와 같습니다)\n\n## `standard` 기여는 어떻게 하나요?\n\n기여를 환영합니다! [issues](https://github.com/standard/standard/issues) 나 [PRs](https://github.com/standard/standard/pulls)를 확인하고 거기에 보이지 않는 것을 원한다면 직접 만들어주세요.\n\n채팅을 원하시나요? freenode의 `#standard` 채널에서 IRC의 참여자와 함께하세요.\n\n다음은 `standard` 생태계의 중요한 패키지입니다.\n\n- **[standard](https://github.com/standard/standard)** - 현재 저장소\n  - **[standard-engine](https://github.com/flet/standard-engine)** - 임의의 eslint 규칙에 대한 cli 엔진\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - `standard`을 위한 eslint 규칙\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - `standard`을 위한 eslint 규칙 (JSX)\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - `standard`을 위한 커스텀 eslint 규칙 (eslint 코어의 일부가 아닙니다.)\n  - **[eslint](https://github.com/eslint/eslint)** - 강력한 standard linter\n- **[snazzy](https://github.com/standard/snazzy)** - standard를 예쁘게 터미널에 출력해줍니다.\n- **[standard-www](https://github.com/standard/standard-www)** - https://standardjs.com에 대한 코드\n- **[semistandard](https://github.com/Flet/semistandard)** - 세미콜론이 포함된 standard (필요한 경우)\n\n또한 많은 **[에디터 플러그인](#text-editor-plugins)**, **[`standard`를 사용하는 npm 패키지 목록](https://github.com/standard/standard-packages)**, **[`standard` 에코 시스템의 멋진 패키지 목록](https://github.com/standard/awesome-standard)** 이 있습니다.\n\n## 라이선스\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-ptbr.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard - JavaScript Style Guide\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"Travis\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/dm/standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n</p>\n\n<h4 align=\"center\">Um Guia de Estilo JavaScript para a todos governar</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\nSem ter que tomar decisões; Sem gerenciar `.eslintrc`, `.jshintrc`, ou `.jscsrc` . Funciona logo de cara.\n\nEsse módulo salva o seu tempo (e de outras pessoas!) de duas formas:\n\n- **Zero configuração.** A forma mais fácil de forçar consistência de estilo no seu projeto. É só tacar lá e pronto.\n- **Captura erros de estilo antes de serem enviados em PR's.** Salva um tempo precioso de code review eliminando vai-e-vem entre mantenedor  e contribuínte.\n\nInstale:\n\n```\nnpm install standard\n```\n\n### As Regras\n\n- **2 espaços** – para identação\n- **Aspas simples para strings** – exceto para evitar escapamentos\n- **Sem variáveis não-utilizadas** – resolve *uma porrada* de bugs!\n- **Sem vírgulas-e-vírgula** – [Dá][1] [boa.][2] [Sério!][3]\n- **Nunca comece uma linha com  `(`, `[`, ou `` ` ``**\n  - Esse é o único **problema** em omitir ponto-e-vírgula – *checado automaticamente pra você!*\n  - [Mais detalhes][4]\n- **Espaço após keywords** `if (condição) { ... }`\n- **Espaço antes dos nomes das funções** `function nome (arg) { ... }`\n- Sempre use `===` ao invés de  `==` – mas `obj == null` é permitido para checar se `null || undefined`.\n- Sempre lide com o parâmetro `err` do node.\n- Sempre prefixe globais de browser com  `window` – exceto `document` e `navigator`, essas tudo bem.\n  - Previne o uso acidental de globais de browser mal-nomeadas como  `open`, `length`,\n    `event`, e `name`.\n- **E [mais benefícios][5]** – *dê uma chance para  `standard` hoje!*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\nPara ter uma idéia melhor, dê uma olhada\n[num arquivo amostra](https://github.com/webtorrent/bittorrent-dht/blob/master/client.js) escrito no JavaScript Standard Style, ou dê uma olhada em alguns dos\n[repositórios](https://github.com/standard/standard-packages/blob/master/all.json) que usam\n`standard`.\n\n## Índice\n\n- [Instalação](#instala%C3%A7%C3%A3o)\n- [Uso](#uso)\n  - [O que você pode fazer se for espertinho](#o-que-voc%C3%AA-pode-fazer-se-for-espertinho)\n  - [Insígnia](#ins%C3%ADgnia)\n  - [Plugins de Editores de Texto](#plugins-de-editores-de-texto)\n- [FAQ](#faq)\n  - [Por que eu deveria usar o JavaScript Standard Style?](#por-que-eu-deveria-usar-o-javascript-standard-style)\n  - [Discordo da regra X, você pode mudá-la?](#discordo-da-regra-x-voc%C3%AA-pode-mud%C3%A1-la)\n  - [Mas isso não é um padrão legítimo!](#mas-isso-n%C3%A3o-%C3%A9-um-padr%C3%A3o-leg%C3%ADtimo)\n  - [Existe um formatador automático?](#existe-um-formatador-autom%C3%A1tico)\n  - [Como ignoro arquivos?](#como-ignoro-arquivos)\n  - [Como escondo um determinado aviso?](#como-escondo-um-determinado-aviso)\n  - [Eu uso uma biblioteca que polui o namespace global. Como eu previno erros de \"variable is not defined\"?](#eu-uso-uma-biblioteca-que-polui-o-namespace-global-como-eu-previno-erros-de-variable-is-not-definedfunctions)\n  - [Posso usar um custom parser de JS novinho em folha que saiu ontem para suporte ao ES Next?](#posso-usar-um-custom-parser-de-js-novinho-em-folha-que-saiu-ontem-para-suporte-ao-es-next)\n  - [Posso usar uma linguagem variante de JavaScript, tipo Flow?](#posso-usar-uma-linguagem-variante-de-javascript-tipo-flow)\n  - [Você pode tornar regra X configurável?](#voc%C3%AA-pode-tornar-regra-x-configur%C3%A1vel)\n  - [E os Web Workers?](#e-os-web-workers)\n  - [E a respeito de Mocha, Jasmine, QUnit, etc?](#e-a-respeito-de-mocha-jasmine-qunit-etc)\n  - [Existe um hook `pre-commit` para Git?](#existe-um-hook-pre-commit-para-git)\n  - [Como eu deixo o output todo coloridinho e *bonitinho*?](#como-eu-deixo-o-output-todo-coloridinho-e-bonitinho)\n  - [Quero contribuir com o `standard`. Quais packages eu devo conhecer?](#quero-contribuir-com-o-standard-quais-packages-eu-devo-conhecer)\n- [Node.js API](#nodejs-api)\n  - [`standard.lintText(text, [opts], callback)`](#standardlinttexttext-opts-callback)\n  - [`standard.lintFiles(files, [opts], callback)`](#standardlintfilesfiles-opts-callback)\n- [Licensa](#licensa)\n\n## Instalação\n\nA forma mais fácil de usar o JavaScript Standard Style para checar seu código é instalá-lo globalmente como se fosse um programa de linha de comando do Node. Para isso, simplesmente execute o seguinte comando no seu terminal (a flag `-g` instala o `standard` globalmente no seu sistema, omita-a se quiser instalar no seu diretório de trabalho atual.)\n\n\n```bash\nnpm install standard --global\n```\n\nOu você pode rodar este comando para instalar `standard`  localmente, para usar no seu módulo:\n\n```bash\nnpm install standard --save-dev\n```\n\n[Node.js](http://nodejs.org) e [npm](https://npmjs.com) são requisitos para rodar este programa.\n\n## Uso\n\nDepois de você ter instalado  `standard`, você será capaz de usá-lo. O caso de uso mais simples seria checar o estilo de todos os arquivos JavaScript no diretório de trabalho atual:\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\nVocê pode passar opcionalmente um diretório (ou diretórios) usando o padrões glob. Assegure-se de colocar aspas nos caminhos contendo padrões glob para que eles sejam expandidos pelo `standard` ao invés da sua shell.\n\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**Note:** por padrão `standard` vai procurar por todos os arquivos que casarem com os padrões::\n`**/*.js`, `**/*.jsx`.\n\n### O que você pode fazer se for espertinho\n\n1. Adicione isso ao `package.json`\n\n  ```json\n  {\n    \"name\": \"meu-package-legalzao\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. Cheque os estilos manualmente quando rodar `npm test`\n\n  ```\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. Nunca dê feedback de estilo num pull request de novo!\n\n\n\n### Insígnia\n\nEstá usando em um dos seus projetos? Inclua uma dessas insígnias no seu readme para que as pessoas saibam que seu código está em standard style.\n\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```markdown\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/)\n\n```markdown\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/)\n```\n\n### Plugins de Editores de Texto\n\nPrimeiro, instale `standard`. Então, instale  o plugin apropriado para o seu editor.\n\n#### [Sublime Text](https://www.sublimetext.com/)\n\nUsando **[Package Control][sublime-1]**, instale **[SublimeLinter][sublime-2]** e\n**[SublimeLinter-contrib-standard][sublime-3]**.\n\nPara formatação automática ao salvar, instale **[StandardFormat][sublime-4]**.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n#### [Atom](https://atom.io)\n\nInstale **[linter-js-standard][atom-1]**.\n\nPara formatação automática, instale **[standard-formatter][atom-2]**. Para snippets,\ninstalle **[standardjs-snippets][atom-3]**.\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n\n#### [Vim](http://www.vim.org/)\n\nInstale **[Syntastic][vim-1]** e adicione essa linha ao seu `.vimrc`:\n\n```vim\nlet g:syntastic_javascript_checkers = ['standard']\n```\n\nPara formatação automática ao salvar, instale [standard-format](https://github.com/maxogden/standard-format)\n\n```bash\nnpm install -g standard-format\n```\n\ne adicione essas duas linhas ao seu `.vimrc`:\n\n```vim\nautocmd bufwritepost *.js silent !standard-format -w %\nset autoread\n```\n\n[vim-1]: https://github.com/scrooloose/syntastic\n\n#### [Emacs](https://www.gnu.org/software/emacs/)\n\nInstale **[Flycheck][emacs-1]** e cheque o  **[manual][emacs-2]** para aprender a habilitar nos seus projetos.\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n#### [Brackets](http://brackets.io/)\n\nSelecione o registro da extensão do **[\"Standard Code Style\"][brackets-1]**.\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n#### [Visual Studio Code](https://code.visualstudio.com/)\n\nInstale **[vscode-standardjs][vscode-1]**. (Inclui suporte para formatação automática.)\n\nPara snippets de React, instale  **[vscode-react-standard][vscode-2]**.\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n#### [WebStorm/PhpStorm][webstorm-1]\n\nAmbos PhpStorm e WebStorm podem ser  [configurados para Standard Style][webstorm-2].\n\n[webstorm-1]: https://www.jetbrains.com/webstorm/\n[webstorm-2]: https://github.com/standard/standard/blob/master/docs/webstorm.md\n\n## FAQ\n\n### Por que eu deveria usar o JavaScript Standard Style?\n\nA beleza do JavaScript Standard Style reside no fato de ser simples. Ninguém quer manter vários arquivos de centenas de linhas de configuração de estilo para cada módulo/projeto em que trabalham. Chega dessa patifaria!\n\nEsse módulo te faz economizar tempo de 2 formas:\n\n- **Zero configuração.** A forma mais fácil de forçar consistência de estilo no seu projeto. É só tacar lá e pronto.\n- **Captura erros de estilo antes de serem enviados em PR's.** Salva um tempo precioso de code review eliminando vai-e-vem entre mantenedor  e contribuínte.\n\nAdotar o  estilo `standard` significa elevar a importância da clareza de código e convenções de comunidade a um patamar acima do estilo pessoal. Pode não fazer sentido para TODOS os projetos e culturas de desenvolvimento, porém, o opens ource pode ser um lugar hostil para novatos. Deixar as expectativas do contribuínte claras e automatizadas deixa o projeto mais saudável.\n\n### Discordo da regra X, você pode mudá-la?\n\nNão. O ponto principal do `standard` é evitar [bikeshedding][bikeshedding] sobre estilos. Há vários debates online sobre tabs vs. espaços, etc., que nunca vão terminar. Esses debates apenas tiram as pessoas do foco, que deveria ser terminar seus projetos. No fim das contas você só tem que 'escolher um', e essa é a filosofia do `standard` - um monte de opiniões 'escolha um' juntadas com todo o cuidado. Espero que os usuários percebam o valor nisso ao invés de defender suas próprias opiniões.\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n### Mas isso não é um padrão legítimo!\n\nClaro que não! O estilo aqui disposto não é afiliado com nenhum grupo de padrões web oficiais, e é por isso que esse repo se chama `feross/standard` e não `ECMA/standard`.\n\nA palavra  \"standard\" tem muito mais significado do que só \"web standard\" :-) Por exemplo:\n\n- Esse módulo ajuda a manter seu código num alto *padrão de qualidade*.\n- Esse módulo assegura que novos contribuíntes sigam alguns  *padrões de estilo* básicos.\n\n### Existe um formatador automático?\n\nSim! Você pode usar  `standard --fix` para consertar a maioria dos problemas automaticamente.\n\n`standard --fix` vem junto do `standard` (since v8.0.0) para conveniência máxima. Há muitos problemas corrigíveis, mas alguns erros, tipo não tratar erros nos callbacks do node, devem ser corrigidos manualmente.\n\nPara economizar seu tempo, `standard` solta uma mensagem (\"Run `standard --fix` to automatically fix some\nproblems.\") quando detecta problemas que podem ser corrigidos manualmente.\n\nAlternativamente, se seu código é feito apenas de ES5, você pode tentar usar\n[`standard-format`][standard-format] (um pacote separado), mas provavlemente não vai ser mantido pois  `standard --fix` funciona muito bem, e isso faz com que não precisemos manter duas ferramentas com regras de configuração separadas.\n\n[standard-format]: https://github.com/maxogden/standard-format\n\n### Como ignoro arquivos?\n\nOs caminhos `node_modules/**`, `*.min.js`, `bundle.js`, `coverage/**`, pastas/arquivos escondidos (começando com `.`), e todos os arquivos nos padrões no\n`.gitignore` da raiz do projeto são automaticamente ignorados.\n\nÀs vezes você precisa ignorar algumas pastas adicionais ou arquivos minificados específicos. Para fazer isso, adicione uma propriedade `standard.ignore` no `package.json`:\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n### Como escondo um determinado aviso?\n\nEm casos raros, você vai precisar quebrar uma regra e esconder um warning gerado pelo `standard`.\n\n\nJavaScript Standard Style usa o [`eslint`](http://eslint.org/) por baixo dos panos, sendo assim, você pode esconder algum aviso da mesma forma que você faria se utilizasse `eslint` diretamente.\n\nPara receber output verboso (para que você descubra que regra em particular precisa ignorar), execute:\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\nDesabilite **todas as regras** oem uma linha específica:\n\n```js\nfile = 'Eu sei bem o que tô fazendo' // eslint-disable-line\n```\n\nOu, desabilite  **apenas** na regra `\"no-use-before-define\"`:\n\n```js\nfile = 'Eu sei bem o que tô fazendo' // eslint-disable-line no-use-before-define\n```\n\nOu, desabilite a regra  `\"no-use-before-define\"` em  **várias linhas**:\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('código fora do padrão...')\nconsole.log('código fora do padrão...')\nconsole.log('código fora do padrão...')\n/* eslint-enable no-use-before-define */\n```\n\n### Eu uso uma biblioteca que polui o namespace global. Como eu previno erros de \"variable is not defined\"?\n\nAlguns packages (tipo o `mocha`) colocam suas funções (tipo `describe`, `it`) no objeto global (que ruim!). Devido ao fato dessas funções não serem definidas ou chamadas via  `require` em lugar algum do seu código, `standard` vai te avisar que você tá usando uma variável que não está definida (geralmente essa regra é bastante útil para pegar typos!). Mas queremos desabilitar essa função para variáveis globais.\n\nPara fazer com que o  `standard` (e outros humanos que lerão seu código) saibam que algumas variáveis são globais no seu código, adicione isso ao topo do seu arquivo:\n\n```\n/* global myVar1, myVar2 */\n```\n\nSe você possui centenas de arquivps, adicionar comentários em cada um pode ficar um saco; Nesses casos, você pode adicionar isso ao `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n### Posso usar um custom parser de JS novinho em folha que saiu ontem para suporte ao ES Next?\n\nAntes de usar um custom parser, considere se a complexidade a mais no seu código faz com que o processo valha a pena.\n\n`standard` suporta custom JS parsers. Para usar um custom parser, instale via npm\n(por exemplo: `npm install babel-eslint`) e adicione isso ao seu `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\nSe você está usando  `standard` de forma global (instalou com `-g`), você vai precisar instalar  `babel-eslint` globalmente como `npm install babel-eslint -g`.\n\n### Posso usar uma linguagem variante de JavaScript, tipo Flow?\n\nAntes de usar uma variante de JS customizada, considere se a complexidade a mais no seu processo de construção (e os esforços necessários para conseguir contribuíntes numa velocidade boa) valem a pena.\n\n`standard` suporta plugins de ESLint. Use um desses para transformar seu código em JavaScript válido antes que  `standard` o veja. Para usar um custom parser, instale via npm (exemplo: `npm install eslint-plugin-flowtype`) e adicione isso ao seu `package.json`:\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\",\n    \"plugins\": [\n      \"flowtype\"\n    ]\n  }\n}\n```\n\nSe você está usando `standard` globalmente (instalou com `-g`), você também terá que instalar  `eslint-plugin-flowtype` globalmente com\n`npm install eslint-plugin-flowtype -g`.\n\n### Você pode tornar regra X configurável?\n\nNão. O objetivo do  `standard` é economizar seu tempo escolhendo regras razoáveis para que você gaste seu tempo resolvendo problemas de verdade. Se você realmente quer configurar centenas de regras ESLint individualmente, você sempre pode usar `eslint` diretamente.\n\nSe você apenas quer trocar algumas regras, considere usar\n[essa configuração compartilhável](https://github.com/standard/eslint-config-standard) e jogue suas mudanças em cima.\n\nDica: Use `standard` e pronto. Há problemas reais que você poderia usar seu tempo resolvendo! :P\n\n### E os Web Workers?\n\nAdicione isso no topo do seu arquivo:\n\n```js\n/* eslint-env serviceworker */\n```\n\nIsso permite que `standard` (e outras pessoas que lerão seu código) saibam que `self` é uma global num código de web worker.\n\n### E a respeito de Mocha, Jasmine, QUnit, etc?\n\nPara ter suporte a mocha nos seus arquivos de teste, adicione isso no começo do seus arquivos de teste:\n\n```js\n/* eslint-env mocha */\n```\n\nOnde  `mocha` pode ser  `jasmine`, `qunit`, `phantomjs`, e por aí vai. Para ver a lista completa, cheque a documentação para\n[especificar ambientes](http://eslint.org/docs/user-guide/configuring.html#specifying-environments) do ESLint.\nPara uma lista de quais variávies globais estão disponíveis nesses ambientes, cheque o módulo npm [globals](https://github.com/sindresorhus/globals/blob/master/globals.json) .\n\n### Existe um hook `pre-commit` para Git?\n\nCurioso você perguntar!\n\n```sh\n#!/bin/sh\n# Ensure all javascript files staged for commit pass standard code style\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\nAlternativamente, [overcommit](https://github.com/brigade/overcommit) é um gerenciador de ganchos Git que incluem suporte para rodar `standard` como um gancho pre-commit de Git.\nPara habilitar, adicione o seguinte ao seu  `.overcommit.yml`:\n\n```yaml\nPreCommit:\n  Standard:\n    enabled: true\n```\n\n### Como eu deixo o output todo coloridinho e *bonitinho*?\n\nO output de fábrica é simples e direto, mas se você gosta de coisinhas brilhantes, instale  [snazzy](https://www.npmjs.com/package/snazzy):\n\n```\nnpm install snazzy\n```\n\nE rode:\n\n```bash\n$ standard --verbose | snazzy\n```\n\nHá também [standard-tap](https://www.npmjs.com/package/standard-tap),\n[standard-json](https://www.npmjs.com/package/standard-json),\n[standard-reporter](https://www.npmjs.com/package/standard-reporter), e\n[standard-summary](https://www.npmjs.com/package/standard-summary).\n\n## Node.js API\n\n### `standard.lintText(text, [opts], callback)`\n\nAplica lint no código fornecido `text` para forçar JavaScript Standard Style. Um objeto `opts` pode ser fornecido:\n\n```js\nvar opts = {\n  fix: false,   // automaticamente corrige problemas\n  globals: [],  // declaração de variáveis globais\n  plugins: [],  // plugins eslint\n  envs: [],     // ambiente eslint\n  parser: ''    // js parser (e.g. babel-eslint)\n}\n```\n\nO `callback` vai ser chamado com os objetos `Error` e `results`:\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `standard.lintFiles(files, [opts], callback)`\n\nAplica lint nos globs `files`. Um objeto `opts` pode ser passado\n\n```js\nvar opts = {\n  ignore: [],   // globs de arquivo para ser ignorados (has sane defaults)\n  cwd: '',      // diretório atual de trabalho (default: process.cwd())\n  fix: false,   // corrige problemas automaticamente\n  globals: [],  // variáveis globais para declarar\n  plugins: [],  // plugins eslint\n  envs: [],     // ambiente eslint\n  parser: ''    // js parser (e.g. babel-eslint)\n}\n```\n\nO `callback` vai ser chamado com os objetos `Error` e `results`:\n\n## Contribuições\n\nContribuições são bem-vindas! Cheque o [issues](https://github.com/standard/standard/issues) ou os [PRs](https://github.com/standard/standard/pulls), e faça o seu próprio se quiser algo que não encontra aqui.\n\nJunte-se ao `#standard` no freenode.\n\n### Quero contribuir com o `standard`. Quais packages eu devo conhecer?\n\n- **[standard](https://github.com/standard/standard)** - esse repo\n  - **[standard-engine](https://github.com/flet/standard-engine)** - Motor cli para regras arbritrárias de ESLint\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - Regras ESLint para  `standard`\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - Regras  ESLint custom  para `standard` (Não fazem parte do core do ESLint)\n  - **[eslint](https://github.com/eslint/eslint)** - O linter que move o `standard`\n- **[standard-format](https://github.com/maxogden/standard-format)** - Formatador de código automático\n- **[snazzy](https://github.com/standard/snazzy)** - Output de terminal bonitinho\n- **[standard-www](https://github.com/standard/standard-www)** - código do  https://standardjs.com\n- **[semistandard](https://github.com/Flet/semistandard)** - standard, com ponto-e-vírgula (se você precisar)\n\nHá vários **[plugins de editores](#text-editor-plugins)**, uma lista de\n**[packages que usam `standard`](https://github.com/standard/standard-packages)**,\ne uma awesome list de\n**[packages do ecossistema `standard` ](https://github.com/standard/awesome-standard)**.\n\n## License\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-zhcn.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard - JavaScript 代码规范\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"travis\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/eslint-config-standard\"><img src=\"https://img.shields.io/npm/dm/eslint-config-standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n</p>\n\n<h4 align=\"center\">One JavaScript Style to Rule Them All</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n## JavaScript 代码规范，自带 linter & 代码自动修正\n\n本工具通过以下三种方式为你（及你的团队）节省大量时间：\n\n- **无须配置。** 史上最便捷的统一代码风格的方式，轻松拥有。\n- **自动代码格式化。** 只需运行 `standard --fix` 从此和脏乱差的代码说再见。\n- **提前发现风格及程序问题。** 减少代码审查过程中反反复复的修改过程，节约时间。\n\n无须犹豫。再也不用维护 `.eslintrc`, `.jshintrc`, or `.jscsrc` 。开箱即用。\n\n安装：\n\n```\nnpm install standard --save-dev\n```\n\n## 细则\n\n- **使用两个空格** – 进行缩进\n- **字符串使用单引号** – 需要转义的地方除外\n- **不再有冗余的变量** – 这是导致 *大量* bug 的源头!\n- **无分号** – [这][1][没什么不好。][2][不骗你！][3]\n- **行首不要以 `(`, `[`, or `` ` `` 开头**\n  - 这是省略分号时**唯一**会造成问题的地方 – *工具里已加了自动检测！*\n  - [详情][4]\n- **关键字后加空格** `if (condition) { ... }`\n- **函数名后加空格** `function name (arg) { ... }`\n- 坚持使用全等 `===` 摒弃 `==` 一但在需要检查 `null || undefined` 时可以使用 `obj == null`。\n- 一定要处理 Node.js 中错误回调传递进来的 `err` 参数。\n- 使用浏览器全局变量时加上 `window` 前缀 – `document` 和 `navigator` 除外\n  - 避免无意中使用到了这些命名看上去很普通的全局变量， `open`, `length`,\n    `event` 还有 `name`。\n- **[查看更多][5]** – *为何不试试 `standard` 规范呢！*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES-zhcn.md#semicolons\n[5]: RULES-zhcn.md#javascript-standard-style\n\n说了那么多，看看[这个遵循了 Standard 规范的示例文件](https://github.com/expressjs/body-parser/blob/master/index.js) 中的代码吧。或者，这里还有[一大波使用了此规范的项目](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) 代码可供参考。\n\n## 目录\n\n-  上手\n  - [安装](#install)\n  - [使用](#usage)\n  - [如果你聪明的话会这样做](#what-you-might-do-if-youre-clever)\n- FAQ\n  - [为何要使用 JavaScript Standard 规范？](#why-should-i-use-javascript-standard-style)\n  - [谁在用 JavaScript Standard 规范？](#who-uses-javascript-standard-style)\n  - [有现成的编辑器插件吗？](#are-there-text-editor-plugins)\n  - [有专属徽章可以用来放到项目的 README 文件中吗？](#is-there-a-readme-badge)\n  - [如果我不同意某条规则，可以改吗？](#i-disagree-with-rule-x-can-you-change-it)\n  - [毕竟这不是一份正式的 Web 规范啊！](#but-this-isnt-a-real-web-standard)\n  - [有自动格式化工具么？](#is-there-an-automatic-formatter)\n  - [如何排除某些文件？](#how-do-i-ignore-files)\n  - [如何隐藏某类警告？](#how-do-i-hide-a-certain-warning)\n  - [使用的三方插件向全局暴露了变量，如何避免 \"variable is not defined\" 的错误提示？](#i-use-a-library-that-pollutes-the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors)\n  - [如何才能使用处于实验阶段的 JavaScript 特性（譬如 ES Next）？](#how-do-i-use-experimental-javascript-es-next-features)\n  - [我能使用其他 JavaScript 变种吗，例如 Flow？](#can-i-use-a-javascript-language-variant-like-flow)\n  - [如何与 Mocha，Jasmine 和 QUnit 这些测试工具搭配工作?](#what-about-mocha-jasmine-qunit-etc)\n  - [Web Workers 有考虑过么？](#what-about-web-workers)\n  - [Markdown 或者 HTML 文件中的代码能检查到吗？](#can-i-check-code-inside-of-markdown-or-html-files)\n  - [有为 git 添加 `pre-commit` 钩子么？](#is-there-a-git-pre-commit-hook)\n  - [怎样使输出好看些，带颜色？](#how-do-i-make-the-output-all-colorful-and-pretty)\n  - [有相关的 Node.js API 没？](#is-there-a-nodejs-api)\n  - [如何参与到 `standard` 规范中来？](#how-do-i-contribute-to-standard)\n- [协议](#license)\n\n## 安装\n\n使用本规范最便捷的方式是全局安装，运行：\n\n```bash\n$ npm install standard --global\n```\n\n或者非全局的方式，针对某个项目进行安装：\n\n```bash\n$ npm install standard --save-dev\n```\n\n*注意：运行以上命令的前提是已经安装了 [Node.js](http://nodejs.org) 和 [npm](https://npmjs.com) 。*\n\n## 使用\n\n安装完就可以开心使用了。最简单的使用场景是检查项目内所有的 JavaScript 文件：\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\n可以跟上 glob 形式的路径参数，但记得带引号以确保 `standard` 工具正确解析，否则会被命令行解析。\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**注意：** `standard` 默认查找 `**/*.js`, `**/*.jsx` 所匹配到的文件。\n\n## 如果你聪明的话会这样做\n\n1. 添加配置到 `package.json`\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. 这样检查工作就会在运行 `npm test` 自动进行\n\n  ```bash\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. 从此告别在提 PR 时的代码风格的问题！\n\n## 为何要使用 JavaScript Standard 规范？\n\n本规范特点之一是简洁。谁也不想为每个项目维护一份有成百上千行语句的代码风格配置文件。有此规范就够了。\n\n本工具通过以下三种方式为你（及你的团队）节省大量时间：\n\n- **无须配置。** 史上最便捷的统一代码风格的方式，轻松拥有。\n- **自动的代码格式化。** 只需运行 `standard --fix` 从此和脏乱差的代码说再见。\n- **提前发现风格及程序问题。** 减少代码审查时的反反复复修改过程，节约时间。\n\n一旦使用 `standard` 规范表明代码的简明性及社区的约定要高于个人的编码风格。这不一定100%适用于所有项目和多元的编程文化，但开源项目代码容易受到新手的影响。把规范讲明，严格执行对于项目的长远维护不无裨益。\n\n## 谁在用 JavaScript Standard 规范？\n\n我们是有群众基础的！\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/github.png>](https://github.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/atom.png>](https://atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=https://cdn.rawgit.com/feross/standard/master/docs/logos/taser.png>](https://www.taser.com) |\n|---|---|---|---|\n\n除公司组织外，[很多个人](https://raw.githubusercontent.com/feross/standard-packages/master/all.json)也在项目中使用，这里就不一一罗列了。\n\n并且 `standard` 在 GitHub 的[代码检查类工具](https://github.com/showcases/clean-code-linters) 展示列表中也排名第一。\n\n## 有现成的编辑器插件吗？\n\n首先安装 `standard`。剩下的就是不同编译器安装对应的插件：\n\n### Sublime Text\n\n通过 **[Package Control][sublime-1]**，安装 **[SublimeLinter][sublime-2]** 和\n**[SublimeLinter-contrib-standard][sublime-3]**。\n\n如果想要保存时自动格式化，还需安装 **[StandardFormat][sublime-4]**。\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n### Atom\n\n安装 **[linter-js-standard][atom-1]**。\n\n如果想要保存时自动格式化，还需安装 **[standard-formatter][atom-2]**。安装 **[standardjs-snippets][atom-3]** 可以获得 snippets 特性。\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n\n### Visual Studio Code\n\n安装 **[vscode-standardjs][vscode-1]**（已经包含了自动格式化）。\n\n安装 **[vscode-standardjs-snippets][vscode-2]** 以获得 JS snippets。安装 **[vscode-react-standard][vscode-3]** 以获得 React snippets。\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n### Vim\n\n安装 **[Syntastic][vim-1]** 并添加如下配置到 `.vimrc`：\n\n```vim\nlet g:syntastic_javascript_checkers = ['standard']\n```\n\n如果想要保存时自动格式化，添加以下配置到 `.vimrc`：\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\n[vim-1]: https://github.com/scrooloose/syntastic\n\n### Emacs\n\n安装 **[Flycheck][emacs-1]** 后查看 **[manual][emacs-2]** 以了解如何在项目在启用。\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n### Brackets\n\n插件中搜索 **[\"Standard Code Style\"][brackets-1]** 然后点击 \"Install\"。\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n### WebStorm (PhpStorm, IntelliJ, RubyMine, JetBrains 等 jetbrains 全家桶系列)\n\nWebStorm [最近宣布](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/)在其 IDE 中\n 自带 `standard` 规范。\n\n但是如果你仍然想自己动手配置，[那么请看此教程][webstorm-1]。此教程适用于 JetBrains 全家桶，包括 PhpStorm、IntelliJ、RubyMine 等。\n\n[webstorm-1]: docs/webstorm.md\n\n## 有专属徽章可以用来放到项目的 README 文件中吗？\n\n必需的！如果你的项目使用了 `standard` 规范，可以任选一个下面的徽章放入项目中来进行展示。\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```md\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n```md\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n```\n\n## 如果我不同意某条规则，可以改吗？\n\n不行。制定这套 `standard` 规范的目的就是让大家都不必再花时间浪费在[无谓的][bikeshedding]代码风格之争上面了。关于缩进该用制表符还是空格这个问题已经争论了很久了，永远也没有答案。争论这个都可以把需求提前写完了。遵循 `standard` 规范，你就不用再犹豫了，毕竟不管怎样争论总归会选择一种风格的。希望大家也能在个人语义和普适价值上做一个权衡。\n\n如果你非要自己去配置成百上千项的 ESLint 规则，那你可以直接使用\n[eslint-config-standard](https://github.com/standard/eslint-config-standard) 来将个人配置包装在上层。\n\n小贴士：选择 `standard` 然后保持吧。把时间留下来解决其他有意义的问题！\\(^____^)/\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## 毕竟这不是一份正式的 Web 规范啊！\n\n确实！这份规范不隶属于任何官方组织，所以才叫 `feross/standard` 而不是 `ECMA/standard` 嘛。\n\n而 `standard` (标准) 一词在这里不局限于 “web 标准” :-) 。 举个例子：\n\n- 这个模块帮助我们将代码维持在一个*高的水准（standard of quality）*\n- 这个模块确定项目中的新手遵循一些基本的*样式规范（style standards）*\n\n## 有自动格式化工具么？\n\n当然！你可以使用 `standard --fix` 来纠正大部分的代码问题。\n\n`standard --fix` 可以修正大部分约定俗成的问题，但有些错误（譬如忘记了错误处理）只能手动去修复了。\n\n为了使用方便，`standard` 会在检测到有能够自动被修复的问题的时候，给出相应的提示 \"`运行 standard --fix 来自动修正一些问题`\"。\n\n## 如何排除某些文件？\n\n`node_modules/`、`coverage/`、`vendor/`、`*.min.js`、`bundle.js` 这些目录，还有以 `.` 开头的文件（譬如 `.git/`）或者文件夹自动被排除在外。\n\n`.gitignore` 里配置的文件也会自动排除掉。\n\n有时你还是需要添加一些自定义的排除文件，可以在 `package.json` 里添加 `standard.ignore` 属性来配置：\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## 如何隐藏某类警告？\n\n很少的情况下你需要绕开 `standard` 以隐藏某些警告信息。\n\nJavaScript Standard 代码规范底层使用的是 [ESLint](http://eslint.org/)。所以如果你想隐藏某些警告，方法和使用 ESLint 时一样。\n\n打印详细信息（这样你就能找到你想隐藏的警告在配置中对应的名称了）：\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\n对某一行禁用**所有规则**：\n```js\nfile = 'I know what I am doing' // eslint-disable-line\n```\n\n或者，**只禁**用 `\"no-use-before-define\"` 这条规则：\n```js\nfile = 'I know what I am doing' // eslint-disable-line no-use-before-define\n```\n\n或者，对**多行**禁用 `\"no-use-before-define\"` 这一规则：\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## 使用的三方插件向全局暴露了变量，如何避免 \"variable is not defined\" 的错误提示？\n\n一些三方库（比如 `mocha`）会向全局暴露变量（`describe`、`it`）。这些变量或方法即没有定义，也没有被 `require` 进来，所以 `standard` 会报出变量未定义的警告（这种警告通常情况下是很有用的）。这种情况下我们想对这些全局变量禁用检查。\n\n为了让 `standard` 检测通过（同时也使代码更加易懂），在文件顶部添加如下配置：\n\n```js\n/* global myVar1, myVar2 */\n```\n\n但如果你需要添加的文件太多，这种方式就显得繁琐了。这种情况下，运行：\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\n或者在 `package.json` 里配置：\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n*注意：`global` 和 `globals` 效果一样*\n\n## 如何才能使用处于实验阶段的 JavaScript 特性（譬如 ES Next）？\n\n`standard` 支持最新的 ECMAScript 特性，ES8（ES2017），包括处于 “Stage 4” 仍在提案阶段的特性。\n\n为了支持实验性的特性，`standard` 支持自定义 JavaScript 解析器。添加自定义解析器前请思考一下必要性。\n\n从 npm 安装并使用自定义的解析器（示例：`npm install babel-eslint`）：\n\n```bash\n$ standard --parser babel-eslint\n```\n\n或者将其添加到  `package.json` 配置中：\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\n如果全局安装（`npm install standard --global`）了 `standard` 的话，那么请确保 `babel-eslint` 也用 `npm install babel-eslint --global` 全局安装。\n\n## 我能使用其他 JavaScript 变种吗，例如 Flow？\n\n同样地，想要使用一个 JS 变种之前，先考虑添加和使用它所带来的复杂度看是否值得这么去做。\n\n`standard` 支持 ESLint 插件。在 `standard` 处理代码前，使用任何一个插件来将代码编译成合法的 JS 即可。 从 npm 安装一个自定义的解析器 (示例：`npm install eslint-plugin-flowtype`) 然后运行：\n\n```bash\n$ standard --plugin flowtype\n```\n\n或者添加到`package.json`:\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"flowtype\" ]\n  }\n}\n```\n\n如果全局安装（`npm install standard --global`）了 `standard` 的话，那么请确保 `eslint-plugin-flowtype` 也用 `npm install eslint-plugin-flowtype --global` 全局安装。\n\n*注意：`plugin` 和 `plugins` 等价*\n\n## 如何与 Mocha，Jasmine 和 QUnit 这些测试工具搭配工作?\n\n为了能让 mocha 在你的测试文件中工作，将以下配置添加到测试文件头部：\n\n```js\n/* eslint-env mocha */\n```\n\n或者运行：\n\n```bash\n$ standard --env mocha\n```\n\n上面 `mocha` 也可以是 `jasmine`, `qunit`, `phantomjs` 等同类工具。这里有个来自 ESLint 的完整列表\n[环境配置](http://eslint.org/docs/user-guide/configuring.html#specifying-environments)\n文档。环境中所有可用的全局变量可以这个\n[globals](https://github.com/sindresorhus/globals/blob/master/globals.json)  npm 包中查到。\n\n*注意: `env` 与 `envs` 用哪个都一样。*\n\n## Web Workers 有考虑过么？\n\n添加以下注释到文件头部：\n\n```js\n/* eslint-env serviceworker */\n```\n\n这样可以让 `standard` 知道 `self` 是 web worker 中的全局变量（同时也让人更容易看懂）。\n\n## Markdown 或者 HTML 文件中的代码能检查到吗？\n\n可以使用 [`standard-markdown`](https://www.npmjs.com/package/standard-markdown) 来检查 Markdown 里的区位码。\n\n此外，也有 ESLint 插件可以检查 Markdown、HTML 等其他类型文件中的代码：\n\n检查 Markdown 文件中的代码，可以用这个 ESLint 插件：\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\n然后运行以下命令来检查文件代码块中的代码：\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\nHTML 文件可以下面这个插件：\n\n```bash\n$ npm install eslint-plugin-html\n```\n\n然后运行以下命令来检查包含在 `<script>` 标签中的代码：\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## 有为 git 添加 `pre-commit` 钩子么？\n\n这个问题问得好！\n\n```sh\n#!/bin/sh\n# 确保将要提交的所有 JavaScript 代码通过 standard 规范的检查\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n## 怎样使输出好看些，带颜色？\n\n自带的输出信息简洁原始，如果想要炫酷好看，安装 [snazzy](https://www.npmjs.com/package/snazzy)：\n\n```bash\n$ npm install snazzy\n```\n\n然后运行：\n\n```bash\n$ standard --verbose | snazzy\n```\n\n还有 [standard-tap](https://www.npmjs.com/package/standard-tap)、\n[standard-json](https://www.npmjs.com/package/standard-json)、\n[standard-reporter](https://www.npmjs.com/package/standard-reporter) 和\n[standard-summary](https://www.npmjs.com/package/standard-summary) 这些类似的工具。\n\n## 有相关的 Node.js API 没？\n\n有！\n\n### `standard.lintText(text, [opts], callback)`\n\n检查传入的  `text`。需要提供一个 `opts` 配置参数：\n\n```js\n{\n  cwd: '',      // 当前工作目录（默认为：process.cwd()）\n  filename: '', // 需要检查的文件的路径（可选，虽然有些 eslint 插件需要该参数）\n  fix: false,   // 是否自动修复问题\n  globals: [],  // 声明需要跳过检测的定义全局变量\n  plugins: [],  // 自定义的 eslint 插件列表\n  envs: [],     // 自定义的 eslint 环境\n  parser: ''    // 自定义的 js 解析器（例如 babel-eslint）\n}\n```\n\n如果 `package.json` 有相应配置也会自动被读取到。\n\n完成后会调用 `callback` 回调并传入  `Error` 和 `results`。\n\n包含结果的  `results` 包含如下属性：\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0,\n      output: '' // fixed source code (only present with {fix: true} option)\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `results = standard.lintTextSync(text, [opts])`\n\n`standard.lintText()` 的同步版本。如果运行出错，会抛出异常。否则返回 `results`。\n\n### `standard.lintFiles(files, [opts], callback)`\n\n检查以 glob 形式指定的 `files` 参数所匹配到的所有文件。可以传入一个 `opts` 配置参数：\n\n```js\nvar opts = {\n  ignore: [],   // glob 形式的排除列表 (一般无须配置)\n  cwd: '',      // 当前工作目录（默认为：process.cwd()）\n  fix: false,   // 是否自动修复问题\n  globals: [],  // 声明需要跳过检测的定义全局变量\n  plugins: [],  // eslint 插件列表\n  envs: [],     // eslint 环境\n  parser: ''    // js 解析器（例如 babel-eslint）\n}\n```\n\n回调同上。\n\n## 如何参与到 `standard` 规范中来？\n\n欢迎参与进来！逛逛 [issues](https://github.com/standard/standard/issues) 或者 [PRs](https://github.com/standard/standard/pulls) 页面，如果发现没有找到想要的问题可以自己提一个。\n\n来 freenode 的 `#standard` 频道与其他人一起聊天讨论！\n\n以下是一些 `standard` 生态里比较重要的包：\n\n- **[standard](https://github.com/standard/standard)** - 本仓库\n  - **[standard-engine](https://github.com/flet/standard-engine)** - 一个 eslint 命令行引擎\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** -standard 规范的 eslint 检查器\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - standard (JSX) 的 eslint 规范\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - standard 规范自定义的 eslint 规则（不在 eslint 核心规则里面）\n  - **[eslint](https://github.com/eslint/eslint)** - standard 基于它来实现的\n- **[snazzy](https://github.com/standard/snazzy)** - 美化输出\n- **[standard-www](https://github.com/standard/standard-www)** - https://standardjs.com 站点的源码\n- **[semistandard](https://github.com/Flet/semistandard)** - standard 规范带逗号的版本（如果你需要的话）\n\n还有很多 **[编辑器插件](#text-editor-plugins)**、一个\n**[使用 `standard` 规范开发的 npm 包](https://github.com/standard/standard-packages)**的列表、还有一分非常棒的**[ `standard` 生态中所使用到的包](https://github.com/standard/awesome-standard)**的列表。\n\n## 协议\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/README-zhtw.md",
    "content": "<h1 align=\"center\">\n  <a href=\"https://standardjs.com\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard － JavaScript 樣式教學\" width=\"200\"></a>\n  <br>\n  JavaScript Standard Style\n  <br>\n  <br>\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/feross/standard\"><img src=\"https://img.shields.io/travis/feross/standard/master.svg\" alt=\"Travis\"></a>\n  <a href=\"https://standardjs.com\"><img src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/dm/standard.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://www.npmjs.com/package/standard\"><img src=\"https://img.shields.io/npm/v/standard.svg\" alt=\"npm version\"></a>\n</p>\n\n<h4 align=\"center\">統一 JavaScript，只需一種樣式</h4>\n\n<p align=\"center\">\n  <a href=\"README-en.md\">English</a> •\n  <a href=\"README-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"README-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"README-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"README-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"README-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"README-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n<br>\n\n什麼都不用想。不用管理 `.eslintrc` 、 `.jshintrc` 或 `.jscsrc` 等檔案。就是這麼容易。\n\n這個模組透過兩種方法，省下你（和其他人！）的時間：\n\n- **不用設定檔：** 在專案中最簡單的方法去強迫統一樣式，就是不用設定檔。\n- **在提交 PR 前就可以發現樣式錯誤：** 幫專案維護者和貢獻者省下寶貴的 Code Review 時間，減少來回審核的次數。\n\n安裝：\n\n```\nnpm install standard --save-dev\n```\n\n## 語法規則\n\n- **兩個空白** － 當作縮排\n- **字串用單引號** － 除非要避免跳脫字元\n- **沒有不必要的變數** － 這可以解決 *超多* 的 Bug ！\n- **不要加分號** － [這真的][1] [很 OK，][2] [真的！][3]\n- **絕對不要用 `(` 、 `[` 或 `` ` `` 當開頭**\n  - 這是不用分號 **唯一** 可能遇到的問題 － *那就自動幫你檢查吧！*\n  - [更多解釋][4]\n- **關鍵字後加空白** `if (condition) { ... }`\n- **函數名稱後加空白** `function name (arg) { ... }`\n- 統一用 `===` 取代 `==` － 但是 `obj == null` 可以用來檢查 `null || undefined`。\n- 一定要例外處理 node.js 中的 `err` 參數\n- 一定要對瀏覽器中的全域變數加上 `window` 前綴 － 除了 `document` 和 `navigator` 可以不用\n  - 避免使用那些命名得很爛的全域變數，像是 `open` 、 `length` 、 `event` 和 `name`。\n- **還有 [更多更多的好處][5]** － *今天就來試試 `standard` 吧！*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n[4]: RULES.md#semicolons\n[5]: RULES.md#javascript-standard-style\n\n看看一些[用 JavaScript Standard Style 寫的範例](https://github.com/expressjs/body-parser/blob/master/index.js)來了解更多，或查看其他[數以千計使用 `standard` 的專案。](https://raw.githubusercontent.com/feross/standard-packages/master/all.json)\n\n## 目錄\n\n- 快速入門\n  - [安裝](#安裝)\n  - [用法](#用法)\n  - [如果你還是不懂的話可以](#如果你還是不懂的話可以)\n- FAQ\n  - [為什麼我要用 JavaScript Standard Style？](#為什麼我要用-javascript-standard-style)\n  - [誰在用 JavaScript Standard Style？](#誰在用-javascript-standard-style)\n  - [有文字編輯器的外掛嗎？](#有文字編輯器的外掛嗎)\n  - [有 README 專用的 standard 徽章嗎？](#有-readme-專用的-standard-徽章嗎)\n  - [我不同意某條規定，你們可以改一下嗎？](#我不同意某條規定你們可以改一下嗎)\n  - [但這不是真實網路中的標準！](#但這不是真實網路中的標準)\n  - [有自動修正的工具嗎？](#有自動修正的工具嗎)\n  - [如何忽略某些檔案？](#如何忽略某些檔案)\n  - [如何隱藏某些警告？](#如何隱藏某些警告)\n  - [我使用的套件庫污染了全域變數，該如何避免出現 \"variable is not defined\" 錯誤？](#我使用的套件庫污染了全域變數該如何避免出現-variable-is-not-defined-錯誤)\n  - [如何使用實驗性質的 JavaScript (ES Next) 新語法？](#如何使用實驗性質的-javascript-es-next-新語法)\n  - [我可以使用 JavaScript 的變體，像是 Flow 嗎？](#我可以使用-javascript-的變體像是-flow-嗎)\n  - [Mocha、Jasmine、QUnit 等等套件呢？](#mochajasminequnit-等等套件呢)\n  - [Web Workers 呢？](#web-workers-呢)\n  - [可以檢查 Markdown 或 HTML 檔裡面的程式嗎？](#可以檢查-markdown-或-html-檔裡面的程式嗎)\n  - [有 Git `pre-commit` 的外掛嗎？](#有-git-pre-commit-的外掛嗎)\n  - [如何將輸出加上顏色？](#如何將輸出加上顏色)\n  - [有 Node.js 的 API 嗎？](#有-nodejs-的-api-嗎)\n  - [如何貢獻 `standard`？](#如何貢獻-standard)\n- [授權](#授權)\n\n## 安裝\n\n使用 JavaScript Standard Style 最簡單的方法就是安裝在全域下，變成一個 Node 指令列程式。在 Terminal 中執行以下指令來安裝：\n\n```bash\n$ npm install standard --global\n```\n\n或者，你也可以在單一專案下局部的安裝 `standard`：\n\n```bash\n$ npm install standard --save-dev\n```\n*注意: 為了執行前面的指令，請確保你已經安裝了  [Node.js](http://nodejs.org) 和 [npm](https://npmjs.com)。*\n\n## 用法\n\n在你安裝 `standard` 之後，你就可以使用 `standard` 這支程式了。最簡單的用法就是在當前目錄下檢查所有 JavaScript 檔案的樣式：\n\n```bash\n$ standard\nError: Use JavaScript Standard Style\n  lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n```\n\n你也可以選擇性的檢查部分目錄們（請確保路徑前後有引號，避免出錯）。\n\n```bash\n$ standard \"src/util/**/*.js\" \"test/**/*.js\"\n```\n\n**注意：** `standard` 預設會檢查所有符合名稱為 `**/*.js` 和 `**/*.jsx` 的檔案。\n\n## 如果你還是不懂的話可以\n\n1. 把以下加入 `package.json`\n\n  ```json\n  {\n    \"name\": \"my-cool-package\",\n    \"devDependencies\": {\n      \"standard\": \"*\"\n    },\n    \"scripts\": {\n      \"test\": \"standard && node my-tests.js\"\n    }\n  }\n  ```\n\n2. 這樣當你執行 `npm test` 的時候，就會自動檢查樣式了\n\n  ```bash\n  $ npm test\n  Error: Use JavaScript Standard Style\n    lib/torrent.js:950:11: Expected '===' and instead saw '=='.\n  ```\n\n3. 從此跟樣式不符的 PR 說掰掰！\n\n## 為什麼我要用 JavaScript Standard Style？\n\nJavaScript Standard Style 的美來自於它的簡單，沒有人想要在每個專案、模組中維護好幾個數百行的樣式設定檔吧？別做傻事啊！\n\n這個模組透過兩種方法，省下你的時間：\n\n- **不用設定檔：** 在專案中最簡單的方法去強迫統一樣式，就是不用設定檔。\n- **在提交 PR 前就可以發現樣式錯誤：** 幫專案維護者和貢獻者省下寶貴的 Code Review 時間，減少來回審核的次數。\n\n採用 `standard style` 代表把程式碼的簡潔和群體規範，看得比個人風格重要。這可能不是對於所有專案和開發環境都合情合理。然而，開源軟體可能是一個對於新手充滿敵意的環境，訂定簡單、一致的貢獻準則，才可以專案更健康，有更多新人投入。\n\n## 誰在用 JavaScript Standard Style？\n\n超多人的啦！\n\n[<img width=150 src=../docs/logos/npm.png>](https://www.npmjs.com) | [<img width=150 src=../docs/logos/github.png>](https://github.com) | [<img width=150 src=../docs/logos/opbeat.png>](https://opbeat.com) | [<img width=150 src=../docs/logos/nearform.png>](http://www.nearform.com) | [<img width=150 src=../docs/logos/brave.png>](https://www.brave.com) |\n|---|---|---|---|---|\n\n| [<img width=150 src=../docs/logos/zeit.png>](https://zeit.co) | [<img width=150 src=../docs/logos/zendesk.png>](https://www.zendesk.com) | [<img width=150 src=../docs/logos/mongodb.jpg>](https://www.mongodb.com) | [<img width=150 src=../docs/logos/typeform.jpg>](https://www.typeform.com) | [<img width=150 src=../docs/logos/gov-uk.png>](https://gds.blog.gov.uk) |\n|---|---|---|---|---|\n\n[<img width=150 src=../docs/logos/express.png>](http://expressjs.com) | [<img width=150 src=../docs/logos/webtorrent.png>](https://webtorrent.io) | [<img width=150 src=../docs/logos/ipfs.png>](https://ipfs.io) | [<img width=150 src=../docs/logos/dat.png>](https://datproject.org) | [<img width=150 src=../docs/logos/bitcoinjs.png>](https://bitcoinjs.org) |\n|---|---|---|---|---|\n\n[<img width=150 src=../docs/logos/atom.png>](https://atom.io) | [<img width=150 src=../docs/logos/electron.png>](http://electron.atom.io) | [<img width=150 src=../docs/logos/voltra.png>](https://voltra.co) | [<img width=150 src=../docs/logos/treasuredata.png>](https://www.treasuredata.com) | [<img width=150 src=../docs/logos/clevertech.png>](https://clevertech.biz) |\n|---|---|---|---|---|\n\n[<img width=150 src=../docs/logos/studynotes.jpg>](https://www.apstudynotes.org) | [<img width=150 src=../docs/logos/optiopay.png>](https://www.optiopay.com) | [<img width=150 src=../docs/logos/jaguar-landrover.png>](https://www.jlrtechincubator.com/jlrti/) | [<img width=150 src=../docs/logos/bustle.jpg>](https://www.bustle.com) | [<img width=150 src=../docs/logos/zentrick.png>](https://www.zentrick.com) |\n|---|---|---|---|---|\n\n[<img width=150 src=../docs/logos/nodesource.png>](https://nodesource.com) | [<img width=150 src=../docs/logos/greenkeeper.png>](https://greenkeeper.io) | [<img width=150 src=../docs/logos/karma.png>](https://karma-runner.github.io) | [<img width=150 src=../docs/logos/taser.png>](https://www.taser.com) |\n|---|---|---|---|---|\n\n除了公司之外，非常多的社群也在套件中採用了 `standard` [因為太多了](https://raw.githubusercontent.com/feross/standard-packages/master/all.json) 無法在此一一列舉。\n\n`standard` 也是 GitHub 的\n[Clean Code Linter](https://github.com/showcases/clean-code-linters) 中，最多人給星的專案。\n\n## 有文字編輯器的外掛嗎？\n\n首先，安裝 `standard`。接下來，就可以依據你使用的編輯器安裝對應的外掛了：\n\n### Sublime Text\n\n使用 **[Package Control][sublime-1]** 安裝 **[SublimeLinter][sublime-2]** 和\n**[SublimeLinter-contrib-standard][sublime-3]**。\n\n如果想要在儲存時自動修改樣式，可以安裝 **[StandardFormat][sublime-4]**.\n\n[sublime-1]: https://packagecontrol.io/\n[sublime-2]: http://www.sublimelinter.com/en/latest/\n[sublime-3]: https://packagecontrol.io/packages/SublimeLinter-contrib-standard\n[sublime-4]: https://packagecontrol.io/packages/StandardFormat\n\n### Atom\n\n安裝 **[linter-js-standard][atom-1]**.\n\n如果想要在儲存時自動修改樣式，可以安裝  **[standard-formatter][atom-2]**。或是安裝 **[standardjs-snippets][atom-3]** 可以使用自動補完。\n\n[atom-1]: https://atom.io/packages/linter-js-standard\n[atom-2]: https://atom.io/packages/standard-formatter\n[atom-3]: https://atom.io/packages/standardjs-snippets\n\n### Visual Studio Code\n\n安裝 **[vscode-standardjs][vscode-1]**. (包含自動修改樣式的支援。)\n\n需要 JS 自動補完，可以安裝： **[vscode-standardjs-snippets][vscode-2]**。 需要 React 自動補完，可以安裝： **[vscode-react-standard][vscode-3]**。\n\n[vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs\n[vscode-2]: https://marketplace.visualstudio.com/items?itemName=capaj.vscode-standardjs-snippets\n[vscode-3]: https://marketplace.visualstudio.com/items/TimonVS.ReactSnippetsStandard\n\n### Vim\n\n安裝 **[Syntastic][vim-1]**，然後把以下加到 `.vimrc` 中:\n\n```vim\nlet g:syntastic_javascript_checkers = ['standard']\n```\n\n如果想要在儲存時自動修改樣式，加入以下到 `.vimrc` 中：\n\n```vim\nautocmd bufwritepost *.js silent !standard --fix %\nset autoread\n```\n\n[vim-1]: https://github.com/scrooloose/syntastic\n\n### Emacs\n\n安裝 **[Flycheck][emacs-1]** 然後查看 **[使用手冊][emacs-2]** 學習如何在專案中使用。\n\n[emacs-1]: http://www.flycheck.org\n[emacs-2]: http://www.flycheck.org/en/latest/user/installation.html\n\n### Brackets\n\n搜尋 **[\"Standard Code Style\"][brackets-1]** 然後按 \"Install\".\n\n[brackets-1]: https://github.com/ishamf/brackets-standard/\n\n### WebStorm (PhpStorm, IntelliJ, RubyMine, JetBrains, etc.)\n\nWebStorm [近期發佈了原生支援](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/)，可以直接在 IDE 中使用 `standard`。\n\n如果你還是傾向要手動設定 `standard`，[可以參考這個教學][webstorm-1]。這可以套用至所有 JetBrains 的產品，包括 PhpStorm、IntelliJ、RubyMine 等等。\n\n[webstorm-1]: docs/webstorm.md\n\n## 有 README 專用的 standard 徽章嗎？\n\n可以！如果你在專案中使用了 `standard`，你可以在 README 中加入以下的徽章，讓大家知道你的程式碼使用了 standard 的標準。\n\n\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n```md\n[![Standard - JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n```\n\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com/)\n\n```md\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com/)\n```\n\n## 我不同意某條規定，你們可以改一下嗎？\n\n不行。`standard` 的重點就是在於避免那些對於程式碼的風格[永遠不會有答案的爭議上][bikeshedding]，像是從古至今就在爭論的 tab vs 空白等等。這些問題是永遠不會被解決的，但永無止盡的爭論卻會讓大家分心不做正事。最後你還是得決定去「選擇其中一個」，這就是 `standard` 的哲學 —— 一大堆合理的「選擇其中一個」。幸運的是，很多採用 standard 的使用者已經發現使用後獲得的成果已經比捍衛自己的偏見好多了。\n\n如果你真的非常想要去客製化設定幾百行的規則，應該直接去用 `eslint` 和 [eslint-config-standard](https://github.com/standard/eslint-config-standard)，可以把你想要的規則列在最前面。\n\n專業建議：就直接用 `standard` 然後開始吧。把時間花在那些你真正該解決的問題上吧！:P\n\n[bikeshedding]: https://www.freebsd.org/doc/en/books/faq/misc.html#bikeshed-painting\n\n## 但這不是真實網路中的標準！\n\n這當然不是！這個風格訂定並不是隸屬於什麼正式網路團體的，所以這個專案才叫做 `feross/standard` 而不是\n`ECMA/standard`.\n\n\"standard\" 這個字的意義比 \"web standard\" 的意義來得多 :-)。舉例來說：\n\n- 這個模組讓你的程式碼有很高的 *standard of quality* 。\n- 這個模組確保新的貢獻者遵循基本的 *style standards*。\n\n## 有自動修正的工具嗎？\n\n有的！你可以用 `standard --fix` 去自動化修正某些問題。\n\n`standard --fix` 為了方便直接內建在 `standard` 裡面。大部分的問題都是可以解決的，但一些問題（像是忘記處理錯誤）則必須要手動修正。\n\n為了省下你寶貴的時間，`standard` 如果偵測到發生的問題是可以被自動修正的話，\n會輸出 \"`Run standard --fix to\nautomatically fix some problems`\" 。\n\n## 如何忽略某些檔案？\n\n一些路徑 （`node_modules/`、`coverage/`、`vendor/`、`*.min.js`、`bundle.js` 和  `.` 開頭的檔案和資料夾，像是 `.git/`）會自動被忽略。\n\n專案根目錄下 `.gitignore` 中列出來的路徑也會被自動忽略。\n\n有時候你還是需要去忽略一些資料夾或一些最小化後的檔案，可以在 `package.json` 中加個 `standard.ignore` 屬性：\n\n```json\n\"standard\": {\n  \"ignore\": [\n    \"**/out/\",\n    \"/lib/select2/\",\n    \"/lib/ckeditor/\",\n    \"tmp.js\"\n  ]\n}\n```\n\n## 如何隱藏某些警告？\n\n在少數情況下，你需要去打破一些規則，然後隱藏 `standard` 產生的警告。\n\nJavaScript Standard Style 底層是使用 [ESLint](http://eslint.org/)，所以你可以直接使用 ESLint 的語法隱藏。\n\n為了拿到詳細的輸出（讓你知道特定規則的名稱好去忽略），可以執行：\n\n```bash\n$ standard --verbose\nError: Use JavaScript Standard Style\n  routes/error.js:20:36: 'file' was used before it was defined. (no-use-before-define)\n```\n\n在特定行數忽略 **所有規則**：\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line\n```\n\n或是 **只** 忽略 `\"no-use-before-define\"` 這條規則：\n\n```js\nfile = 'I know what I am doing' // eslint-disable-line no-use-before-define\n```\n\n或是 **一次在很多行** 忽略 `\"no-use-before-define\"`：\n\n```js\n/* eslint-disable no-use-before-define */\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\nconsole.log('offending code goes here...')\n/* eslint-enable no-use-before-define */\n```\n\n## 我使用的套件庫污染了全域變數，該如何避免出現 \"variable is not defined\" 錯誤？\n\n有些套件（像是 `mocha`）把他們的函式（像是 `describe`、`it`）放到了全域下（不好的方式）。因為這些函式沒有在你的程式碼裡面被宣告或 `require`，`standard` 會警告你使用了未宣告的變數（這個規則通常很實用，可以抓到打錯字），但我們希望去忽略這些全域變數。\n\n為了讓 `standard`（和其他讀程式碼的人）知道某些變數是可以直接被使用的，把這幾行加入檔案開頭：\n\n```js\n/* global myVar1, myVar2 */\n```\n\n如果你有幾百個檔案，應該很不想去每個檔案裡加註解。這時可以執行：\n\n```bash\n$ standard --global myVar1 --global myVar2\n```\n\n或在 `package.json` 中加上：\n\n```json\n{\n  \"standard\": {\n    \"globals\": [ \"myVar1\", \"myVar2\" ]\n  }\n}\n```\n\n*注意： `global` 和 `globals` 是可以互通的。*\n\n## 如何使用實驗性質的 JavaScript (ES Next) 新語法？\n\n`standard` 支援最新的 ECMAScript 語法 ES8 (ES2017)，包含所有在新語法提議過程中，已經進入 \"階段四\" 的提議。\n\n為了支援實驗性質的語法，`standard` 支援客製化 JavaScript 語法解析器。在使用客製化語法解析器前，請考慮清楚是否值得去增加這些複雜度。\n\n要使用客製化語法解析器，可以從 npm 安裝（比如說：`npm install babel-eslint`），然後執行：\n\n```bash\n$ standard --parser babel-eslint\n```\n\n或在 `package.json` 中加入：\n\n```json\n{\n  \"standard\": {\n    \"parser\": \"babel-eslint\"\n  }\n}\n```\n\n如果你是把 `standard` 裝在全域下（就是 `npm install standard --global`），那麼請確保 `babel-eslint` 也是用 `npm install babel-eslint --global` 裝在全域下。\n\n## 我可以使用 JavaScript 的變體，像是 Flow 嗎？\n\n在使用客製化的 JS 變體前，請考慮增加這些複雜度（和跟上所需要的人力）是否值得。\n\n`standard` 支援 ESLint 外掛。在使用 `standard` 先使用其中一種把你的程式碼先轉換成正規的 JavaScript 語法。可以從 npm 安裝客製化的語法解析器（比如說：`npm install eslint-plugin-flowtype`）然後執行：\n\n```bash\n$ standard --plugin flowtype\n```\n\n或在 `package.json` 中加入：\n\n```json\n{\n  \"standard\": {\n    \"plugins\": [ \"flowtype\" ]\n  }\n}\n```\n\n如果 `standard` 是在全域安裝（也就是 `npm install standard --global`），那麼請確保 `eslint-plugin-flowtype` 也是用 `npm install eslint-plugin-flowtype -g` 裝在全域下。\n\n*注意： `plugin` 和 `plugins` 是可以互通的。*\n\n## Mocha、Jasmine、QUnit 等等套件呢？\n\n為了支援 mocha，在檔案開頭加入：\n\n```js\n/* eslint-env mocha */\n```\n\n或執行：\n\n```bash\n$ standard --env mocha\n```\n\n其中 `mocha` 也可以是 `jasmine`、`qunit`、`phantomjs` 等等其他的選擇，可以去 ESLint 看更多 [可以指定的環境](http://eslint.org/docs/user-guide/configuring.html#specifying-environments) 。要檢查哪些全域變數在這些環境是可以用的，可以查看 [globals](https://github.com/sindresorhus/globals/blob/master/globals.json)。\n\n*注意： `env` 和 `envs` 是可以互通的。*\n\n## Web Workers 呢？\n\n在檔案開頭加入：\n\n```js\n/* eslint-env serviceworker */\n```\n\n就可以讓 `standard` （還有其他讀程式碼的人）知道 `self` 在 web worker 裡是一個全域變數。\n\n## 可以檢查 Markdown 或 HTML 檔裡面的程式嗎？\n\n要檢查 Markdown 裡的程式，可以用 [`standard-markdown`](https://www.npmjs.com/package/standard-markdown)。\n\n也可以使用 ESLint 的套件，檢查 Markdown, HTML 和其他種類的文件中的程式：\n\n用 ESLint 套件 `eslint-plugin-markdown` 來檢查 Markdown 中的程式，先安裝：\n\n```bash\n$ npm install eslint-plugin-markdown\n```\n\n就可以檢查 Markdown 中的 JavaScript 程式碼：\n\n```bash\n$ standard --plugin markdown '**/*.md'\n```\n\n用 ESLint 套件 `eslint-plugin-html` 來檢查 HTML 中的程式，先安裝：\n\n```bash\n$ npm install eslint-plugin-html\n```\n\n就可以檢查 `<script>` 標籤中的出現的 JavaScript 程式碼：\n\n```bash\n$ standard --plugin html '**/*.html'\n```\n\n## 有 Git `pre-commit` 的外掛嗎？\n\n當然有啊！\n\n```sh\n#!/bin/sh\n# Ensure all javascript files staged for commit pass standard code style\ngit diff --name-only --cached --relative | grep '\\.jsx\\?$' | xargs standard\nif [ $? -ne 0 ]; then exit 1; fi\n```\n\n## 如何將輸出加上顏色？\n\n原本內建的輸出是沒有顏色的，不過如果你喜歡閃亮亮的東西，可以安裝 [snazzy](https://www.npmjs.com/package/snazzy)：\n\n```bash\n$ npm install snazzy\n```\n\n然後執行：\n\n```bash\n$ standard --verbose | snazzy\n```\n\n也可以使用 [standard-tap](https://www.npmjs.com/package/standard-tap)、[standard-json](https://www.npmjs.com/package/standard-json)、[standard-reporter](https://www.npmjs.com/package/standard-reporter) 和 [standard-summary](https://www.npmjs.com/package/standard-summary)。\n\n## 有 Node.js 的 API 嗎？\n\n有！\n\n### `standard.lintText(text, [opts], callback)`\n\n把輸入的 `text` 檢查 JavaScript Standard Style，可加入 `opts` 選項。\n\n```js\nvar opts = {\n  fix: false,   // 自動修正問題\n  globals: [],  // 會用到的全域變數\n  plugins: [],  // eslint 外掛\n  envs: [],     // eslint 環境\n  parser: ''    // javascript 語法解析器 （比如說 babel-eslint）\n}\n```\n\n`callback` 會被執行，並給予 `Error` 和 `results` 參數：\n\n```js\nvar results = {\n  results: [\n    {\n      filePath: '',\n      messages: [\n        { ruleId: '', message: '', line: 0, column: 0 }\n      ],\n      errorCount: 0,\n      warningCount: 0\n    }\n  ],\n  errorCount: 0,\n  warningCount: 0\n}\n```\n\n### `standard.lintFiles(files, [opts], callback)`\n\n把輸入的 `files` 檢查 JavaScript Standard Style，可加入 `opts` 選項。\n\n```js\nvar opts = {\n  ignore: [],   // 需要忽略的檔案（有跟原本相同的預設值）\n  cwd: '',      // 當前目錄（預設：process.cwd()）\n  fix: false,   // 自動修正問題\n  globals: [],  // 會用到的全域變數\n  plugins: [],  // eslint 外掛\n  envs: [],     // eslint 環境\n  parser: ''    // javascript 語法解析器 （比如說 babel-eslint）\n}\n```\n\n`callback` 會被執行，並給予 `Error` 和 `results` 參數（和上面相同）。\n\n## 如何貢獻 `standard`？\n\n我們非常歡迎貢獻！可以看看[議題](https://github.com/standard/standard/issues) 或 [PRs](https://github.com/standard/standard/pulls)，如果沒看到想要的東西，也可以自己建立。\n\n加入 freenode 的 `#standard` 群組來跟其他貢獻者聊天吧！\n\n以下是一些 `standard` 生態圈中重要的套件：\n\n- **[standard](https://github.com/standard/standard)** - 本專案\n  - **[standard-engine](https://github.com/flet/standard-engine)** - 命令列引擎\n  - **[eslint-config-standard](https://github.com/standard/eslint-config-standard)** - standard 的 eslint 規則\n  - **[eslint-config-standard-jsx](https://github.com/standard/eslint-config-standard-jsx)** - standard (JSX) 的 eslint 規則\n  - **[eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard)** - standard 客製化 eslint 規則（非 eslint 核心）\n  - **[eslint](https://github.com/eslint/eslint)** - 驅動 standard 的核心\n- **[snazzy](https://github.com/standard/snazzy)** - standard 的終端機美麗輸出\n- **[standard-www](https://github.com/standard/standard-www)** - https://standardjs.com 網站程式\n- **[semistandard](https://github.com/Flet/semistandard)** - standard，含分號版本（如果你真的真的必須要加分號）\n\n也有非常多的 **[編輯器外掛](#text-editor-plugins)**、\n**[有使用 `standard` 的 npm 套件清單](https://github.com/standard/standard-packages)**和 **[`standard` 生態系的清單](https://github.com/standard/awesome-standard)**。\n\n## 授權\n\n[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n"
  },
  {
    "path": "docs/RULES-en.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\nThis is a TL;DR of the [standard](https://github.com/standard/standard) JavaScript\nrules.\n\nThe best way to learn about `standard` is to just install it and give it a try on\nyour code.\n\n## Rules\n\n* **Use 2 spaces** for indentation.\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* **Use single quotes for strings** except to avoid escaping.\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **No unused variables.**\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ avoid\n  }\n  ```\n\n* **Add a space after keywords.**\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ avoid\n  ```\n\n* **Add a space before a function declaration's parentheses.**\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ avoid\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ avoid\n  ```\n\n* **Always use** `===` instead of `==`.<br>\n  Exception: `obj == null` is allowed to check for `null || undefined`.\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ avoid\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ avoid\n  ```\n\n* **Infix operators** must be spaced.\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ avoid\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **Commas should have a space** after them.\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ avoid\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **Keep else statements** on the same line as their curly braces.\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **For multi-line if statements,** use curly braces.\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **Always handle the** `err` function parameter.\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ avoid\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **Always prefix browser globals** with `window.`.<br>\n  Exceptions are: `document`, `console` and `navigator`.\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **Multiple blank lines not allowed.**\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ avoid\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **For the ternary operator** in a multi-line setting, place `?` and `:` on their own lines.\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ avoid\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **For var declarations,** write each declaration in its own statement.\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ avoid\n  var silent = true, verbose = true\n\n  // ✗ avoid\n  var silent = true,\n      verbose = true\n  ```\n\n* **Wrap conditional assignments** with additional parentheses. This makes it clear that the expression is intentionally an assignment (`=`) rather than a typo for equality (`===`).\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ avoid\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* **Add spaces inside single line blocks.**\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ avoid\n    function foo () { return true }  // ✓ ok\n  ```\n\n* **Use camelcase when naming variables and functions.**\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ avoid\n    function myFunction () { }     // ✓ ok\n\n    var my_var = 'hello'           // ✗ avoid\n    var myVar = 'hello'            // ✓ ok\n  ```\n\n* **Trailing commas not allowed.**\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ avoid\n    }\n  ```\n\n* **Commas must be placed at the end of the current line.**\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ avoid\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ ok\n    }\n  ```\n\n* **Dot should be on the same line as property.**\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ avoid\n\n    console\n      .log('hello') // ✓ ok\n  ```\n\n* **Files must end with a newline.**\n\n  eslint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **No space between function identifiers and their invocations.**\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ avoid\n  console.log('hello')  // ✓ ok\n  ```\n\n* **Add space between colon and value in key value pairs.**\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ avoid\n  var obj = { 'key' :'value' }     // ✗ avoid\n  var obj = { 'key':'value' }      // ✗ avoid\n  var obj = { 'key': 'value' }     // ✓ ok\n  ```\n\n* **Constructor names must begin with a capital letter.**\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ avoid\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ ok\n  ```\n\n* **Constructor with no arguments must be invoked with parentheses.**\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ avoid\n  var dog = new Animal()  // ✓ ok\n  ```\n\n* **Objects must contain a getter when a setter is defined.**\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ avoid\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ ok\n      return this.name\n    }\n  }\n  ```\n\n* **Constructors of derived classes must call `super`.**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ avoid\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ ok\n    }\n  }\n  ```\n\n* **Use array literals instead of array constructors.**\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ avoid\n  var nums = [1, 2, 3]            // ✓ ok\n  ```\n\n* **Avoid using `arguments.callee` and `arguments.caller`.**\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ avoid\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)\n  }\n  ```\n\n* **Avoid modifying variables of class declarations.**\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ avoid\n  ```\n\n* **Avoid modifying variables declared using `const`.**\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ avoid\n  ```\n\n* **Avoid using constant expressions in conditions (except loops).**\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ avoid\n    // ...\n  }\n\n  if (x === 0) {  // ✓ ok\n    // ...\n  }\n\n  while (true) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **No control characters in regular expressions.**\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ avoid\n  var pattern = /\\x20/    // ✓ ok\n  ```\n\n* **No `debugger` statements.**\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ avoid\n    return a + b\n  }\n  ```\n\n* **No `delete` operator on variables.**\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ avoid\n  ```\n\n* **No duplicate arguments in function definitions.**\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ avoid\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **No duplicate name in class members.**\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ avoid\n  }\n  ```\n\n* **No duplicate keys in object literals.**\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ avoid\n  }\n  ```\n\n* **No duplicate `case` labels in `switch` statements.**\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ avoid\n  }\n  ```\n\n* **Use a single import statement per module.**\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ avoid\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ ok\n  ```\n\n* **No empty character classes in regular expressions.**\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ avoid\n  const myRegex = /^abc[a-z]/   // ✓ ok\n  ```\n\n* **No empty destructuring patterns.**\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ avoid\n  const { a: { b } } = foo      // ✓ ok\n  ```\n\n* **No using `eval()`.**\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ avoid\n  var result = user[propName]             // ✓ ok\n  ```\n\n* **No reassigning exceptions in `catch` clauses.**\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ avoid\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ ok\n  }\n  ```\n\n* **No extending native objects.**\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ avoid\n  ```\n\n* **Avoid unnecessary function binding.**\n\n  eslint: [`no-extra-bind`](http://eslint.org/docs/rules/no-extra-bind)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ avoid\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ ok\n  ```\n\n* **Avoid unnecessary boolean casts.**\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ avoid\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ ok\n    // ...\n  }\n  ```\n\n* **No unnecessary parentheses around function expressions.**\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ avoid\n  const myFunc = function () { }     // ✓ ok\n  ```\n\n* **Use `break` to prevent fallthrough in `switch` cases.**\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ avoid\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **No floating decimals.**\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ avoid\n  const discount = 0.5     // ✓ ok\n  ```\n\n* **Avoid reassigning function declarations.**\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ avoid\n  ```\n\n* **No reassigning read-only global variables.**\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ avoid\n  ```\n\n* **No implied `eval()`.**\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ avoid\n  setTimeout(function () { alert('Hello world') })     // ✓ ok\n  ```\n\n* **No function declarations in nested blocks.**\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ avoid\n  }\n  ```\n\n* **No invalid regular expression strings in  `RegExp` constructors.**\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ avoid\n  RegExp('[a-z]')   // ✓ ok\n  ```\n\n* **No irregular whitespace.**\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ avoid\n  ```\n\n* **No using `__iterator__`.**\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ avoid\n  ```\n\n* **No labels that share a name with an in scope variable.**\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ avoid\n  }\n  ```\n\n* **No label statements.**\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ avoid\n    }\n  ```\n\n* **No unnecessary nested blocks.**\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ avoid\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ ok\n  }\n  ```\n\n* **Avoid mixing spaces and tabs for indentation.**\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **Do not use multiple spaces except for indentation.**\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ avoid\n  const id = 1234       // ✓ ok\n  ```\n\n* **No multiline strings.**\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ avoid\n  ```\n\n* **No `new` without assigning object to a variable.**\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ avoid\n  const character = new Character()   // ✓ ok\n  ```\n\n* **No using the `Function` constructor.**\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ avoid\n  ```\n\n* **No using the `Object` constructor.**\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ avoid\n  ```\n\n* **No using `new require`.**\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ avoid\n  ```\n\n* **No using the `Symbol` constructor.**\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ avoid\n  ```\n\n* **No using primitive wrapper instances.**\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ avoid\n  ```\n\n* **No calling global object properties as functions.**\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ avoid\n  ```\n\n* **No octal literals.**\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ avoid\n  const num = '042'   // ✓ ok\n  ```\n\n* **No octal escape sequences in string literals.**\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ avoid\n  ```\n\n* **Avoid string concatenation when using `__dirname` and `__filename`.**\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ avoid\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ ok\n  ```\n\n* **Avoid using `__proto__`.** Use `getPrototypeOf` instead.\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ avoid\n  const foo = Object.getPrototypeOf(obj)  // ✓ ok\n  ```\n\n* **No redeclaring variables.**\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ avoid\n\n  let name = 'John'\n  name = 'Jane'         // ✓ ok\n  ```\n\n* **Avoid multiple spaces in regular expression literals.**\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ avoid\n\n  const regexp = /test {3}value/  // ✓ ok\n  const regexp = /test value/     // ✓ ok\n  ```\n\n* **Assignments in return statements must be surrounded by parentheses.**\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ avoid\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ ok\n  }\n  ```\n\n* **Avoid assigning a variable to itself**\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ avoid\n  ```\n\n* **Avoid comparing a variable to itself.**\n\n  eslint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ avoid\n  ```\n\n* **Avoid using the comma operator.**\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ avoid\n  ```\n\n* **Restricted names should not be shadowed.**\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ avoid\n  ```\n\n* **Sparse arrays are not allowed.**\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ avoid\n  ```\n\n* **Tabs should not be used**\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rules/no-tabs)\n\n* **Regular strings must not contain template literal placeholders.**\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ avoid\n  const message = `Hello ${name}`   // ✓ ok\n  ```\n\n* **`super()` must be called before using `this`.**\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ avoid\n      super()\n    }\n  }\n  ```\n\n* **Only `throw` an `Error` object.**\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ avoid\n  throw new Error('error')    // ✓ ok\n  ```\n\n* **Whitespace not allowed at end of line.**\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **Initializing to `undefined` is not allowed.**\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ avoid\n\n  let name\n  name = 'value'          // ✓ ok\n  ```\n\n* **No unmodified conditions of loops.**\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **No ternary operators when simpler alternatives exist.**\n\n  eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n  ```js\n  let score = val ? val : 0     // ✗ avoid\n  let score = val || 0          // ✓ ok\n  ```\n\n* **No unreachable code after `return`, `throw`, `continue`, and `break` statements.**\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ avoid\n  }\n  ```\n\n* **No flow control statements in `finally` blocks.**\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ avoid\n  }\n  ```\n\n* **The left operand of relational operators must not be negated.**\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ avoid\n  ```\n\n* **Avoid unnecessary use of `.call()` and `.apply()`.**\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ avoid\n  ```\n\n* **Avoid using unnecessary computed property keys on objects.**\n\n  eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n  ```js\n  const user = { ['name']: 'John Doe' }   // ✗ avoid\n  const user = { name: 'John Doe' }       // ✓ ok\n  ```\n\n* **No unnecessary constructor.**\n\n  eslint: [`no-useless-constructor`](http://eslint.org/docs/rules/no-useless-constructor)\n\n  ```js\n  class Car {\n    constructor () {      // ✗ avoid\n    }\n  }\n  ```\n\n* **No unnecessary use of escape.**\n\n  eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n  ```js\n  let message = 'Hell\\o'  // ✗ avoid\n  ```\n\n* **Renaming import, export, and destructured assignments to the same name is not allowed.**\n\n  eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n  ```js\n  import { config as config } from './config'     // ✗ avoid\n  import { config } from './config'               // ✓ ok\n  ```\n\n* **No whitespace before properties.**\n\n  eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n  ```js\n  user .name      // ✗ avoid\n  user.name       // ✓ ok\n  ```\n\n* **No using `with` statements.**\n\n  eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n  ```js\n  with (val) {...}    // ✗ avoid\n  ```\n\n* **Maintain consistency of newlines between object properties.**\n\n  eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n  ```js\n  const user = {\n    name: 'Jane Doe', age: 30,\n    username: 'jdoe86'            // ✗ avoid\n  }\n\n  const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ ok\n\n  const user = {\n    name: 'Jane Doe',\n    age: 30,\n    username: 'jdoe86'\n  }                                                                 // ✓ ok\n  ```\n\n* **No padding within blocks.**\n\n  eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n  ```js\n  if (user) {\n                              // ✗ avoid\n    const name = getName()\n\n  }\n\n  if (user) {\n    const name = getName()    // ✓ ok\n  }\n  ```\n\n* **No whitespace between spread operators and their expressions.**\n\n  eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n  ```js\n  fn(... args)    // ✗ avoid\n  fn(...args)     // ✓ ok\n  ```\n\n* **Semicolons must have a space after and no space before.**\n\n  eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n  ```js\n  for (let i = 0 ;i < items.length ;i++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **Must have a space before blocks.**\n\n  eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n  ```js\n  if (admin){...}     // ✗ avoid\n  if (admin) {...}    // ✓ ok\n  ```\n\n* **No spaces inside parentheses.**\n\n  eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n  ```js\n  getName( name )     // ✗ avoid\n  getName(name)       // ✓ ok\n  ```\n\n* **Unary operators must have a space after.**\n\n  eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n  ```js\n  typeof!admin        // ✗ avoid\n  typeof !admin        // ✓ ok\n  ```\n\n* **Use spaces inside comments.**\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ avoid\n  // comment          // ✓ ok\n\n  /*comment*/         // ✗ avoid\n  /* comment */       // ✓ ok\n  ```\n\n* **No spacing in template strings.**\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ avoid\n  const message = `Hello, ${name}`      // ✓ ok\n  ```\n\n* **Use `isNaN()` when checking for `NaN`.**\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ avoid\n  if (isNaN(price)) { }       // ✓ ok\n  ```\n\n* **`typeof` must be compared to a valid string.**\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ avoid\n  typeof name === 'undefined'     // ✓ ok\n  ```\n\n* **Immediately Invoked Function Expressions (IIFEs) must be wrapped.**\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ avoid\n\n  const getName = (function () { }())   // ✓ ok\n  const getName = (function () { })()   // ✓ ok\n  ```\n\n* **The `*` in `yield*`expressions must have a space before and after.**\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ avoid\n  yield * increment()   // ✓ ok\n  ```\n\n* **Avoid Yoda conditions.**\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ avoid\n  if (age === 42) { }    // ✓ ok\n  ```\n\n## Semicolons\n\n* No semicolons. (see: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ avoid\n  ```\n\n* Never start a line with `(`, `[`, or `` ` ``. This is the only gotcha with omitting semicolons, and standard protects you from this potential issue.\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ avoid\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ avoid\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ avoid\n  `hello`.indexOf('o')\n  ```\n\n  Note: If you're often writing code like this, you may be trying to be too clever.\n\n  Clever short-hands are discouraged, in favor of clear and readable expressions, whenever\n  possible.\n\n  Instead of this:\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  This is strongly preferred:\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## Helpful reading\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### And a helpful video:\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\nAll popular code minifiers in use today use AST-based minification, so they can\nhandle semicolon-less JavaScript with no issues (since semicolons are not required\nin JavaScript).\n\n##### Excerpt from *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]*:\n\n> [Relying on automatic semicolon insertion] is quite safe, and perfectly valid JS that every browser understands. Closure compiler, yuicompressor, packer, and jsmin all can properly minify it. There is no performance impact anywhere.\n>\n> I am sorry that, instead of educating you, the leaders in this language community have given you lies and fear.  That was shameful. I recommend learning how statements in JS are actually terminated (and in which cases they are not terminated), so that you can write code that you find beautiful.\n>\n> In general, `\\n` ends a statement unless:\n>   1. The statement has an unclosed paren, array literal, or object literal or ends in some\n>      other way that is not a valid way to end a statement. (For instance, ending with `.`\n>      or `,`.)\n>   2. The line is `--` or `++` (in which case it will decrement/increment the next token.)\n>   3. It is a `for()`, `while()`, `do`, `if()`, or `else`, and there is no `{`\n>   4. The next line starts with `[`, `(`, `+`, `*`, `/`, `-`, `,`, `.`, or some other\n>      binary operator that can only be found between two tokens in a single expression.\n>\n> The first is pretty obvious. Even JSLint is ok with `\\n` chars in JSON and parenthesized constructs, and with `var` statements that span multiple lines ending in `,`.\n>\n> The second is super weird. I’ve never seen a case (outside of these sorts of conversations) where you’d want to do write `i\\n++\\nj`, but, point of fact, that’s parsed as `i; ++j`, not `i++; j`.\n>\n> The third is well understood, if generally despised. `if (x)\\ny()` is equivalent to `if (x) { y() }`. The construct doesn’t end until it reaches either a block, or a statement.\n>\n> `;` is a valid JavaScript statement, so `if(x);` is equivalent to `if(x){}` or, “If x, do nothing.” This is more commonly applied to loops where the loop check also is the update function. Unusual, but not unheard of.\n>\n> The fourth is generally the fud-inducing “oh noes, you need semicolons!” case. But, as it turns out, it’s quite easy to *prefix* those lines with semicolons if you don’t mean them to be continuations of the previous line. For example, instead of this:\n>\n> ```js\n> foo();\n> [1,2,3].forEach(bar);\n> ```\n>\n> you could do this:\n>\n> ```js\n> foo()\n> ;[1,2,3].forEach(bar)\n> ```\n>\n> The advantage is that the prefixes are easier to notice, once you are accustomed to never seeing lines starting with `(` or `[` without semis.\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-esla.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\nEsto es un TL;DR (muy largo, no lo leí) de reglas JavaScript [standard](https://github.com/standard/standard).\n\nLa mejor manera de aprender acerca de `standard` es instalarlo darle una prueba en tu código.\n\n## Reglas\n\n* **Usar 2 espacios** como sangría.\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* **Usar comillas simples en cadenas de texto** con la excepcion para evitar escapado de texto\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there') // comillas simples\n  $(\"<div class='box'>\") // escapado de texto\n  ```\n\n* **No dejar variables sin usar.**\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ evitar\n  }\n  ```\n\n* **Espacio después de las palabras claves.**\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ evitar\n  ```\n\n* **Agregar un espacio antes de los paréntesis de la función declarada**\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ evitar\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ evitar\n  ```\n\n* **Usar siempre** `===` en vez de `==`.<br>\n  Exception: `obj == null` is allowed to check for `null || undefined`.\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ evitar\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ evitar\n  ```\n\n* **Operadores infijos** deben ser espaciados.\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ evitar\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **Comas deben tener un espacio** despues de ellas.\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ evitar\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **Mantener declaracion else** en la misma linea que sus llaves.\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ evitar\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **Para declaraciones if multi-linea** debe usar llaves.\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ evitar\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **Siempre gestionar** el parámetro `err` en las funciones.\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ evitar\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **En las variables globales usar el sufijo** `window.`.<br>\n  Con la excepcion de: `document`, `console` y `navigator`.\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **Múltiples líneas en blanco no está permitido.**\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ evitar\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **Para el operador ternario** en multi-linea, colocar el `?` y `:` en su propia nueva linea.\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ evitar\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **Para declaraciones var,** escribir solo una asignación en cada declaracion\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ evitar\n  var silent = true, verbose = true\n\n  // ✗ evitar\n  var silent = true,\n      verbose = true\n  ```\n\n* **Envolver asignaciones condicionales** con paréntesis adicionales. Esto hace claro que la intención de la expresión es una asignación y no un error de igualdad (`===`).\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ evitar\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* **Agregar espacios dentro de bloques de una sola linea.**\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ evitar\n    function foo () { return true }  // ✓ ok\n  ```\n\n* **Usar camelcase al nombre variables y funciones.**\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ avoid\n    function myFunction () { }     // ✓ ok\n\n    var my_var = 'hello'           // ✗ avoid\n    var myVar = 'hello'            // ✓ ok\n  ```\n\n* **Comas adicionales no esta permitido.**\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ avoid\n    }\n  ```\n\n* **Comas deben colocarse al final de la linea actual.**\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ avoid\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ ok\n    }\n  ```\n\n* **El Puto debe ir en la misma linea que la propiedad.**\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ avoid\n\n    console\n      .log('hello') // ✓ ok\n  ```\n\n* **Archivos deben terminar con una nueva linea.**\n\n  elint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **Sin espacios entre el identificador de la funcion y su invocación.**\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ avoid\n  console.log('hello')  // ✓ ok\n  ```\n\n* **Agregar espacio entre dos puntos (colon) y pares clave valor.**\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ avoid\n  var obj = { 'key' :'value' }     // ✗ avoid\n  var obj = { 'key':'value' }      // ✗ avoid\n  var obj = { 'key': 'value' }     // ✓ ok\n  ```\n\n* **Nombres de Constructor deben empezar con letra Mayúscula.**\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ avoid\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ ok\n  ```\n\n* **Constructor sin argumentos debe ser invocado con paréntesis.**\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ avoid\n  var dog = new Animal()  // ✓ ok\n  ```\n\n* **Objetos deben contener un getter cuando se ha definido un setter.**\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ avoid\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ ok\n      return this.name\n    }\n  }\n  ```\n\n* **Constructores de clases derivadas deben llamar `super`.**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ avoid\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ ok\n    }\n  }\n  ```\n\n* **Usar array literales en vez de array constructor.**\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ avoid\n  var nums = [1, 2, 3]            // ✓ ok\n  ```\n\n* **Evitar usar arguments.calle y arguments.caller.**\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ avoid\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)\n  }\n  ```\n\n* **Evitar modificar variables que fueron declaradas como clase.**\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ avoid\n  ```\n\n* **Evitar modifidicar variables declaracas usando `const`.**\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ avoid\n  ```\n\n* **Evitar usar expresiones constantes en condicionales (a excepcion de búcles).**\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ avoid\n    // ...\n  }\n\n  if (x === 0) {  // ✓ ok\n    // ...\n  }\n\n  while (true) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **Evitar carácteres de control de expresiones regulares.**\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ avoid\n  var pattern = /\\x20/    // ✓ ok\n  ```\n\n* **Evitar sentencias `debugger`.**\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ avoid\n    return a + b\n  }\n  ```\n* **Evitar operador delete en variables.**\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ avoid\n  ```\n\n* **Evitar argumentos duplicados en definicion de funciones.**\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ avoid\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **Evitar duplicados en miembros de clase.**\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ avoid\n  }\n  ```\n\n* **Evitar duplicado de claves en objetos literales.**\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ avoid\n  }\n  ```\n\n* **Evitar dublicados de etiqueta `case` en sentencias `switch`.**\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ avoid\n  }\n  ```\n\n* **Usar una unica sentencia `import` por modulo.**\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ avoid\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ ok\n  ```\n\n* **Evitar classes de carácteres vacia en expresiones regulares.**\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ avoid\n  const myRegex = /^abc[a-z]/   // ✓ ok\n  ```\n\n* **Evitar pratones de destructuración vacios.**\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ avoid\n  const { a: { b } } = foo      // ✓ ok\n  ```\n\n* **Evitar uso de `eval()`.**\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ avoid\n  var result = user[propName]             // ✓ ok\n  ```\n\n* **Evitar reasignar excepciones en clausas `catch`.**\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ avoid\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ ok\n  }\n  ```\n\n* **Evitar extender objetos nativos**\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ avoid\n  ```\n\n* **Evitar uso innecesario de bind en funciones.**\n\n  eslint: [`no-extra-bind`](http://eslint.org/docs/rules/no-extra-bind)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ avoid\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ ok\n  ```\n\n* **Evitar hacer cast a booleanos.**\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ avoid\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ ok\n    // ...\n  }\n  ```\n\n* **Evitar paréntesis inncesario alrededor de expresión de funciones.**\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ avoid\n  const myFunc = function () { }     // ✓ ok\n  ```\n\n* **Usar `break` para evitar pasar de largo `fallthrough` en casos `switch`.**\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ avoid\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **Evitar decimales flotantes.**\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ avoid\n  const discount = 0.5     // ✓ ok\n  ```\n\n* **Evitar reasignación de declaraciones de funciones.**\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ avoid\n  ```\n\n* **Evitar reasignación de variables globales de solo-lectura.**\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ avoid\n  ```\n\n* **Evitar usar eval() implícito.**\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ avoid\n  setTimeout(function () { alert('Hello world') })     // ✓ ok\n  ```\n\n* **Evitar declaracion de funciones en bloques anidados.**\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ avoid\n  }\n  ```\n\n* **Evitar cadenas de texto expresiones regulares invalidas en costructores `RegExp`.**\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ avoid\n  RegExp('[a-z]')   // ✓ ok\n  ```\n\n* **Evitar espacios en blanco irregulares.**\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ avoid\n  ```\n\n* **Evitar uso de `__iterator__`.**\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ avoid\n  ```\n\n* **Evitar etiquetas que comparten el nombre de una variable en scope.**\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ avoid\n  }\n  ```\n\n* **Evitar sentencias etiquetadas.**\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ avoid\n    }\n  ```\n\n* **Evitar bloques anidados innecesarios**\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ avoid\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ ok\n  }\n  ```\n\n* **Evitar mezclar espacios y tabulaciones para sangría**\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **Evitar uso de espacios en blanco multiples a excepcion de sangría**\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ avoid\n  const id = 1234       // ✓ ok\n  ```\n\n* **Evitar cadenas de texto multi-linea**\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ avoid\n  ```\n\n* **Evitar usar `new` sin asignar a el objecto a una variable**\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ avoid\n  const character = new Character()   // ✓ ok\n  ```\n\n* **Evitar uso de constructor `Function`.**\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ avoid\n  ```\n\n* **Evitar uso de constructor `Object`**\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ avoid\n  ```\n\n* **Evitar uso de `new require`.**\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ avoid\n  ```\n\n* **Evitar uso de constructor `Symbol`.**\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ avoid\n  ```\n\n* **Evitar envolturas de instancias primitivas.**\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ avoid\n  ```\n\n* **Evitar llamar propiedades de objetos globles como funciones.**\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ avoid\n  ```\n\n* **Evitar uso de octal literal.**\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ avoid\n  const num = '042'   // ✓ ok\n  ```\n\n* **Evitar escapado de secuencia octal en cadena de texto literal.**\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ avoid\n  ```\n\n* **Evitar concatenacion de cadena de texto para `__dirname` y `__filename`.**\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ avoid\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ ok\n  ```\n\n* **Evitar uso de `__proto__`.** Use `getPrototypeOf` en su lugar.\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ avoid\n  const foo = Object.getPrototypeOf(obj)  // ✓ ok\n  ```\n\n* **Evitar re-reclaración de variables.**\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ avoid\n\n  let name = 'John'\n  name = 'Jane'         // ✓ ok\n  ```\n\n* **Evitar multiples espacios en expresiones regulares.**\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ avoid\n\n  const regexp = /test {3}value/  // ✓ ok\n  const regexp = /test value/     // ✓ ok\n  ```\n\n* **Asignación de variables en el retorno de funciones debe estar rodeado de paréntesis.**\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ avoid\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ ok\n  }\n  ```\n\n* **Evitar asignar una variable a si misma.**\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ avoid\n  ```\n\n* **Evitar comparar una variable consigo mismo.**\n\n  esint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ avoid\n  ```\n\n* **Evitar uso de secuencia separado po comma.**\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ avoid\n  ```\n\n* **Nombres restringidos no deben ser cambiados (shadowed).**\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ avoid\n  ```\n\n* **Array dispersos no estan permitidos.**\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ avoid\n  ```\n\n* **No se deben usar Tabulaciones.**\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rule\n\n* **Cadenas de textos regulares no deben contener placeholders de plantillas literales.**\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ avoid\n  const message = `Hello ${name}`   // ✓ ok\n  ```\n\n* **`super()` debe ser llamado inmediatamente antes de usar `this`.**\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ avoid\n      super()\n    }\n  }\n  ```\n\n* **Solo se puede lanzar (`throw`) un objecto `Error`.**\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ avoid\n  throw new Error('error')    // ✓ ok\n  ```\n\n* **Espacios en blanco despues del final linea no estan permitidos .**\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **Inicializar una variable con `undefined` no esta permitido.**\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ avoid\n\n  let name\n  name = 'value'          // ✓ ok\n  ```\n\n* **Búcles no modificados no estan permitidos.**\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n * **Evitar usar operador ternario cuando existe una alternative mas simple.**\n\n   eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n   ```js\n   let score = val ? val : 0     // ✗ avoid\n   let score = val || 0          // ✓ ok\n   ```\n\n* **Evitar dejar código inalcanzable despues de sentencias `return`, `throw`, `continue`, y `break` .**\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ avoid\n  }\n  ```\n\n* **Evitar sentencias de control de flujo en bloques `finally`.**\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ avoid\n  }\n  ```\n\n* **El operando izquierdo en operaciones relacionales no debe ser negado.**\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ avoid\n  ```\n\n* **Evitar uso inncesario de `.call()` y `.apply()`.**\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ avoid\n  ```\n\n * **Evitar usar constructores innecesarios.**\n\n   eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n   ```js\n   const user = { ['name']: 'John Doe' }   // ✗ avoid\n   const user = { name: 'John Doe' }       // ✓ ok\n   ```\n\n * **Evitar uso inncesario de escapado de text.**\n\n   eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n   ```js\n   let message = 'Hell\\o'  // ✗ avoid\n   ```\n\n * **Renombrar import, export o destructuración con el mismo nombre  no esta permitido**\n\n   eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n   ```js\n   import { config as config } from './config'     // ✗ avoid\n   import { config } from './config'               // ✓ ok\n   ```\n\n * **Evitar espacios en blanco antes de una propiedad.**\n\n   eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n   ```js\n   user .name      // ✗ avoid\n   user.name       // ✓ ok\n   ```\n\n * **Evitar uso de sentencia `with`.**\n\n   eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n   ```js\n   with (val) {...}    // ✗ avoid\n   ```\n\n * **Mantener consistencia de nuevas lineas entre las propiedades de un objecto .**\n\n   eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n   ```js\n   const user = {\n     name: 'Jane Doe', age: 30,\n     username: 'jdoe86'            // ✗ avoid\n   }\n\n   const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ ok\n\n   const user = {\n     name: 'Jane Doe',\n     age: 30,\n     username: 'jdoe86'\n   }                                                                 // ✓ ok\n   ```\n\n * **Evitar espacios de relleno entre bloques.**\n\n   eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n   ```js\n   if (user) {\n                               // ✗ avoid\n     const name = getName()\n\n   }\n\n   if (user) {\n     const name = getName()    // ✓ ok\n   }\n   ```\n\n * **Evitar espacios en blanco entre el operador de propagacion y la expresion**\n\n   eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n   ```js\n   fn(... args)    // ✗ avoid\n   fn(...args)     // ✓ ok\n   ```\n\n * **Punto y coma (semicolon) debe tener un espacio en blanco despues y no antes.**\n\n   eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n   ```js\n   for (let i = 0 ;i < items.length ;i++) {...}    // ✗ avoid\n   for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n   ```\n\n * **Mantener espacio despues de los bloques.**\n\n   eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n   ```js\n   if (admin){...}     // ✗ avoid\n   if (admin) {...}    // ✓ ok\n   ```\n\n * **Evitar espacios en blanco entre paréntesis.**\n\n   eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n   ```js\n   getName( name )     // ✗ avoid\n   getName(name)       // ✓ ok\n   ```\n\n * **Operador unario debe tener espacio en blanco despues.**\n\n   eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n   ```js\n   typeof!admin        // ✗ avoid\n   typeof !admin        // ✓ ok\n   ```\n\n * **Usar espacios dentro de comentarios.**\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ avoid\n  // comment          // ✓ ok\n\n  /*comment*/         // ✗ avoid\n  /* comment */       // ✓ ok\n  ```\n\n * **Evitar espacios en blanco dentro de placeholders de plantillas literales.**\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ avoid\n  const message = `Hello, ${name}`      // ✓ ok\n  ```\n\n* **Usar `isNaN()` cuando se desea chequear `NaN`.**\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ avoid\n  if (isNaN(price)) { }       // ✓ ok\n  ```\n\n* **`typeof` debe ser comparado con una cadena de texto valida.**\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ avoid\n  typeof name === 'undefined'     // ✓ ok\n  ```\n\n* **Expressiones Funciones inmediatamente invocadas (IIFEs) deben ser envueltas en paréntesis.**\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ avoid\n\n  const getName = (function () { }())   // ✓ ok\n  const getName = (function () { })()   // ✓ ok\n  ```\n\n* **El `*` en expresiones `yield*` deben tener un espacio en blanco antes y despues.**\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ avoid\n  yield * increment()   // ✓ ok\n  ```\n\n* **Evitar condiciones Yoda.**\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ avoid\n  if (age === 42) { }    // ✓ ok\n  ```\n\n## Puntos y comas (semicolons)\n\n* Sin puntos y comas. (see: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ evitar\n  ```\n\n* Nunca empezar una linea con `(`, `[`, o `` ` ``. Este es el único problema cuando se omiten los puntos y comas, y `standard` te protege de problemas potenciales\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ evitar\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ evitar\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ evitar\n  `hello`.indexOf('o')\n  ```\n\n  Nota: si te encuentras a menudo escribiendo código de esta manera,\n  quizás estás tratando de ser muy listo.\n\n  esta taquigrafía es rechazada, en favor a expresiones claras y legibles, cuando sea posible.\n\n  En vez de esto:\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  Se prefiere esto:\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## Lectura de ayuda con referencia hacia los puntos y comas\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### También un video:\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\nLos minificadores de código populares hoy en día están basados en AST\n(Árbol abstracto de sintaxis), de manera que pueden gestionar JavaScript\nsin puntos y comas sin problemas (puntos y comas no son requeridos en JavaScript).\n\n##### Extrácto de *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]*:\n\n[Depender de ASI (Inserción automática de puntos y comas)] es bastante seguro, y perfectamente válido que cualquier navegador web entiende, Compilador Closure, yuicompressor, packer y jsmin todos pueden perfectamente minificarlo. No existe impacto en el performance.\n\nLamento que, en vez de educarlos, sus líderes en este lenguaje les han dado mentiras y miedos. Que sinverguenza. Yo te recomiendo aprender como las declaraciones realmente terminan en JavaScript (y en cuales casos no terminan), de esta manera tu puedes escribir código que encuentres hermoso.\n\nEn general, `\\n` termina una declaración a menos que\nLa declaración tiene sin cerrar un paréntesis, array literal, o objeto literal o termina de una manera no válida (por instancia, terminar con `.` o `,`)\nLa línea es `--` o `++` (en este caso esto decrementa/incrementa el proximo token)\nEs un `for()`, `while()`, `do`, `if()`, o `else`, no exista una llave `{`\nLa próxima línea empieza con `[`, `(`, `+`, `*`, `/`, `-`, `,`, `.` o algún operador binario que solo se encuentra entre dos tokens en un sola expresión\n\nEl primero es bastante obvio. Incluso JSLint no tiene problemas con caracteres `\\n` en JSON y constructores entre paréntesis, y con declaraciones `var` que lapsan múltiples líneas terminando con `,`.\n\nEl segundo es super raro. Yo nunca he visto un caso (fuera de este tipo de conversaciones) donde quisieras escribir `i\\n++\\nj`, pero, de hecho eso es analizado como `i; ++j;`y  no `j++; j`.\n\nEl tercero es bien entendido, es generalmente despreciado. `if (x)\\ny()` es equivalente a `if (x) { y() }`. El constructor no termina hasta que alcanza un bloque o una declaración.\n\n`;` es una declaración JavaScript válida, entonces `if(x);` es el equivalente a `if(x){}` o “Sí x, hacer nada” Esto es más comúnmente aplicado a bucles donde el bucle también chequea si la función actualiza, No es usual, pero existe.\n\nEl cuarto es generalmente el caso inducido “Oh no, necesitas puntos y comas”. Pero pasa que es bastante simple darle el prefijo a esas linas con puntos y comas, si no quieres que sean la continuacion de la linea previa. Por ejemplo, en vez de esto:\n\n```js\nfoo();\n[1,2,3].forEach(bar);\n```\n\npodrias hacer esto:\n\n```js\nfoo()\n;[1,2,3].forEach(bar)\n```\n\nLa ventaja es que los prefijos son fáciles de notar, una vez te acostumbras a ver líneas que no empiecen con `(` o `[` sin puntos y comas.\n\n*Fin the la cita de \"An Open Letter to JavaScript Leaders Regarding Semicolons\".*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-iteu.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\nQuesto è un TL;DR (troppo lungo, non ho letto) delle regole JavaScript di  [standard](https://github.com/standard/standard).\n\nIl modo migliore per imparare `standard` è quello di installarlo e provarlo sul tuo codice.\n\n## Regole\n\n* **Usa due spazi** per indentare.\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* **Usa il singolo apostrofo per le stringhe** tranne per evitare l'escaping.\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **Niente variabili inutilizzate.**\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ evita\n  }\n  ```\n\n* **Aggiungi uno spazio dopo le parole chiave.**\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ evita\n  ```\n* **Aggiungi uno spazio prima delle parenti di una dichiarazione di una funzione.**\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ evita\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ evita\n  ```\n\n* **Usa sempree** `===` invece di `==`.<br>\n  Eccezione: `obj == null` è consentito per controllare `null || undefined`.\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ evita\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ evita\n  ```\n\n* **Operatori infisso** necessitano sempre di uno spazio.\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ evita\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **Le virgole devono avere uno spazio** dopo di loro.\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ evita\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **Tieni gli else** sulla stessa linea della parentesi graffa.\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ evita\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **Per dichiarazioni if su più righe,** utilizza le parentesi graffe.\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ evita\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **Gestisci sempre l'oggetto** `err` come parametro di funzione.\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ evita\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **Usa il prefisso per le variabili gloabli** con `window.`.<br>\n  Eccezioni sono: `document`, `console` e `navigator`.\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **Non sono consentite più di una riga vuota.**\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ evita\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **Per l'operatore ternario** su più di una riga, piazza `?` e `:` nelle righe che gli appartengono.\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ evita\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **Per l'utilizzo del var,** ogni assegnazione deve avere la sua definizione\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ evita\n  var silent = true, verbose = true\n\n  // ✗ evita\n  var silent = true,\n      verbose = true\n  ```\n\n* **Circonda gli assegnatori condizionali** con parentesi aggiuntive. Questo assicura che ci sia l'espressione è intenzionalmente un assegnamento (`=`) invece di un errore di scrittura (`===`).\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ evita\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* **Aggiungi degli spazie all'interno di blocchi su una singola riga.**\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ evita\n    function foo () { return true }  // ✓ ok\n  ```\n\n* **Utilizza il camelcase per i nomi delle variabili e funzioni.**\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ evita\n    function myFunction () { }     // ✓ ok\n\n    var my_var = 'hello'           // ✗ evita\n    var myVar = 'hello'            // ✓ ok\n  ```\n\n* **I trailing comma non sono ammessi.**\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ evita\n    }\n  ```\n\n* **The virgole devono essere messe alla fine della riga corrente**\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ avoid\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ ok\n    }\n  ```\n\n* **Il punto deve essere sulla stessa linea della proprietà.**\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ avoid\n\n    console\n      .log('hello') // ✓ ok\n  ```\n\n* **I file devono terminare con una nuova linea.**\n\n  eslint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **No spazi tra la definizione di una funzione e la sua invocazione**\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ avoid\n  console.log('hello')  // ✓ ok\n  ```\n\n* **Aggiungi uno spazio tra i due punti e il valore della chiave all'interno di un oggetto.**\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ avoid\n  var obj = { 'key' :'value' }     // ✗ avoid\n  var obj = { 'key':'value' }      // ✗ avoid\n  var obj = { 'key': 'value' }     // ✓ ok\n  ```\n\n* **I nomi dei costruttori devono iniziare con la lettera maiuscola**\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ avoid\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ ok\n  ```\n\n* **I costruttori senza argomenti devono essere invocati con le parentesi.**\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ avoid\n  var dog = new Animal()  // ✓ ok\n  ```\n\n* **Gli oggetti devono un getter quando un settere viene definito.**\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ avoid\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ ok\n      return this.name\n    }\n  }\n  ```\n\n* **I costruttori di classi derivate devono chiamare `super`.**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ avoid\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ ok\n    }\n  }\n  ```\n\n* **Usa gli array literals invece dei costruttori.**\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ avoid\n  var nums = [1, 2, 3]            // ✓ ok\n  ```\n\n* **Evita l'utilizzo di `arguments.callee` e `arguments.caller`.**\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ avoid\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)\n  }\n  ```\n* **Non è possibile cambiare il nome delle classi.**\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ avoid\n  ```\n\n* **Evita di modificare il varole di una variabile dichiarata usando `const`.**\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ avoid\n  ```\n\n* **Evita l'uso delle espressioni costanti all'interno delle condizioni (eccezione fatta per i cicli).**\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ avoid\n    // ...\n  }\n\n  if (x === 0) {  // ✓ ok\n    // ...\n  }\n\n  while (true) {  // ✓ ok\n    // ...\n  }\n  ```\n* **No controllo dei caratteri nelle espressioni regolari.**\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ avoid\n  var pattern = /\\x20/    // ✓ ok\n  ```\n\n* **No `debugger` nel codice.**\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ avoid\n    return a + b\n  }\n  ```\n\n* **Non usare `delete` sulle variabili.**\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ avoid\n  ```\n\n* **No argomenti doppi all'interno della definizione di una funzione.**\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ avoid\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **No nomi doppi all'interno di una classe.**\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ avoid\n  }\n  ```\n\n* **Non è possibile dichiarare chiavi doppie degli oggetti literals.**\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ avoid\n  }\n  ```\n\n* **Non è possibile dichiarare due `case` che controllano lo stesso valore all'interno di uno `switch`**\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ avoid\n  }\n  ```\n\n* **Utilizza un solo import per module.**\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ avoid\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ ok\n  ```\n\n* **No caratteri vuoti all'iterno delle espressioni regolari.**\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ avoid\n  const myRegex = /^abc[a-z]/   // ✓ ok\n  ```\n\n* **Non è possibile usare il destructuring vuoto**\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ avoid\n  const { a: { b } } = foo      // ✓ ok\n  ```\n\n* **No all'uso di `eval()`.**\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ avoid\n  var result = user[propName]             // ✓ ok\n  ```\n\n* **No all reassegnamento delle eccezioni all'interno di blocchi `catch`.**\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ avoid\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ ok\n  }\n  ```\n\n* **Non è possibile estendere oggetti nativi.**\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ avoid\n  ```\n\n* **Evita il binding non necessari.**\n\n  eslint: [`no-extra-bind`](http://eslint.org/docs/rules/no-extra-bind)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ avoid\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ ok\n  ```\n\n* **Evita di effettuare il cast di booleani che non sono necessari.**\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ avoid\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ ok\n    // ...\n  }\n  ```\n\n* **No parentesi non necessarie intorno alle funzioni.**\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ avoid\n  const myFunc = function () { }     // ✓ ok\n  ```\n\n* **Utilizza il `break` per evitare l'esecuzioni dei successivi `case` all'interno di un blocco `switch`.**\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ avoid\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **No ai decimali con la virgola mobile.**\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ avoid\n  const discount = 0.5     // ✓ ok\n  ```\n\n* **Evita la riassegnazione di una funzione dichiarata.**\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ avoid\n  ```\n\n* **Evita la riassegnazione di oggetti che possono essere solo letti.**\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ avoid\n  ```\n\n* **No agli `eval()` sottointesi.**\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ avoid\n  setTimeout(function () { alert('Hello world') })     // ✓ ok\n  ```\n\n* **No alla dichiarazione di funzioni all'interno di blocchi innestati.**\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ avoid\n  }\n  ```\n\n* **No a stringhe di expressioni regolari invalide all'interno dei costruttori `RegExp`.**\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ avoid\n  RegExp('[a-z]')   // ✓ ok\n  ```\n\n* **No a spazi irregolari.**\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ avoid\n  ```\n\n* **No all'uso di `__iterator__`.**\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ avoid\n  ```\n\n* **No a etichette che condividono lo stesso nome di una variabile all'interno dello stesso scope.**\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ avoid\n  }\n  ```\n\n* **No al blocco label.**\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ avoid\n    }\n  ```\n\n* **No a blocchi non necessari.**\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ avoid\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ ok\n  }\n  ```\n\n* **Evita di mixare spazi e tab per indentare.**\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **Non usare spazi multipli per indentare.**\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ avoid\n  const id = 1234       // ✓ ok\n  ```\n\n* **No a stringhe su più linee.**\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ avoid\n  ```\n\n* **No all'uso del `new` senza l'assegnazione ad una variabile.**\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ avoid\n  const character = new Character()   // ✓ ok\n  ```\n\n* **No all'uso del costruttore `Function`.**\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ avoid\n  ```\n\n* **No all'uso del costruttore `Object`.**\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ avoid\n  ```\n\n* **No all'uso di `new require`.**\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ avoid\n  ```\n\n* **No all'uso del costruttore `Symbol`.**\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ avoid\n  ```\n\n* **No all'uso di istanze di primitive.**\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ avoid\n  ```\n\n* **Non chiamare le proprietà di oggetti globali come funzioni.**\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ avoid\n  ```\n\n* **No agli ottali literals.**\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ avoid\n  const num = '042'   // ✓ ok\n  ```\n\n* **No all'escape di sequenze di ottali nelle stringhe letterali.**\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ avoid\n  ```\n\n* **Evita la concatenazione di strighe quando si usano `__dirname` e `__filename`.**\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ avoid\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ ok\n  ```\n* **Evita l'uso di `__proto__`.** Usa invece `getPrototypeOf`.\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ avoid\n  const foo = Object.getPrototypeOf(obj)  // ✓ ok\n  ```\n\n* **No alla ridichiarazione di variabili.**\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ avoid\n\n  let name = 'John'\n  name = 'Jane'         // ✓ ok\n  ```\n\n* **Evita spazi multipli all'interno di espressioni regolari literals.**\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ avoid\n\n  const regexp = /test {3}value/  // ✓ ok\n  const regexp = /test value/     // ✓ ok\n  ```\n\n* **Gli assegnamenti nei blocchi `return` devono essere circondati da parentesi .**\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ avoid\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ ok\n  }\n  ```\n\n* **Evita di assegnare una variabile a se stessa**\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ avoid\n  ```\n\n* **Evita di confrontare una variabile con se stessa.**\n\n  eslint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ avoid\n  ```\n\n* **Evita l'uso della virgola come operatore.**\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ avoid\n  ```\n\n* **Nomi protetti non possono essere reassegnati (shadowing).**\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ avoid\n  ```\n\n* **Array sparsi non sono consentiti.**\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ avoid\n  ```\n\n* **I tab non dovrebbero essere utilizzati**\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rules/no-tabs)\n\n* **Strighe regolari non devono contenere i placeholders propri dei template literal.**\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ avoid\n  const message = `Hello ${name}`   // ✓ ok\n  ```\n\n* **`super()` deve essere chiamato prima di `this`.**\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ avoid\n      super()\n    }\n  }\n  ```\n\n* **Puoi usare `throw` solo su un oggetto `Error`.**\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ avoid\n  throw new Error('error')    // ✓ ok\n  ```\n\n* **Spazi bianchi banditi alla fine di una linea.**\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **Inizializzare con `undefined` non è consentito.**\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ avoid\n\n  let name\n  name = 'value'          // ✓ ok\n  ```\n\n* **No alla non-modifica delle condizioni all'interno dei cicli.**\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **No all'uso dell'operatore ternario quando esiste una alternativa migliore.**\n\n  eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n  ```js\n  let score = val ? val : 0     // ✗ avoid\n  let score = val || 0          // ✓ ok\n  ```\n\n* **No a codice non eseguibile dopo l'uso di `return`, `throw`, `continue`, e `break`.**\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ avoid\n  }\n  ```\n\n* **No a controlli di flusso all'interno di blocchi `finally`.**\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ avoid\n  }\n  ```\n\n* **L'operando sinistro di una operazione relazionale non può essere negato.**\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ avoid\n  ```\n\n* **Evita l'uso non necessario di `.call()` e `.apply()`.**\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ avoid\n  ```\n\n* **Evita l'uso di una non necessario computed property all'interno di una chiave di un oggetto**\n\n  eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n  ```js\n  const user = { ['name']: 'John Doe' }   // ✗ avoid\n  const user = { name: 'John Doe' }       // ✓ ok\n  ```\n\n* **No all'uso non necessario di costruttori.**\n\n  eslint: [`no-useless-constructor`](http://eslint.org/docs/rules/no-useless-constructor)\n\n  ```js\n  class Car {\n    constructor () {      // ✗ avoid\n    }\n  }\n  ```\n\n* **No all'uso non necessario degli escape.**\n\n  eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n  ```js\n  let message = 'Hell\\o'  // ✗ avoid\n  ```\n\n* **Rinominare l'assegnamento di import, export, e destrutturazione (destructuring) usano lo stesso nome non è consentito.**\n\n  eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n  ```js\n  import { config as config } from './config'     // ✗ avoid\n  import { config } from './config'               // ✓ ok\n  ```\n\n* **No spazi prima di una proprietà**\n\n  eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n  ```js\n  user .name      // ✗ avoid\n  user.name       // ✓ ok\n  ```\n\n* **No all'uso di `with`.**\n\n  eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n  ```js\n  with (val) {...}    // ✗ avoid\n  ```\n\n* **Mantere consistenza di nuove righe all'interno delle proprietà di un oggetto.**\n\n  eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n  ```js\n  const user = {\n    name: 'Jane Doe', age: 30,\n    username: 'jdoe86'            // ✗ avoid\n  }\n\n  const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ ok\n\n  const user = {\n    name: 'Jane Doe',\n    age: 30,\n    username: 'jdoe86'\n  }                                                                 // ✓ ok\n  ```\n\n* **No padding all'interno dei blocchi.**\n\n  eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n  ```js\n  if (user) {\n                              // ✗ avoid\n    const name = getName()\n\n  }\n\n  if (user) {\n    const name = getName()    // ✓ ok\n  }\n  ```\n\n* **No spazi tra l'operatore spread e la loro espressione.**\n\n  eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n  ```js\n  fn(... args)    // ✗ avoid\n  fn(...args)     // ✓ ok\n  ```\n\n* **Le virgole devono avere uno spazio dopo e non prima.**\n\n  eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n  ```js\n  for (let i = 0 ;i < items.length ;i++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **Avere uno spazio prima dei blocchi.**\n\n  eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n  ```js\n  if (admin){...}     // ✗ avoid\n  if (admin) {...}    // ✓ ok\n  ```\n\n* **No spazi all'interno delle parentesi**\n\n  eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n  ```js\n  getName( name )     // ✗ avoid\n  getName(name)       // ✓ ok\n  ```\n\n* **Uso dello spazio dopo l'uso di un operatore unario.**\n\n  eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n  ```js\n  typeof!admin        // ✗ avoid\n  typeof !admin        // ✓ ok\n  ```\n\n* **Usa gli spazi dentro i commenti.**\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ avoid\n  // comment          // ✓ ok\n\n  /*comment*/         // ✗ avoid\n  /* comment */       // ✓ ok\n  ```\n\n* **No spazi dentro le strighe template.**\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ avoid\n  const message = `Hello, ${name}`      // ✓ ok\n  ```\n\n* **Usa `IsNaN()` quando controlli `NaN`.**\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ avoid\n  if (isNaN(price)) { }       // ✓ ok\n  ```\n\n* **`typeof` deve essere comparato con una stringa valida.**\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ avoid\n  typeof name === 'undefined'     // ✓ ok\n  ```\n\n* **Espressioni di funzioni immediatamente invocate (IIFEs - Immediately Invoked Function Expressions) devono essere circondate da parentesi.**\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ avoid\n\n  const getName = (function () { }())   // ✓ ok\n  const getName = (function () { })()   // ✓ ok\n  ```\n\n* **Mettere uno spazio prima e dopo `*` dentro le espressioni `yield*` .**\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ avoid\n  yield * increment()   // ✓ ok\n  ```\n\n* **Evitare condizioni Yoda.**\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ avoid\n  if (age === 42) { }    // ✓ ok\n  ```\n\n\n## Semicolons\n\n* No punti e virgola (semicolons). (see: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ avoid\n  ```\n\n* Mai iniziare una linea con `(`, `[`, o `` ` ``. Questo è l'unico trucchetto che permette di omettere i punti e virgola. E `standard` ti protegge da potenziali errori.\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ avoid\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ avoid\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ avoid\n  `hello`.indexOf('o')\n  ```\n\n  Nota: Se tendi a scrivere codice in questo modo, probabilmente stai cercando di essere troppo furbo.\n\n  È scoraggiato l'uso di scorciatoie, in favore di espressioni chiare e leggibili quando possibile.\n\n  Invece di:\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  È preferito questo approccio:\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n## Letture utili\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### E un video utile:\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\nOggigiorno, tutti i più popolari minificatori di codice si basano su AST, quindi gestiscono il JavaScript senza punti e virgola (semicolons-less) senza problemi (visto che i punti e virgola non sono obbligatori in JavaScript).\n\n> [Relying on automatic semicolon insertion] is quite safe, and perfectly valid JS that every browser understands. Closure compiler, yuicompressor, packer, and jsmin all can properly minify it. There is no performance impact anywhere.\n>\n> I am sorry that, instead of educating you, the leaders in this language community have given you lies and fear.  That was shameful. I recommend learning how statements in JS are actually terminated (and in which cases they are not terminated), so that you can write code that you find beautiful.\n>\n> In general, `\\n` ends a statement unless:\n>   1. The statement has an unclosed paren, array literal, or object literal or ends in some\n>      other way that is not a valid way to end a statement. (For instance, ending with `.`\n>      or `,`.)\n>   2. The line is `--` or `++` (in which case it will decrement/increment the next token.)\n>   3. It is a `for()`, `while()`, `do`, `if()`, or `else`, and there is no `{`\n>   4. The next line starts with `[`, `(`, `+`, `*`, `/`, `-`, `,`, `.`, or some other\n>      binary operator that can only be found between two tokens in a single expression.\n>\n> The first is pretty obvious. Even JSLint is ok with `\\n` chars in JSON and parenthesized constructs, and with `var` statements that span multiple lines ending in `,`.\n>\n> The second is super weird. I’ve never seen a case (outside of these sorts of conversations) where you’d want to do write `i\\n++\\nj`, but, point of fact, that’s parsed as `i; ++j`, not `i++; j`.\n>\n> The third is well understood, if generally despised. `if (x)\\ny()` is equivalent to `if (x) { y() }`. The construct doesn’t end until it reaches either a block, or a statement.\n>\n> `;` is a valid JavaScript statement, so `if(x);` is equivalent to `if(x){}` or, “If x, do nothing.” This is more commonly applied to loops where the loop check also is the update function. Unusual, but not unheard of.\n>\n> The fourth is generally the fud-inducing “oh noes, you need semicolons!” case. But, as it turns out, it’s quite easy to *prefix* those lines with semicolons if you don’t mean them to be continuations of the previous line. For example, instead of this:\n>\n> ```js\n> foo();\n> [1,2,3].forEach(bar);\n> ```\n>\n> you could do this:\n>\n> ```js\n> foo()\n> ;[1,2,3].forEach(bar)\n> ```\n>\n> The advantage is that the prefixes are easier to notice, once you are accustomed to never seeing lines starting with `(` or `[` without semis.\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-kokr.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n이것은 JavaScript [standard](https://github.com/standard/standard) 규칙입니다.\n\n`standard`에 대해 배우는 가장 좋은 방법은 그냥 설치하고 코드에 시도해 보는 것입니다.\n\n## 규칙\n\n* 들여쓰기시 **2칸 공백사용** 을 사용합니다.\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* 이스케이프를 피하기 위해 **문자열에 작은 따옴표** 를 사용합니다.\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **사용하지 않는 변수를 정의하지 마세요.**\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ 피하세요\n  }\n  ```\n\n* **예약어 뒤에는 공백을 추가합니다.**\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ 좋아요\n  if(condition) { ... }    // ✗ 피하세요\n  ```\n\n* **함수 선언 괄호 앞에 공백을 추가합니다.**\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ 좋아요\n  function name(arg) { ... }    // ✗ 피하세요\n\n  run(function () { ... })      // ✓ 좋아요\n  run(function() { ... })       // ✗ 피하세요\n  ```\n\n* **항상** `==` 대신 `===`을 **사용** 합니다.<br>\n  예외: `null || undefined`는 `obj == null`로 확인할 수 있습니다.\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ 좋아요\n  if (name == 'John')    // ✗ 피하세요\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ 좋아요\n  if (name != 'John')    // ✗ 피하세요\n  ```\n\n* 공백사이에 **연산자를 넣어주세요.**\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ 좋아요\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ 피하세요\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **쉽표 뒤에 공백** 이 있어야 합니다.\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ 좋아요\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ 피하세요\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **else 문은** 중괄호와 같은 줄에 **두어야 합니다.**\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ 좋아요\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ 피하세요\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **여러줄의 if문을 사용할 경우** 중괄호를 사용해야합니다.\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ 좋아요\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ 좋아요\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ 피하세요\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* `err` 함수파라미터가 있을 경우 **항상 처리해줘야 합니다.**\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ 좋아요\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ 피하세요\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **항상 브라우저 전역 접두어에는** `window`를 붙여야 합니다.<br>\n  예외의 경우들: `document`, `console`, `navigator`.\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ 좋아요\n  ```\n\n* **여러 줄의 공백을 허용하지 않습니다.**\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ 좋아요\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ 피하세요\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n여러 줄의 **삼항 연산자** 를 사용할 경우 `?`와 `:`를 각각의 행으로 처리해야합니다.\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ 좋아요\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ 좋아요\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ 피하세요\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **var 선언의 경우** 각각 자체적으로 선언해야 합니다.\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ 좋아요\n  var silent = true\n  var verbose = true\n\n  // ✗ 피하세요\n  var silent = true, verbose = true\n\n  // ✗ 피하세요\n  var silent = true,\n      verbose = true\n  ```\n\n* **조건부 할당을** 추가적으로 괄호로 묶습니다. 이것은 표현식이 등호 (`===`)에 대한 오타보다는 의도적으로 할당 (`=`)이라는 것을 분명히해야 합니다.\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ 좋아요\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ 피하세요\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* 한 줄에 중괄호로 처리할 경우 공백을 추가합니다.\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ 피하세요\n    function foo () { return true }  // ✓ 좋아요\n  ```\n\n* **변수나 함수이름 사용시 카멜케이스(camelcase)를 사용합니다.**\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ 피하세요\n    function myFunction () { }     // ✓ 좋아요\n\n    var my_var = 'hello'           // ✗ 피하세요\n    var myVar = 'hello'            // ✓ 좋아요\n  ```\n\n* **뒤쪽에 쉼표는 허용하지 않습니다.**\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ 피하세요\n    }\n  ```\n\n* **쉼표를 사용할 경우 현재 행 끝에 있어야 합니다.**\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ 피하세요\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ 좋아요\n    }\n  ```\n\n* **점(Dot)은 각 속성과 같은 줄에 있어야 합니다.**\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ 피하세요\n\n    console\n      .log('hello') // ✓ 좋아요\n  ```\n\n* **파일은 개행으로 끝나야합니다.**\n\n  eslint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **함수식별자와 호출사이에는 공백이 없어야 합니다.**\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ 피하세요\n  console.log('hello')  // ✓ 좋아요\n  ```\n\n* **콜론과 키 값 쌍의 값 사이에 공백을 추가해야 합니다.**\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ 피하세요\n  var obj = { 'key' :'value' }     // ✗ 피하세요\n  var obj = { 'key':'value' }      // ✗ 피하세요\n  var obj = { 'key': 'value' }     // ✓ 좋아요\n  ```\n\n* **생성자 이름은 대문자로 시작해야합니다.**\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ 피하세요\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ 좋아요\n  ```\n\n* **인수가 없는 생성자는 괄호로 호출해야합니다.**\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ 피하세요\n  var dog = new Animal()  // ✓ 좋아요\n  ```\n\n* **setter가 정의되면 객체에 getter가 포함되어 있어야 합니다.**\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ 피하세요\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ 좋아요\n      return this.name\n    }\n  }\n  ```\n\n* **파생 클래스의 생성자는 `super`를 호출해야합니다.**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ 피하세요\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ 좋아요\n    }\n  }\n  ```\n\n* **배열 생성자 대신에 배열 리터럴을 사용하십시오.**\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ 피하세요\n  var nums = [1, 2, 3]            // ✓ 좋아요\n  ```\n\n* **`arguments.callee`과 `arguments.caller`를 사용하지 마십시오.**\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ 피하세요\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)                // ✓ 좋아요\n  }\n  ```\n\n* **클래스로 선언된 변수를 수정하지 마세요**\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ 피하세요\n  ```\n\n* **`const`를 사용하여 선언 된 변수는 수정하지 마십시오.**\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ 피하세요\n  ```\n\n* **조건(반복 제외)에서 상수 표현식을 사용하지 마십시오.**\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ 피하세요\n    // ...\n  }\n\n  if (x === 0) {  // ✓ 좋아요\n    // ...\n  }\n\n  while (true) {  // ✓ 좋아요\n    // ...\n  }\n  ```\n\n* **정규식에는 제어 문자가 없습니다.**\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ 피하세요\n  var pattern = /\\x20/    // ✓ 좋아요\n  ```\n\n* **`debugger`문은 없습니다.**\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ 피하세요\n    return a + b\n  }\n  ```\n\n** **변수에 `delete` 연산자는 없습니다.**\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ 피하세요\n  ```\n\n* **함수 정의시 중복된 인수를 사용할 수 없습니다.**\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ 피하세요\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ 좋아요\n    // ...\n  }\n  ```\n\n* **클래스 멤버에 중복된 이름을 사용할 수 없습니다.**\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ 피하세요\n  }\n  ```\n\n* **객체 리터럴에서 중복된 키 값을 사용할 수 없습니다.**\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ 피하세요\n  }\n  ```\n\n* **`switch`문에서 중복된 `case` 라벨을 사용할 수 없습니다.**\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ 피하세요\n  }\n  ```\n\n* **모듈 당 하나의 import 문을 사용해야 합니다.**\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ 피하세요\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ 좋아요\n  ```\n\n* **정규식에서 빈 문자 클래스가 없어야 합니다.**\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ 피하세요\n  const myRegex = /^abc[a-z]/   // ✓ 좋아요\n  ```\n\n* **비어있는 구조의 패턴이 없어야 합니다.**\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ 피하세요\n  const { a: { b } } = foo      // ✓ 좋아요\n  ```\n\n* **`eval()`을 사용하지 않습니다.**\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ 피하세요\n  var result = user[propName]             // ✓ 좋아요\n  ```\n\n* **`catch`절의 예외를 재할당하면 안됩니다.**\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ 피하세요\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ 좋아요\n  }\n  ```\n\n* **네이티브 객체를 확장하지 않습니다.**\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ 피하세요\n  ```\n\n* **불필요한 함수 바인딩을 피해야 합니다.**\n\n  eslint: [`no-extra-bind`](http://eslint.org/docs/rules/no-extra-bind)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ 피하세요\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ 좋아요\n  ```\n\n* **불필요한 boolean 캐스트를 피해야 합니다.**\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ 피하세요\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ 좋아요\n    // ...\n  }\n  ```\n\n* **함수 표현식에는 불필요한 괄호가 없어야 합니다.**\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ 피하세요\n  const myFunc = function () { }     // ✓ 좋아요\n  ```\n\n* **'switch'경우에 완료되지 못하는 것을 막기 위해 'break'를 사용하십시오.**\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ 피하세요\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ 좋아요\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ 좋아요\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **부동 소숫점이 없어야 합니다.**\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ 피하세요\n  const discount = 0.5     // ✓ 좋아요\n  ```\n\n* **함수 선언을 재지정하지 말아야 합니다.**\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ 피하세요\n  ```\n\n* **읽기전용 전역 변수를 재정의하지 말아야합니다.**\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ 피하세요\n  ```\n\n* **`eval()`이 포함되지 않도록 합니다.**\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ 피하세요\n  setTimeout(function () { alert('Hello world') })     // ✓ 좋아요\n  ```\n\n* **중괄호 안에서 함수가 선언되지 말아야 합니다.**\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ 피하세요\n  }\n  ```\n\n* **`RegExp` 생성자에 잘못된 정규 표현식 문자열이 없어야 합니다.**\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ 피하세요\n  RegExp('[a-z]')   // ✓ 좋아요\n  ```\n\n* **불규칙한 공백이 없어야 합니다.**\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ 피하세요\n  ```\n\n* **`__iterator__`를 사용하지 않아야 합니다.**\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ 피하세요\n  ```\n\n* **범위 변수와 이름을 공유하는 라벨이 없어야 합니다.**\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ 피하세요\n  }\n  ```\n\n* **라벨문을 사용하지 말아야 합니다.**\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ 피하세요\n    }\n  ```\n\n* **불필요하게 중첩된 블록이 없어야 합니다.**\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ 피하세요\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ 좋아요\n  }\n  ```\n\n* **공백과 탭을 섞어서 사용하지 말아야 합니다.**\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **들여 쓰기를 제외하고는 여러 공백을 사용하지 말아야 합니다.**\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ 피하세요\n  const id = 1234       // ✓ 좋아요\n  ```\n\n* **멀티라인 문자열을 사용하지 말아야 합니다.**\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ 피하세요\n  ```\n\n* **변수에 객체를 대입하지 않고 `new`를 사용하면 안됩니다.**\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ 피하세요\n  const character = new Character()   // ✓ 좋아요\n  ```\n\n* **`Function` 생성자를 사용하지 않아야 합니다.**\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ 피하세요\n  ```\n\n* **`Object` 생성자를 사용하지 않아야 합니다.**\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ 피하세요\n  ```\n\n* **`new require`를 사용하지 않아야 합니다.**\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ 피하세요\n  ```\n\n* **`Symbol` 생성자를 사용하지 않아야 합니다.**\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ 피하세요\n  ```\n\n* **원시 래퍼 인스턴스를 사용하지 않아야 합니다.**\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ 피하세요\n  ```\n\n* **전역 개체 속성을 함수로 호출하지 않아야 합니다.**\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ 피하세요\n  ```\n\n* **8진수를 사용하지 않습니다.**\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ 피하세요\n  const num = '042'   // ✓ 좋아요\n  ```\n\n* **문자열 리터럴에는 8 진수 이스케이프 시퀀스가 없습니다.**\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ 피하세요\n  ```\n\n* **`__dirname`과 `__filename`을 사용할 때 문자열 연결을 피해야 합니다.**\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ 피하세요\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ 좋아요\n  ```\n\n* **`__proto__` 사용은 피해야 합니다.** 대신에 `getPrototypeOf`를 사용할 수 있습니다.\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ 피하세요\n  const foo = Object.getPrototypeOf(obj)  // ✓ 좋아요\n  ```\n\n* **변수를 새로 재정의하지 말아야 합니다.**\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ 피하세요\n\n  let name = 'John'\n  name = 'Jane'         // ✓ 좋아요\n  ```\n\n* **정규 표현식 리터럴에서는 공백을 피해야 합니다.**\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ 피하세요\n\n  const regexp = /test {3}value/  // ✓ 좋아요\n  const regexp = /test value/     // ✓ 좋아요\n  ```\n\n* **반환 내용에 대한 대입 값은 괄호로 묶어야 합니다.**\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ 피하세요\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ 좋아요\n  }\n  ```\n\n* **변수 자체에 자기 자신은 할당하지 않아야 합니다.**\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ 피하세요\n  ```\n\n* **변수를 자기 자신과 비교하지 말아야 합니다.**\n\n  eslint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ 피하세요\n  ```\n\n* **쉼표 연산자를 사용하지 말아야 합니다.**\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ 피하세요\n  ```\n\n* **제한된 이름을 음영 처리해서는 안됩니다.**\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ 피하세요\n  ```\n\n* **빈공간 배열은 허용되지 않습니다.**\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ 피하세요\n  ```\n\n* **탭을 사용해서는 안됩니다.**\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rules/no-tabs)\n\n* **일반 문자열에는 템플릿 리터럴 자리 표시자가 없어야 합니다.**\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ 피하세요\n  const message = `Hello ${name}`   // ✓ 좋아요\n  ```\n\n* **`this`를 사용하기 전에 `super()`를 호출해야 합니다.**\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ 피하세요\n      super()\n    }\n  }\n  ```\n\n* **반드시 `throw`는 `Error` 객체여야 합니다.**\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ 피하세요\n  throw new Error('error')    // ✓ 좋아요\n  ```\n\n* **줄 끝에서 공백을 사용할 수 없습니다.**\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **'undefined'로 초기화하는 것은 허용되지 않습니다.**\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ 피하세요\n\n  let name\n  name = 'value'          // ✓ 좋아요\n  ```\n\n* **반복문에서 수정될 수 없는 조건이 없어야 합니다.**\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ 피하세요\n  for (let i = 0; i < items.length; i++) {...}    // ✓ 좋아요\n  ```\n\n* **더 간단한 대안이 있을 때 삼항연산자를 사용하지 않습니다.**\n\n  eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n  ```js\n  let score = val ? val : 0     // ✗ 피하세요\n  let score = val || 0          // ✓ 좋아요\n  ```\n\n* **`return`,`throw`,`continue`,`break` 문 다음에 도달 할 수없는 코드는 없습니다.**\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ 피하세요\n  }\n  ```\n\n* **`finally` 블록에 흐름을 제어할 수 있는 명령문이 없어야 합니다.**\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ 피하세요\n  }\n  ```\n\n* **관계 연산자의 왼쪽 피연산자를 부정해서는 안됩니다.**\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ 피하세요\n  ```\n\n* **`.call ()`과`.apply ()`를 불필요하게 사용하지 말아야 합니다.**\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ 피하세요\n  ```\n\n* **객체에서 불필요하게 계산 된 속성 키를 사용하지 말아야 합니다.**\n\n  eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n  ```js\n  const user = { ['name']: 'John Doe' }   // ✗ 피하세요\n  const user = { name: 'John Doe' }       // ✓ 좋아요\n  ```\n\n* **불필요한 생성자가 없어야 합니다**\n\n  eslint: [`no-useless-constructor`](http://eslint.org/docs/rules/no-useless-constructor)\n\n  ```js\n  class Car {\n    constructor () {      // ✗ 피하세요\n    }\n  }\n  ```\n\n* **불필요한 이스케이프가 없어야 합니다.**\n\n  eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n  ```js\n  let message = 'Hell\\o'  // ✗ 피하세요\n  ```\n\n* **import, export 및 소멸된 할당의 이름을 동일한 이름으로 바꾸는 것은 허용되지 않습니다.**\n\n  eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n  ```js\n  import { config as config } from './config'     // ✗ 피하세요\n  import { config } from './config'               // ✓ 좋아요\n  ```\n\n* **속성 앞에 공백이 없어야 합니다.**\n\n  eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n  ```js\n  user .name      // ✗ 피하세요\n  user.name       // ✓ 좋아요\n  ```\n\n* `with`문을 사용하지 않습니다.**\n\n  eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n  ```js\n  with (val) {...}    // ✗ 피하세요\n  ```\n\n* **객체 속성 간의 일관성을 유지합니다.**\n\n  eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n  ```js\n  const user = {\n    name: 'Jane Doe', age: 30,\n    username: 'jdoe86'            // ✗ 피하세요\n  }\n\n  const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ 좋아요\n\n  const user = {\n    name: 'Jane Doe',\n    age: 30,\n    username: 'jdoe86'\n  }                                                                 // ✓ 좋아요\n  ```\n\n* **블록 안에 패딩이 없어야 합니다.**\n\n  eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n  ```js\n  if (user) {\n                              // ✗ 피하세요\n    const name = getName()\n\n  }\n\n  if (user) {\n    const name = getName()    // ✓ 좋아요\n  }\n  ```\n\n* **스프레드 연산자와 표현식 사이에 공백이 없어야 합니다.**\n\n  eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n  ```js\n  fn(... args)    // ✗ 피하세요\n  fn(...args)     // ✓ 좋아요\n  ```\n\n* **세미콜론은 뒤쪽에 공백을 두고 앞쪽에는 공백을 두지 않아야 합니다.**\n\n  eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n  ```js\n  for (let i = 0 ;i < items.length ;i++) {...}    // ✗ 피하세요\n  for (let i = 0; i < items.length; i++) {...}    // ✓ 좋아요\n  ```\n\n* **블록 앞에 공간이 있어야 합니다.**\n\n  eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n  ```js\n  if (admin){...}     // ✗ 피하세요\n  if (admin) {...}    // ✓ 좋아요\n  ```\n\n* **괄호 안에 공백이 없어야 합니다.**\n\n  eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n  ```js\n  getName( name )     // ✗ 피하세요\n  getName(name)       // ✓ 좋아요\n  ```\n\n* **단항 연산자 뒤에 공백이 있어야 합니다.**\n\n  eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n  ```js\n  typeof!admin        // ✗ 피하세요\n  typeof !admin        // ✓ 좋아요\n  ```\n\n* **주석 안에는 공백을 사용해야 합니다.**\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ 피하세요\n  // comment          // ✓ 좋아요\n\n  /*comment*/         // ✗ 피하세요\n  /* comment */       // ✓ 좋아요\n  ```\n\n* **템플릿 문자열에는 간격이 없습니다.**\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ 피하세요\n  const message = `Hello, ${name}`      // ✓ 좋아요\n  ```\n\n* **`NaN`을 검사 할 때 `isNaN()`을 사용하십시오.**\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ 피하세요\n  if (isNaN(price)) { }       // ✓ 좋아요\n  ```\n\n* **`typeof`는 유효한 문자열과 비교되어야 합니다.**\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ 피하세요\n  typeof name === 'undefined'     // ✓ 좋아요\n  ```\n\n* **즉시 호출 된 함수 식(IIFE)은 줄 바꿈되어야 합니다.**\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ 피하세요\n\n  const getName = (function () { }())   // ✓ 좋아요\n  const getName = (function () { })()   // ✓ 좋아요\n  ```\n\n* **`yield *`표현식의 `*`은 앞뒤에 공백이 있어야 합니다.**\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ 피하세요\n  yield * increment()   // ✓ 좋아요\n  ```\n\n* **Yoda 조건을 피하십시오.**\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ 피하세요\n  if (age === 42) { }    // ✓ 좋아요\n  ```\n\n## 세미콜론\n\n* 세미콜론은 사용하지 않습니다.. (볼거리: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ 좋아요\n  window.alert('hi');  // ✗ 피하세요\n  ```\n\n* `(`, `[`, or `` ` ``를 사용하여 라인을 시작하지 마십시오. 이것은 세미콜론을 생략한 유일한 시도이며 standard는 이 잠재적인 문제로부터 여러분을 보호합니다.\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ 좋아요\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ 피하세요\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ 좋아요\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ 피하세요\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ 좋아요\n  ;`hello`.indexOf('o')\n\n  // ✗ 피하세요\n  `hello`.indexOf('o')\n  ```\n\n  참고: 만약 종종 이런 식으로 코드를 작성한다면, 영리해 지려고 노력할지도 모릅니다.\n\n  영리한 비글들은 가능할 때마다 명확하고 읽기 쉬운 표현들을 선호한다.\n\n  다음과 같은 이점이 있습니다.\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  이는 강력하게 선호합니다.\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## 도움될만한 읽을거리\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### 도움될만한 영상\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\n현재 사용되는 모든 인기 code minifiers는 AST 기반 축소를 사용하므로 아무런 문제없이 세미콜론이없는 JavaScript를 처리 할 수 있습니다. (JavaScript에서는 세미콜론이 필요하지 않기 때문에)\n\n##### Excerpt from *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]*:\n\n> [자동 세미콜론 삽입에 의존]은 매우 안전하며 모든 브라우저가 이해할 수있는 완벽하게 유효한 JS입니다. Closure 컴파일러, yuicompressor, packer 및 jsmin은 모두이를 적절히 축소 할 수 있습니다. 어디서나 성능에 영향을 미치지 않습니다.\n>\n> 당신을 교육하는 대신,이 언어 공동체의 지도자들이 거짓말과 두려움을 주셨다는 것을 유감스럽게 생각합니다. 부끄러운 일 이었어. JS에서의 진술이 어떻게 실제로 종료되었는지 (어떤 경우에는 종료되지 않았는지) 배우는 것이 좋습니다. 그래서 당신이 아름답게 찾은 코드를 작성할 수 있습니다.\n>\n> 일반적으로 `\\n`은 다음과 같은 경우를 제외하고는 명령문을 끝냅니다 :\n>   1. 명령문은 닫히지 않은 괄호, 배열 리터럴 또는 객체 리터럴을 가지거나 명령문을 종료하는 유효한 방법이 아닌 다른 방법으로 끝납니다. (예 :. 또는,로 끝남)\n>   2. 선은 -- 또는 ++입니다 (이 경우 다음 토큰을 감소/증가시킵니다).\n>   3. { 가 없는 경우 중에서 for(), while(), do, if(), else 입니다.\n>   4. 다음 줄은 [, (, +, *, /, -, ,, ., 또는 단일 표현식에서 두 개의 토큰 사이에서만 발견 될 수있는 다른 이항 연산자로 시작합니다.\n>\n> 첫 번째는 꽤 분명합니다. JSLint조차 JSON과 괄호로 묶인 구조체의 `\\n` 문자와 `,`로 끝나는 여러 줄에 걸쳐있는 `var` 문과도 괜찮습니다.\n>\n> 두 번째는 아주 이상합니다. 나는 당신이 'i\\n++\\nj`라고 쓰고 싶지만, (이런 종류의 대화 밖에서) 파싱 된 사실을 본 적이 없습니다. `i; ++j`가 아니라 `i++;j`입니다.\n>\n> 세 번째는 일반적으로 멸시받는 경우 잘 이해됩니다. `if (x)\\ny()`는 `if (x) { y() }`와 같습니다. 구문은 블록이나 명령문에 도달 할 때까지 끝나지 않습니다.\n>\n> `if(x);`는 `if (x) {}` 또는 \"If x, nothing do nothing\"과 동일합니다. 이것은 일반적으로 루프 체크가 수행되는 루프에 적용됩니다 또한 업데이트 기능입니다. 비정상적이지만 전례가 아닙니다.\n>\n> 네 번째는 일반적으로 \"오, 설마, 당신은 세미콜론이 필요합니다!\"라는 사례가 있습니다. 하지만, 이전 라인의 연속이 아니더라도 세미콜론으로 *접두어*를 붙이는 것은 쉽습니다. 예를 들어, 다음코드로 대신할 수 있습니다.\n>\n> ```js\n> foo();\n> [1,2,3].forEach(bar);\n> ```\n>\n> 다음과 같이 할 수 있습니다.\n>\n> ```js\n> foo()\n> ;[1,2,3].forEach(bar)\n> ```\n>\n> 장점은 `(` 또는 `[` 없이 세미콜론으로 시작하는 줄을 보지 못한다면 익숙해지기 쉽습니다.\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-ptbr.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\nEsse é um \"TL;DR\" (ou \"muito grande; nemli\") das regras do [standard](https://github.com/standard/standard)\n\nA melhor forma de aprender sobre o `standard` é instalar e usar no seu código.\n\n\n## Regras\n\n* **Use 2 espaços** para identação.\n\n  ```js\n  function hello (name) {\n    console.log('oi', name)\n  }\n  ```\n\n* **Use aspas simples para strings** exceto para evitar escapamento.\n\n  ```js\n  console.log('olá, meu povo')\n  $(\"<div class='box'>\")\n  ```\n\n* **Sem variáveis não-utilizadas.**\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ evite\n  }\n  ```\n\n* **Adicione um espaço após as keywords.**\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ evite\n  ```\n\n* **Adicione um espaço antes do parêntese de declaração de funções.**\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ evite\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ evite\n  ```\n\n* **Sempre use** `===` ao invés de  `==`.<br>\n  Exceção: `obj == null` é permitido pra checar se `null || undefined`.\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ evite\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ evite\n  ```\n\n* **Operadores infix** devem ser espaçados.\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ evite\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **Vírgulas devem ter um espaço** depois delas.\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ evite\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **Mantenha os else** na mesma linha das suas chaves.\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ evite\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **Para ifs com mais de uma linha,** use chaves.\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ evite\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **Sempre lide  ** com o parâmetro `err` .\n\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ evite\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **Sempre prefixe globais de browser** com `window.`.<br>\n  Exceções: `document`, `console` e `navigator`.\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **Não é permitido múltiplas linhas em branco.**\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ evite\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **Se for usar operador ternário** em múltiplas linhas, deixe `?` e `:` em suas próprias linhas.\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ evite\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **Para declarações de var,** escreva cada declaração na sua própria instrução.\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ evite\n  var silent = true, verbose = true\n\n  // ✗ evite\n  var silent = true,\n      verbose = true\n  ```\n\n* **Coloque parẽnteses adicionais** em declarações em condições. Isso torna mais claro que a expressão é uma declaração (`=`) e não um typo de equidade (`===`)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ evite\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n*\n## Ponto-e-vírgula\n\n* Não use. (veja: [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ evite\n  ```\n\n* Nunca comece uma linha com `(`, `[`, ou `` ` ``. Esse é o único problema em omitir ponto-e-vírgula, e standard te protege desse problema em potencial.\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ evite\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ evite\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ evite\n  `hello`.indexOf('o')\n  ```\n\n  Nota: Se você frequentemente escreve código assim, você pode estar querendo ser o inteligentão. Cuidado.\n\n  Atalhos inteligentes são desencorajados, em favor de expressões mais limpas e legíveis, sempre que possível.\n\n\n  Ao invés disso:\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  Isso é bem melhor\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## Uma leitura boa\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### E um vídeo bem explicativo:\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\nTodos os minificadores de código populares usam minificação baseada em AST, logo, podem lidar com JavaScript sem ponto-e-vírgula sem problemas (já que ponto-e-vírgula não é obrigatório no JavaScript).\n\n##### Um pedaço de *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]*, traduzido:\n\n[Depender de inserção automática de ponto-e-vírgula] é algo bem seguro, e é perfeitamente válido, de forma que qualquer navegador entende. Compilador Closure, yuicompressos, packer e jsmin... todos conseguem minificar sem problemas. Não há impacto de performance.\n\nLamento que ao invés de educar, os líderes da comunidade dessa linguagem mentem pra você, te deixam com medo. Isso é vergonhoso. Eu recomendo aprender como declarações no JS são terminadas (e em que caso elas não são terminadas), para que você possa escrever os códigos que acha bonito.\n\n\nDe forma geral, `\\n` termina uma declaração a menos que:\n  1. A declaração possua um parêntese que não foi fechado, um array literal ou um objeto literal, ou termina de alguma outra forma que não seja um fim de declaração válido (por exemplo, `.` ou `,`)\n  2. A linha é apenas `--` ou `++` (nesse caso vai decrementar ou incrementar o próximo token)\n  3. Ela seja um `for()`, `while()`, `while()`, `do`, `if()`, ou `else`, e não possui `{`\n  4. A próxima linha começa com  `[`, `(`, `+`, `*`, `/`, `-`, `,`, `.`, ou algum outro operador binário que só pode ser encontrado entre 2 tokens em uma única expressão.\n\nA primeira linha é bem óbvia. Qualquer JSLint não vê problemas em `\\n` em json e construtores \"aparêntetizados\", e com declarações `var` que se extendem por múltiplas linhas, terminado em `,`;\nA segunda é muito esquisita. Nunca vi um caso (fora de ambientes específicos pra esse caso) onde você iria querer escrever `i\\n++\\nj`, mas pra todos os fins, isso é um `i; ++j`, e não `i++; j`.\n\nA terceira é bem difundida,  embora geralmente deixada pra lá. `if (x)\\ny()` é equivalente a `if (x) { y() }`. O construtor não termina até que ache um bloco, ou uma declaração.\n\n`;` é uma declaração válida, logo `if(x);`  `if(x){}` ou, “se X, não faça nada\". Isso é mais comum quando aplicado em loops onde a checagem do loop é a própria função de update. Incomum, mas não totalmente desconhecida.\n\nA quarta é geralmente o que deixa a galera louca, tipo \"meu deus, você precisa de ponto-e-vírgula!\" Mas é bem fácil *prefixar* essas linhas com ponto-e-vírgula se você não quer que elas sejam continuações da linha anterior. Por exempl, ao invés disso:\n\n```js\nfoo();\n[1,2,3].forEach(bar);\n```\n\nvocê pode fazer isso\n\n```js\nfoo()\n;[1,2,3].forEach(bar)\n```\n\nA vantagem disso é que prefixos são mais fáceis de perceber, uma vez que você acostuma a nunca mias ver linhas com `(` e `[` sem semis.\n\n*Fim da citação de \"An Open Letter to JavaScript Leaders Regarding Semicolons\".*\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-zhcn.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n这是 JavaScript [standard](https://github.com/standard/standard) 代码规范的全文。\n\n掌握本规范的最好方法是安装并在自己的代码中使用它。\n\n## 细则\n\n* **使用两个空格**进行缩进。\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* 除需要转义的情况外，**字符串统一使用单引号**。\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **不要定义未使用的变量**。\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ avoid\n  }\n  ```\n\n* **关键字后面加空格**。\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ avoid\n  ```\n\n* **函数声明时括号与函数名间加空格**。\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ avoid\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ avoid\n  ```\n\n* **始终使用** `===` 替代 `==`。<br>\n  例外： `obj == null` 可以用来检查 `null || undefined`。\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ avoid\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ avoid\n  ```\n\n* **字符串拼接操作符 (Infix operators)** 之间要留空格。\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ avoid\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **逗号后面加空格**。\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ avoid\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **else 关键字要与花括号**保持在同一行。\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **多行 if 语句的**的括号不能省。\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **不要丢掉**异常处理中`err`参数。\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ avoid\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **使用浏览器全局变量时加上** `window.` 前缀。<br>\n  Exceptions are: `document`, `console` and `navigator`.\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **不允许有连续多行空行**。\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ avoid\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n\n* **对于三元运算符** `?` 和 `:` 与他们所负责的代码处于同一行\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ avoid\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **每个 var 关键字**单独声明一个变量。\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ avoid\n  var silent = true, verbose = true\n\n  // ✗ avoid\n  var silent = true,\n      verbose = true\n  ```\n\n* **条件语句中赋值语句**使用括号包起来。这样使得代码更加清晰可读，而不会认为是将条件判断语句的全等号（`===`）错写成了等号（`=`）。\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ avoid\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* **单行代码块两边加空格**。\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ avoid\n    function foo () { return true }  // ✓ ok\n  ```\n\n* **对于变量和函数名统一使用驼峰命名法**。\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ avoid\n    function myFunction () { }     // ✓ ok\n\n    var my_var = 'hello'           // ✗ avoid\n    var myVar = 'hello'            // ✓ ok\n  ```\n\n* **不允许有多余的行末逗号**。\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ avoid\n    }\n  ```\n\n* **始终将逗号置于行末**。\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ avoid\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ ok\n    }\n  ```\n\n* **点号操作符须与属性需在同一行**。\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ avoid\n\n    console\n      .log('hello') // ✓ ok\n  ```\n\n* **文件末尾留一空行**。\n\n  elint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **函数调用时标识符与括号间不留间隔**。\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ avoid\n  console.log('hello')  // ✓ ok\n  ```\n\n* **键值对当中冒号与值之间要留空白**。\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ avoid\n  var obj = { 'key' :'value' }     // ✗ avoid\n  var obj = { 'key':'value' }      // ✗ avoid\n  var obj = { 'key': 'value' }     // ✓ ok\n  ```\n\n* **构造函数要以大写字母开头**。\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ avoid\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ ok\n  ```\n\n* **无参的构造函数调用时要带上括号**。\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ avoid\n  var dog = new Animal()  // ✓ ok\n  ```\n\n* **对象中定义了存值器，一定要对应的定义取值器**。\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ avoid\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ ok\n      return this.name\n    }\n  }\n  ```\n\n* **子类的构造器中一定要调用 `super`**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ avoid\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ ok\n    }\n  }\n  ```\n\n* **使用数组字面量而不是构造器**。\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ avoid\n  var nums = [1, 2, 3]            // ✓ ok\n  ```\n\n* **避免使用 `arguments.callee` 和 `arguments.caller`**。\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ avoid\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)\n  }\n  ```\n\n* **避免对类名重新赋值**。\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ avoid\n  ```\n\n* **避免修改使用 `const` 声明的变量**。\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ avoid\n  ```\n\n* **避免使用常量作为条件表达式的条件（循环语句除外）**。\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ avoid\n    // ...\n  }\n\n  if (x === 0) {  // ✓ ok\n    // ...\n  }\n\n  while (true) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **正则中不要使用控制符**。\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ avoid\n  var pattern = /\\x20/    // ✓ ok\n  ```\n\n* **不要使用 `debugger`**。\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ avoid\n    return a + b\n  }\n  ```\n\n* **不要对变量使用 `delete` 操作**。\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ avoid\n  ```\n\n* **不要定义冗余的函数参数**。\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ avoid\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **类中不要定义冗余的属性**。\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ avoid\n  }\n  ```\n\n* **对象字面量中不要定义重复的属性**。\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ avoid\n  }\n  ```\n\n* **`switch` 语句中不要定义重复的 `case` 分支**。\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ avoid\n  }\n  ```\n\n* **同一模块有多个导入时一次性写完**。\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ avoid\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ ok\n  ```\n\n* **正则中不要使用空字符**。\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ avoid\n  const myRegex = /^abc[a-z]/   // ✓ ok\n  ```\n\n* **不要解构空值**。\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ avoid\n  const { a: { b } } = foo      // ✓ ok\n  ```\n\n* **不要使用 `eval()`**。\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ avoid\n  var result = user[propName]             // ✓ ok\n  ```\n\n* **`catch` 中不要对错误重新赋值**。\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ avoid\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ ok\n  }\n  ```\n\n* **不要扩展原生对象**。\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ avoid\n  ```\n\n* **避免多余的函数上下文绑定**。\n\n  eslint: [`no-extra-bind`](http://eslint.org/docs/rules/no-extra-bind)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ avoid\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ ok\n  ```\n\n* **避免不必要的布尔转换**。\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ avoid\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ ok\n    // ...\n  }\n  ```\n\n* **不要使用多余的括号包裹函数**。\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ avoid\n  const myFunc = function () { }     // ✓ ok\n  ```\n\n* **`switch` 一定要使用 `break` 来将条件分支正常中断**。\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ avoid\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **不要省去小数点前面的0**。\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ avoid\n  const discount = 0.5     // ✓ ok\n  ```\n\n* **避免对声明过的函数重新赋值**。\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ avoid\n  ```\n\n* **不要对全局只读对象重新赋值**。\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ avoid\n  ```\n\n* **注意隐式的 `eval()`**。\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ avoid\n  setTimeout(function () { alert('Hello world') })     // ✓ ok\n  ```\n\n* **嵌套的代码块中禁止再定义函数**。\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ avoid\n  }\n  ```\n\n* **不要向 `RegExp` 构造器传入非法的正则表达式**。\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ avoid\n  RegExp('[a-z]')   // ✓ ok\n  ```\n\n* **不要使用非法的空白符**。\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ avoid\n  ```\n\n* **禁止使用 `__iterator__`**。\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ avoid\n  ```\n\n* **外部变量不要与对象属性重名**。\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ avoid\n  }\n  ```\n\n* **不要使用标签语句**。\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ avoid\n    }\n  ```\n\n* **不要书写不必要的嵌套代码块**。\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ avoid\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ ok\n  }\n  ```\n\n* **不要混合使用空格与制表符作为缩进**。\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **除了缩进，不要使用多个空格**。\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ avoid\n  const id = 1234       // ✓ ok\n  ```\n\n* **不要使用多行字符串**。\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ avoid\n  ```\n\n* **`new` 创建对象实例后需要赋值给变量**。\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ avoid\n  const character = new Character()   // ✓ ok\n  ```\n\n* **禁止使用 `Function` 构造器**。\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ avoid\n  ```\n\n* **禁止使用 `Object` 构造器**。\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ avoid\n  ```\n\n* **禁止使用 `new require`**。\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ avoid\n  ```\n\n* **禁止使用 `Symbol` 构造器**。\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ avoid\n  ```\n\n* **禁止使用原始包装器**。\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ avoid\n  ```\n\n* **不要将全局对象的属性作为函数调用**。\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ avoid\n  ```\n\n* **不要使用八进制字面量**。\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ avoid\n  const num = '042'   // ✓ ok\n  ```\n\n* **字符串字面量中也不要使用八进制转义字符**。\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ avoid\n  ```\n\n* **使用 `__dirname` 和 `__filename` 时尽量避免使用字符串拼接**。\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ avoid\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ ok\n  ```\n\n* 使用 `getPrototypeOf` 来替代 **`__proto__`**。\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ avoid\n  const foo = Object.getPrototypeOf(obj)  // ✓ ok\n  ```\n\n* **不要重复声明变量**。\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ avoid\n\n  let name = 'John'\n  name = 'Jane'         // ✓ ok\n  ```\n\n* **正则中避免使用多个空格**。\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ avoid\n\n  const regexp = /test {3}value/  // ✓ ok\n  const regexp = /test value/     // ✓ ok\n  ```\n\n* **return 语句中的赋值必需有括号包裹**。\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ avoid\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ ok\n  }\n  ```\n\n* **避免将变量赋值给自己**。\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ avoid\n  ```\n\n* **避免将变量与自己进行比较操作**。\n\n  esint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ avoid\n  ```\n\n* **避免使用逗号操作符**。\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ avoid\n  ```\n\n* **不要随意更改关键字的值**。\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ avoid\n  ```\n\n* **禁止使用稀疏数组（Sparse arrays）**。\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ avoid\n  ```\n\n* **不要使用制表符**。\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rules/no-tabs)\n\n* **正确使用 ES6 中的字符串模板**。\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ avoid\n  const message = `Hello ${name}`   // ✓ ok\n  ```\n\n* **使用 `this` 前请确保 `super()` 已调用**。\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ avoid\n      super()\n    }\n  }\n  ```\n\n* **用 `throw` 抛错时，抛出 `Error` 对象而不是字符串**。\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ avoid\n  throw new Error('error')    // ✓ ok\n  ```\n\n* **行末不留空格**。\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **不要使用 `undefined` 来初始化变量**。\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ avoid\n\n  let name\n  name = 'value'          // ✓ ok\n  ```\n\n* **循环语句中注意更新循环变量**。\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **如果有更好的实现，尽量不要使用三元表达式**。\n\n  eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n  ```js\n  let score = val ? val : 0     // ✗ avoid\n  let score = val || 0          // ✓ ok\n  ```\n\n* **`return`，`throw`，`continue` 和 `break` 后不要再跟代码**。\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ avoid\n  }\n  ```\n\n* **`finally` 代码块中不要再改变程序执行流程**。\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ avoid\n  }\n  ```\n\n* **关系运算符的左值不要做取反操作**。\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ avoid\n  ```\n\n* **避免不必要的 `.call()` 和 `.apply()`**。\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ avoid\n  ```\n\n* **避免使用不必要的计算值作对象属性**。\n\n  eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n  ```js\n  const user = { ['name']: 'John Doe' }   // ✗ avoid\n  const user = { name: 'John Doe' }       // ✓ ok\n  ```\n\n* **禁止多余的构造器**。\n\n  eslint: [`no-useless-constructor`](http://eslint.org/docs/rules/no-useless-constructor)\n\n  ```js\n  class Car {\n    constructor () {      // ✗ avoid\n    }\n  }\n  ```\n\n* **禁止不必要的转义**。\n\n  eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n  ```js\n  let message = 'Hell\\o'  // ✗ avoid\n  ```\n\n* **import, export 和解构操作中，禁止赋值到同名变量**。\n\n  eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n  ```js\n  import { config as config } from './config'     // ✗ avoid\n  import { config } from './config'               // ✓ ok\n  ```\n\n* **属性前面不要加空格**。\n\n  eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n  ```js\n  user .name      // ✗ avoid\n  user.name       // ✓ ok\n  ```\n\n* **禁止使用 `with`**。\n\n  eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n  ```js\n  with (val) {...}    // ✗ avoid\n  ```\n\n* **对象属性换行时注意统一代码风格**。\n\n  eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n  ```js\n  const user = {\n    name: 'Jane Doe', age: 30,\n    username: 'jdoe86'            // ✗ avoid\n  }\n\n  const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ ok\n\n  const user = {\n    name: 'Jane Doe',\n    age: 30,\n    username: 'jdoe86'\n  }                                                                 // ✓ ok\n  ```\n\n* **代码块中避免多余留白**。\n\n  eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n  ```js\n  if (user) {\n                              // ✗ avoid\n    const name = getName()\n\n  }\n\n  if (user) {\n    const name = getName()    // ✓ ok\n  }\n  ```\n\n* **展开运算符与它的表达式间不要留空白**。\n\n  eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n  ```js\n  fn(... args)    // ✗ avoid\n  fn(...args)     // ✓ ok\n  ```\n\n* **遇到分号时空格要后留前不留**。\n\n  eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n  ```js\n  for (let i = 0 ;i < items.length ;i++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **代码块首尾留空格**。\n\n  eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n  ```js\n  if (admin){...}     // ✗ avoid\n  if (admin) {...}    // ✓ ok\n  ```\n\n* **圆括号间不留空格**。\n\n  eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n  ```js\n  getName( name )     // ✗ avoid\n  getName(name)       // ✓ ok\n  ```\n\n* **一元运算符后面跟一个空格**。\n\n  eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n  ```js\n  typeof!admin        // ✗ avoid\n  typeof !admin        // ✓ ok\n  ```\n\n* **注释首尾留空格**。\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ avoid\n  // comment          // ✓ ok\n\n  /*comment*/         // ✗ avoid\n  /* comment */       // ✓ ok\n  ```\n\n* **模板字符串中变量前后不加空格**。\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ avoid\n  const message = `Hello, ${name}`      // ✓ ok\n  ```\n\n* **检查 `NaN` 的正确姿势是使用 `isNaN()`**。\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ avoid\n  if (isNaN(price)) { }       // ✓ ok\n  ```\n\n* **用合法的字符串跟 `typeof` 进行比较操作**。\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ avoid\n  typeof name === 'undefined'     // ✓ ok\n  ```\n\n* **自调用匿名函数 (IIFEs) 使用括号包裹**。\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ avoid\n\n  const getName = (function () { }())   // ✓ ok\n  const getName = (function () { })()   // ✓ ok\n  ```\n\n* **`yield *` 中的 `*` 前后都要有空格**。\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ avoid\n  yield * increment()   // ✓ ok\n  ```\n\n* **请书写优雅的条件语句（avoid Yoda conditions）**。\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ avoid\n  if (age === 42) { }    // ✓ ok\n  ```\n\n## 关于分号\n\n* 不要使用分号。 (参见：[1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding)，[2](http://inimino.org/%7Einimino/blog/javascript_semicolons)，[3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ avoid\n  ```\n\n* 不要使用 `(`, `[`, or `` ` `` 等作为一行的开始。在没有分号的情况下代码压缩后会导致报错，而坚持这一规范则可避免出错。\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ avoid\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ avoid\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ avoid\n  `hello`.indexOf('o')\n  ```\n\n  备注：上面的写法只能说聪明过头了。\n\n  相比更加可读易懂的代码，那些看似投巧的写法是不可取的。\n\n  譬如：\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  建议的写法是：\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## 拓展阅读\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### 一个值得观看的视频：\n\n- [JavaScript 中的分号多余吗？- YouTube][3]\n\n当前主流的代码压缩方案都是基于词法（AST-based）进行的，所以在处理无分号的代码时完全没有压力（何况 JavaScript 中分号本来就不是强制的）。\n\n##### 一段摘抄自 *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]* 这篇文章的内容：\n\n> [自动化插入分号的做法]是安全可依赖的，而且其产出的代码能够在所有浏览器里很好地运行。 Closure compiler, yuicompressor, packer 还有 jsmin 都能正确地对这样的代码进行压缩处理。并没有任何性能相关的问题。\n>\n> 不得不说，Javascript 社区里的大牛们一直是错误的，并不能教给你最佳实践。真是让人忧伤啊。 我建议先弄清楚 JS 是怎样断句的（还有就是哪些地方看起来断了其实并没有），明白了这个后就可以随心写出漂亮的代码了。\n>\n> 一般来说， `\\n` 表示语句结束，除非：\n>   1. 该语句有未闭合的括号， 数组字面量， 对象字面量 或者其他不能正常结束一条语句的情况（譬如，以 `.` 或 `,` 结尾）\n>   2. 该语句是 `--` 或者 `++` （它会将后面的内容进行自增或减）\n>   3. 该语句是 `for()`，`while()`，`do`，`if()` 或者 `else` 并且没有 `{`\n>   4. 下一行以 `[`，`(`，`+`，`*`，`/`，`-`，`,`，`.` 或者其他只会单独出现在两块内容间的二元操作符。\n>\n> 第一条很容易理解。即使在 JSLint 中，也允许 JSON，构造器的括号中，以及使用 `var` 配合 `,` 结尾来声明多个变量等这些情中包含 `\\n`。\n>\n> 第二条有点奇葩。 我还想不出谁会（除了这里用作讨论外）写出 `i\\n++\\nj` 这样的代码来，不过，顺便说一下，这种写法最后解析的结果是 `i; ++j`，而不是 `i++; j`。\n>\n> 第三条也容易理解。 `if (x)\\ny()` 等价于 `if (x) { y() }`。解释器会向下寻找到代码块或一条语句为止。\n>\n> `;` 是条合法的 JavaScript 语句。所以 `if(x);` 等价于 `if(x){}`，表示 “如果 x 为真，什么也不做。” 这种写法在循环里面可以看到，就是当条件判断与条件更新是同一个方法的时候。 不常见，但也不至于没听说过吧。\n>\n> 第四条就是常见的 “看，说过要加分号！” 的情形。但这些情况可以通过在语句前面加上分号来解决，如果你确定该语句跟前面的没关系的话。举个例子，假如你想这样：\n>\n> ```js\n> foo();\n> [1,2,3].forEach(bar);\n> ```\n>\n> 那么完全可以这样来写：\n>\n> ```js\n> foo()\n> ;[1,2,3].forEach(bar)\n> ```\n>\n> 后者的好处是分号比较瞩目，一旦习惯后便再也不会看到以 `(` 和 `[` 开头又不带分号的语句了。\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/RULES-zhtw.md",
    "content": "# JavaScript Standard Style\n\n<p align=\"center\">\n  <a href=\"RULES-en.md\">English</a> •\n  <a href=\"RULES-esla.md\">Español (Latinoamérica)</a> •\n  <a href=\"RULES-iteu.md\">Italiano (Italian)</a> •\n  <a href=\"RULES-kokr.md\">한국어 (Korean)</a> •\n  <a href=\"RULES-ptbr.md\">Português (Brasil)</a> •\n  <a href=\"RULES-zhcn.md\">简体中文 (Simplified Chinese)</a> •\n  <a href=\"RULES-zhtw.md\">繁體中文 (Taiwanese Mandarin)</a>\n</p>\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/standard/standard)\n\n這是 [standard](https://github.com/standard/standard) 語法規則的摘要。\n\n最快速掌握 `standard` 的方法，就是直接安裝並在你的程式碼中開始使用。\n\n## 規則\n\n* **兩個空白** 當作縮排。\n\n  eslint: [`indent`](http://eslint.org/docs/rules/indent)\n\n  ```js\n  function hello (name) {\n    console.log('hi', name)\n  }\n  ```\n\n* **字串用單引號** ，除非要避免跳脫字元。\n\n  eslint: [`quotes`](http://eslint.org/docs/rules/quotes)\n\n  ```js\n  console.log('hello there')\n  $(\"<div class='box'>\")\n  ```\n\n* **沒有不必要的變數。**\n\n  eslint: [`no-unused-vars`](http://eslint.org/docs/rules/no-unused-vars)\n\n  ```js\n  function myFunction () {\n    var result = something()   // ✗ avoid\n  }\n  ```\n\n* **關鍵字後加空白。**\n\n  eslint: [`keyword-spacing`](http://eslint.org/docs/rules/keyword-spacing)\n\n  ```js\n  if (condition) { ... }   // ✓ ok\n  if(condition) { ... }    // ✗ avoid\n  ```\n\n* **函數宣告時，括號前要加空白。**\n\n  eslint: [`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n\n  ```js\n  function name (arg) { ... }   // ✓ ok\n  function name(arg) { ... }    // ✗ avoid\n\n  run(function () { ... })      // ✓ ok\n  run(function() { ... })       // ✗ avoid\n  ```\n\n* **統一用** `===` 取代 `==`。<br>\n  例外： `obj == null` 可以用來檢查 `null || undefined`。\n\n  eslint: [`eqeqeq`](http://eslint.org/docs/rules/eqeqeq)\n\n  ```js\n  if (name === 'John')   // ✓ ok\n  if (name == 'John')    // ✗ avoid\n  ```\n\n  ```js\n  if (name !== 'John')   // ✓ ok\n  if (name != 'John')    // ✗ avoid\n  ```\n\n* **中綴運算子（infix operator）前後** 必須要加空白。\n\n  eslint: [`space-infix-ops`](http://eslint.org/docs/rules/space-infix-ops)\n\n  ```js\n  // ✓ ok\n  var x = 2\n  var message = 'hello, ' + name + '!'\n  ```\n\n  ```js\n  // ✗ avoid\n  var x=2\n  var message = 'hello, '+name+'!'\n  ```\n\n* **逗號後面要加一個空白。**\n\n  eslint: [`comma-spacing`](http://eslint.org/docs/rules/comma-spacing)\n\n  ```js\n  // ✓ ok\n  var list = [1, 2, 3, 4]\n  function greet (name, options) { ... }\n  ```\n\n  ```js\n  // ✗ avoid\n  var list = [1,2,3,4]\n  function greet (name,options) { ... }\n  ```\n\n* **把 else 語句** 放在大括弧的同一行。\n\n  eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style)\n\n  ```js\n  // ✓ ok\n  if (condition) {\n    // ...\n  } else {\n    // ...\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (condition) {\n    // ...\n  }\n  else {\n    // ...\n  }\n  ```\n\n* **在 if 語句多於一行時，** 加上大括弧。\n\n  eslint: [`curly`](http://eslint.org/docs/rules/curly)\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) console.log('done')\n  ```\n\n  ```js\n  // ✓ ok\n  if (options.quiet !== true) {\n    console.log('done')\n  }\n  ```\n\n  ```js\n  // ✗ avoid\n  if (options.quiet !== true)\n    console.log('done')\n  ```\n\n* **一定要處理 `err`** 參數。\n\n  eslint: [`handle-callback-err`](http://eslint.org/docs/rules/handle-callback-err)\n  ```js\n  // ✓ ok\n  run(function (err) {\n    if (err) throw err\n    window.alert('done')\n  })\n  ```\n\n  ```js\n  // ✗ avoid\n  run(function (err) {\n    window.alert('done')\n  })\n  ```\n\n* **一定要對瀏覽器中的全域變數** 加上 `window` 前綴。<br>\n  除了 `document`、`console` 和 `navigator` 可以不用。\n\n  eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  ```\n\n* **不允許多行空白行。**\n\n  eslint: [`no-multiple-empty-lines`](http://eslint.org/docs/rules/no-multiple-empty-lines)\n\n  ```js\n  // ✓ ok\n  var value = 'hello world'\n  console.log(value)\n  ```\n\n  ```js\n  // ✗ avoid\n  var value = 'hello world'\n\n\n  console.log(value)\n  ```\n* **三元運算子（ternary operator）** 在多行的情況下，把 `?` 和 `:` 和後面敘述放在同一行。\n\n  eslint: [`operator-linebreak`](http://eslint.org/docs/rules/operator-linebreak)\n\n  ```js\n  // ✓ ok\n  var location = env.development ? 'localhost' : 'www.api.com'\n\n  // ✓ ok\n  var location = env.development\n    ? 'localhost'\n    : 'www.api.com'\n\n  // ✗ avoid\n  var location = env.development ?\n    'localhost' :\n    'www.api.com'\n  ```\n\n* **變數宣告時，** 每個宣告要獨自一行。\n\n  eslint: [`one-var`](http://eslint.org/docs/rules/one-var)\n\n  ```js\n  // ✓ ok\n  var silent = true\n  var verbose = true\n\n  // ✗ avoid\n  var silent = true, verbose = true\n\n  // ✗ avoid\n  var silent = true,\n      verbose = true\n  ```\n\n* **把條件語句中的賦值加上額外的括弧。** 可以更清楚表達這個賦值（`=`）是刻意的，而不是原本要打（`===`）打錯的。\n\n  eslint: [`no-cond-assign`](http://eslint.org/docs/rules/no-cond-assign)\n\n  ```js\n  // ✓ ok\n  while ((m = text.match(expr))) {\n    // ...\n  }\n\n  // ✗ avoid\n  while (m = text.match(expr)) {\n    // ...\n  }\n  ```\n\n* **在單行的程式區塊中，前後加入空白。**\n\n  eslint: [`block-spacing`](http://eslint.org/docs/rules/block-spacing)\n\n  ```js\n    function foo () {return true}    // ✗ avoid\n    function foo () { return true }  // ✓ ok\n  ```\n\n* **宣告變數和函式時使用駝峰（camelcase）命名。**\n\n  eslint: [`camelcase`](http://eslint.org/docs/rules/camelcase)\n\n  ```js\n    function my_function () { }    // ✗ avoid\n    function myFunction () { }     // ✓ ok\n\n    var my_var = 'hello'           // ✗ avoid\n    var myVar = 'hello'            // ✓ ok\n  ```\n\n* **不允許行尾逗號。**\n\n  eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle)\n\n  ```js\n    var obj = {\n      message: 'hello',   // ✗ avoid\n    }\n  ```\n\n* **逗號必須要放置在該行的最後，不要放到下一行。**\n\n  eslint: [`comma-style`](http://eslint.org/docs/rules/comma-style)\n\n  ```js\n    var obj = {\n      foo: 'foo'\n      ,bar: 'bar'   // ✗ avoid\n    }\n\n    var obj = {\n      foo: 'foo',\n      bar: 'bar'   // ✓ ok\n    }\n  ```\n\n* **屬性和它前面的點應該放在同一行**\n\n  eslint: [`dot-location`](http://eslint.org/docs/rules/dot-location)\n\n  ```js\n    console.\n      log('hello')  // ✗ avoid\n\n    console\n      .log('hello') // ✓ ok\n  ```\n\n* **檔案結尾必須要是一個空白行。**\n\n  eslint: [`eol-last`](http://eslint.org/docs/rules/eol-last)\n\n* **呼叫函式時，函式和後面的括弧間不要加空白。**\n\n  eslint: [`func-call-spacing`](http://eslint.org/docs/rules/func-call-spacing)\n\n  ```js\n  console.log ('hello') // ✗ avoid\n  console.log('hello')  // ✓ ok\n  ```\n\n* **物件（object）宣告時，在冒號和後面的值中間加空白。**\n\n  eslint: [`key-spacing`](http://eslint.org/docs/rules/key-spacing)\n\n  ```js\n  var obj = { 'key' : 'value' }    // ✗ avoid\n  var obj = { 'key' :'value' }     // ✗ avoid\n  var obj = { 'key':'value' }      // ✗ avoid\n  var obj = { 'key': 'value' }     // ✓ ok\n  ```\n\n* **建構子（constructor）的名稱開頭要大寫。**\n\n  eslint: [`new-cap`](http://eslint.org/docs/rules/new-cap)\n\n  ```js\n  function animal () {}\n  var dog = new animal()    // ✗ avoid\n\n  function Animal () {}\n  var dog = new Animal()    // ✓ ok\n  ```\n\n* **沒有參數的建構子呼叫時必須要加括號。**\n\n  eslint: [`new-parens`](http://eslint.org/docs/rules/new-parens)\n\n  ```js\n  function Animal () {}\n  var dog = new Animal    // ✗ avoid\n  var dog = new Animal()  // ✓ ok\n  ```\n\n* **物件的 setter 如果有設定時，getter 也要設定。**\n\n  eslint: [`accessor-pairs`](http://eslint.org/docs/rules/accessor-pairs)\n\n  ```js\n  var person = {\n    set name (value) {    // ✗ avoid\n      this.name = value\n    }\n  }\n\n  var person = {\n    set name (value) {\n      this.name = value\n    },\n    get name () {         // ✓ ok\n      return this.name\n    }\n  }\n  ```\n\n* **建構子是繼承來時，一定要呼叫 `super`；反之，則一定不能呼叫。**\n\n  eslint: [`constructor-super`](http://eslint.org/docs/rules/constructor-super)\n\n  ```js\n  class Dog {\n    constructor () {\n      super()   // ✗ avoid\n    }\n  }\n\n  class Dog extends Mammal {\n    constructor () {\n      super()   // ✓ ok\n    }\n  }\n  ```\n\n* **宣告陣列時，用中括弧宣告，不要用陣列建構子。**\n\n  eslint: [`no-array-constructor`](http://eslint.org/docs/rules/no-array-constructor)\n\n  ```js\n  var nums = new Array(1, 2, 3)   // ✗ avoid\n  var nums = [1, 2, 3]            // ✓ ok\n  ```\n\n* **不使用 `arguments.callee` 和 `arguments.caller`。**\n\n  eslint: [`no-caller`](http://eslint.org/docs/rules/no-caller)\n\n  ```js\n  function foo (n) {\n    if (n <= 0) return\n\n    arguments.callee(n - 1)   // ✗ avoid\n  }\n\n  function foo (n) {\n    if (n <= 0) return\n\n    foo(n - 1)\n  }\n  ```\n\n* **避免重新定義宣告後的類別（class）。**\n\n  eslint: [`no-class-assign`](http://eslint.org/docs/rules/no-class-assign)\n\n  ```js\n  class Dog {}\n  Dog = 'Fido'    // ✗ avoid\n  ```\n\n* **避免修改 `const` 宣告的變數。**\n\n  eslint: [`no-const-assign`](http://eslint.org/docs/rules/no-const-assign)\n\n  ```js\n  const score = 100\n  score = 125       // ✗ avoid\n  ```\n\n* **避免在條件語句中使用常數表達式（除了迴圈）。**\n\n  eslint: [`no-constant-condition`](http://eslint.org/docs/rules/no-constant-condition)\n\n  ```js\n  if (false) {    // ✗ avoid\n    // ...\n  }\n\n  if (x === 0) {  // ✓ ok\n    // ...\n  }\n\n  while (true) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **正規表達式中不使用控制字元。**\n\n  eslint: [`no-control-regex`](http://eslint.org/docs/rules/no-control-regex)\n\n  ```js\n  var pattern = /\\x1f/    // ✗ avoid\n  var pattern = /\\x20/    // ✓ ok\n  ```\n\n* **不使用 `debugger` 語句。**\n\n  eslint: [`no-debugger`](http://eslint.org/docs/rules/no-debugger)\n\n  ```js\n  function sum (a, b) {\n    debugger      // ✗ avoid\n    return a + b\n  }\n  ```\n\n* **不對變數使用 `delete`。**\n\n  eslint: [`no-delete-var`](http://eslint.org/docs/rules/no-delete-var)\n\n  ```js\n  var name\n  delete name     // ✗ avoid\n  ```\n\n* **函數不使用相同名稱的參數。**\n\n  eslint: [`no-dupe-args`](http://eslint.org/docs/rules/no-dupe-args)\n\n  ```js\n  function sum (a, b, a) {  // ✗ avoid\n    // ...\n  }\n\n  function sum (a, b, c) {  // ✓ ok\n    // ...\n  }\n  ```\n\n* **類別中不使用相同名稱的成員。**\n\n  eslint: [`no-dupe-class-members`](http://eslint.org/docs/rules/no-dupe-class-members)\n\n  ```js\n  class Dog {\n    bark () {}\n    bark () {}    // ✗ avoid\n  }\n  ```\n\n* **物件中不使用相同名稱的屬性。**\n\n  eslint: [`no-dupe-keys`](http://eslint.org/docs/rules/no-dupe-keys)\n\n  ```js\n  var user = {\n    name: 'Jane Doe',\n    name: 'John Doe'    // ✗ avoid\n  }\n  ```\n\n* **`switch` 中不使用相同名稱的 `case`。**\n\n  eslint: [`no-duplicate-case`](http://eslint.org/docs/rules/no-duplicate-case)\n\n  ```js\n  switch (id) {\n    case 1:\n      // ...\n    case 1:     // ✗ avoid\n  }\n  ```\n\n* **每個模組的引入只用一行。**\n\n  eslint: [`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)\n\n  ```js\n  import { myFunc1 } from 'module'\n  import { myFunc2 } from 'module'          // ✗ avoid\n\n  import { myFunc1, myFunc2 } from 'module' // ✓ ok\n  ```\n\n* **正規表達式中，不用空字元類別。**\n\n  eslint: [`no-empty-character-class`](http://eslint.org/docs/rules/no-empty-character-class)\n\n  ```js\n  const myRegex = /^abc[]/      // ✗ avoid\n  const myRegex = /^abc[a-z]/   // ✓ ok\n  ```\n\n* **不使用沒有建構出東西的賦值語句。**\n\n  eslint: [`no-empty-pattern`](http://eslint.org/docs/rules/no-empty-pattern)\n\n  ```js\n  const { a: {} } = foo         // ✗ avoid\n  const { a: { b } } = foo      // ✓ ok\n  ```\n\n* **不使用 `eval()`。**\n\n  eslint: [`no-eval`](http://eslint.org/docs/rules/no-eval)\n\n  ```js\n  eval( \"var result = user.\" + propName ) // ✗ avoid\n  var result = user[propName]             // ✓ ok\n  ```\n\n* **在 `catch` 語句中不要重新定義錯誤。**\n\n  eslint: [`no-ex-assign`](http://eslint.org/docs/rules/no-ex-assign)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    e = 'new value'             // ✗ avoid\n  }\n\n  try {\n    // ...\n  } catch (e) {\n    const newVal = 'new value'  // ✓ ok\n  }\n  ```\n\n* **不要擴展原生物件。**\n\n  eslint: [`no-extend-native`](http://eslint.org/docs/rules/no-extend-native)\n\n  ```js\n  Object.prototype.age = 21     // ✗ avoid\n  ```\n\n* **避免不必要的函數綁定（bind）。**\n\n  eslint: [`no-extra-bind`](ㄠ)\n\n  ```js\n  const name = function () {\n    getName()\n  }.bind(user)    // ✗ avoid\n\n  const name = function () {\n    this.getName()\n  }.bind(user)    // ✓ ok\n  ```\n\n* **避免不必要的布林型別轉換（boolean cast）。**\n\n  eslint: [`no-extra-boolean-cast`](http://eslint.org/docs/rules/no-extra-boolean-cast)\n\n  ```js\n  const result = true\n  if (!!result) {   // ✗ avoid\n    // ...\n  }\n\n  const result = true\n  if (result) {     // ✓ ok\n    // ...\n  }\n  ```\n\n* **函式宣告時周圍不加多餘的括弧。**\n\n  eslint: [`no-extra-parens`](http://eslint.org/docs/rules/no-extra-parens)\n\n  ```js\n  const myFunc = (function () { })   // ✗ avoid\n  const myFunc = function () { }     // ✓ ok\n  ```\n\n* **在 `switch` 中使用 `break` 避免把所有的 case 都執行了。**\n\n  eslint: [`no-fallthrough`](http://eslint.org/docs/rules/no-fallthrough)\n\n  ```js\n  switch (filter) {\n    case 1:\n      doSomething()    // ✗ avoid\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      break           // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n\n  switch (filter) {\n    case 1:\n      doSomething()\n      // fallthrough  // ✓ ok\n    case 2:\n      doSomethingElse()\n  }\n  ```\n\n* **小數點前後都要有數字。**\n\n  eslint: [`no-floating-decimal`](http://eslint.org/docs/rules/no-floating-decimal)\n\n  ```js\n  const discount = .5      // ✗ avoid\n  const discount = 0.5     // ✓ ok\n  ```\n\n* **避免重新定義已經宣告過的函式。**\n\n  eslint: [`no-func-assign`](http://eslint.org/docs/rules/no-func-assign)\n\n  ```js\n  function myFunc () { }\n  myFunc = myOtherFunc    // ✗ avoid\n  ```\n\n* **避免重新定義唯讀（read-only）的全域變數。**\n\n  eslint: [`no-global-assign`](http://eslint.org/docs/rules/no-global-assign)\n\n  ```js\n  window = {}     // ✗ avoid\n  ```\n\n* **不要間接使用 `eval()`。**\n\n  eslint: [`no-implied-eval`](http://eslint.org/docs/rules/no-implied-eval)\n\n  ```js\n  setTimeout(\"alert('Hello world')\")                   // ✗ avoid\n  setTimeout(function () { alert('Hello world') })     // ✓ ok\n  ```\n\n* **不要在巢狀架構中宣告函式。**\n\n  eslint: [`no-inner-declarations`](http://eslint.org/docs/rules/no-inner-declarations)\n\n  ```js\n  if (authenticated) {\n    function setAuthUser () {}    // ✗ avoid\n  }\n  ```\n\n* **不要在 `RegExp` 中使用錯誤的表達式句子。**\n\n  eslint: [`no-invalid-regexp`](http://eslint.org/docs/rules/no-invalid-regexp)\n\n  ```js\n  RegExp('[a-z')    // ✗ avoid\n  RegExp('[a-z]')   // ✓ ok\n  ```\n\n* **避免不正常的空白。**\n\n  eslint: [`no-irregular-whitespace`](http://eslint.org/docs/rules/no-irregular-whitespace)\n\n  ```js\n  function myFunc () /*<NBSP>*/{}   // ✗ avoid\n  ```\n\n* **不使用 `__iterator__`。**\n\n  eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator)\n\n  ```js\n  Foo.prototype.__iterator__ = function () {}   // ✗ avoid\n  ```\n\n* **避免 label 和變數有相同的名稱。**\n\n  eslint: [`no-label-var`](http://eslint.org/docs/rules/no-label-var)\n\n  ```js\n  var score = 100\n  function game () {\n    score: 50         // ✗ avoid\n  }\n  ```\n\n* **避免 label 語法。**\n\n  eslint: [`no-labels`](http://eslint.org/docs/rules/no-labels)\n\n  ```js\n  label:\n    while (true) {\n      break label     // ✗ avoid\n    }\n  ```\n\n* **避免非必要的巢狀架構。**\n\n  eslint: [`no-lone-blocks`](http://eslint.org/docs/rules/no-lone-blocks)\n\n  ```js\n  function myFunc () {\n    {                   // ✗ avoid\n      myOtherFunc()\n    }\n  }\n\n  function myFunc () {\n    myOtherFunc()       // ✓ ok\n  }\n  ```\n\n* **縮排避免混雜著空白和 tab。**\n\n  eslint: [`no-mixed-spaces-and-tabs`](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs)\n\n* **除了縮排，不使用多個連續空白。**\n\n  eslint: [`no-multi-spaces`](http://eslint.org/docs/rules/no-multi-spaces)\n\n  ```js\n  const id =    1234    // ✗ avoid\n  const id = 1234       // ✓ ok\n  ```\n\n* **不使用跳脫字元建立多行字串。**\n\n  eslint: [`no-multi-str`](http://eslint.org/docs/rules/no-multi-str)\n\n  ```js\n  const message = 'Hello \\\n                   world'     // ✗ avoid\n  ```\n\n* **不要使用 `new` 卻不把結果存下。**\n\n  eslint: [`no-new`](http://eslint.org/docs/rules/no-new)\n\n  ```js\n  new Character()                     // ✗ avoid\n  const character = new Character()   // ✓ ok\n  ```\n\n* **不使用 `Function` 建構子。**\n\n  eslint: [`no-new-func`](http://eslint.org/docs/rules/no-new-func)\n\n  ```js\n  var sum = new Function('a', 'b', 'return a + b')    // ✗ avoid\n  ```\n\n* **不使用 `Object` 建構子。**\n\n  eslint: [`no-new-object`](http://eslint.org/docs/rules/no-new-object)\n\n  ```js\n  let config = new Object()   // ✗ avoid\n  ```\n\n* **不使用 `new require`。**\n\n  eslint: [`no-new-require`](http://eslint.org/docs/rules/no-new-require)\n\n  ```js\n  const myModule = new require('my-module')    // ✗ avoid\n  ```\n\n* **不使用 `Symbol` 建構子。**\n\n  eslint: [`no-new-symbol`](http://eslint.org/docs/rules/no-new-symbol)\n\n  ```js\n  const foo = new Symbol('foo')   // ✗ avoid\n  ```\n\n* **不使用原始包裝器（primitive wrapper instances），比如說 String、Number 和 Boolean。**\n\n  eslint: [`no-new-wrappers`](http://eslint.org/docs/rules/no-new-wrappers)\n\n  ```js\n  const message = new String('hello')   // ✗ avoid\n  ```\n\n* **不要把全域物件當成函式呼叫。**\n\n  eslint: [`no-obj-calls`](http://eslint.org/docs/rules/no-obj-calls)\n\n  ```js\n  const math = Math()   // ✗ avoid\n  ```\n\n* **宣告數字時不使用八進位的表達式。**\n\n  eslint: [`no-octal`](http://eslint.org/docs/rules/no-octal)\n\n  ```js\n  const num = 042     // ✗ avoid\n  const num = '042'   // ✓ ok\n  ```\n\n* **字串中不使用八進位的跳脫序列。**\n\n  eslint: [`no-octal-escape`](http://eslint.org/docs/rules/no-octal-escape)\n\n  ```js\n  const copyright = 'Copyright \\251'  // ✗ avoid\n  ```\n\n* **避免連結字串的時候使用 `__dirname` 和 `__filename`。.**\n\n  eslint: [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat)\n\n  ```js\n  const pathToFile = __dirname + '/app.js'            // ✗ avoid\n  const pathToFile = path.join(__dirname, 'app.js')   // ✓ ok\n  ```\n\n* **避免使用 `__proto__`.** 用 `getPrototypeOf` 替代.\n\n  eslint: [`no-proto`](http://eslint.org/docs/rules/no-proto)\n\n  ```js\n  const foo = obj.__proto__               // ✗ avoid\n  const foo = Object.getPrototypeOf(obj)  // ✓ ok\n  ```\n\n* **避免重新宣告變數。**\n\n  eslint: [`no-redeclare`](http://eslint.org/docs/rules/no-redeclare)\n\n  ```js\n  let name = 'John'\n  let name = 'Jane'     // ✗ avoid\n\n  let name = 'John'\n  name = 'Jane'         // ✓ ok\n  ```\n\n* **正規表達式中避免多個空白。**\n\n  eslint: [`no-regex-spaces`](http://eslint.org/docs/rules/no-regex-spaces)\n\n  ```js\n  const regexp = /test   value/   // ✗ avoid\n\n  const regexp = /test {3}value/  // ✓ ok\n  const regexp = /test value/     // ✓ ok\n  ```\n\n* **在 return 語句中，如果要賦值的話，必須用括弧包住。**\n\n  eslint: [`no-return-assign`](http://eslint.org/docs/rules/no-return-assign)\n\n  ```js\n  function sum (a, b) {\n    return result = a + b     // ✗ avoid\n  }\n\n  function sum (a, b) {\n    return (result = a + b)   // ✓ ok\n  }\n  ```\n\n* **避免把變數賦值給自己。**\n\n  eslint: [`no-self-assign`](http://eslint.org/docs/rules/no-self-assign)\n\n  ```js\n  name = name   // ✗ avoid\n  ```\n\n* **避免把變數跟自己比較。**\n\n  esint: [`no-self-compare`](http://eslint.org/docs/rules/no-self-compare)\n\n  ```js\n  if (score === score) {}   // ✗ avoid\n  ```\n\n* **避免使用逗號運算子。**\n\n  eslint: [`no-sequences`](http://eslint.org/docs/rules/no-sequences)\n\n  ```js\n  if (doSomething(), !!test) {}   // ✗ avoid\n  ```\n\n* **不可以把關鍵字遮蔽。**\n\n  eslint: [`no-shadow-restricted-names`](http://eslint.org/docs/rules/no-shadow-restricted-names)\n\n  ```js\n  let undefined = 'value'     // ✗ avoid\n  ```\n\n* **避免使用稀疏陣列（sparse array）宣告。**\n\n  eslint: [`no-sparse-arrays`](http://eslint.org/docs/rules/no-sparse-arrays)\n\n  ```js\n  let fruits = ['apple',, 'orange']       // ✗ avoid\n  ```\n\n* **不使用 Tab。**\n\n  eslint: [`no-tabs`](http://eslint.org/docs/rules/no-tabs)\n\n* **一般字串不使用樣板語法。**\n\n  eslint: [`no-template-curly-in-string`](http://eslint.org/docs/rules/no-template-curly-in-string)\n\n  ```js\n  const message = 'Hello ${name}'   // ✗ avoid\n  const message = `Hello ${name}`   // ✓ ok\n  ```\n\n* **`super()` 要在 `this` 之前被呼叫。**\n\n  eslint: [`no-this-before-super`](http://eslint.org/docs/rules/no-this-before-super)\n\n  ```js\n  class Dog extends Animal {\n    constructor () {\n      this.legs = 4     // ✗ avoid\n      super()\n    }\n  }\n  ```\n\n* **錯誤時只拋出（`throw`） `Error` 型態.**\n\n  eslint: [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal)\n\n  ```js\n  throw 'error'               // ✗ avoid\n  throw new Error('error')    // ✓ ok\n  ```\n\n* **行尾不加空白。**\n\n  eslint: [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces)\n\n* **避免用 `undefined` 初始化。**\n\n  eslint: [`no-undef-init`](http://eslint.org/docs/rules/no-undef-init)\n\n  ```js\n  let name = undefined    // ✗ avoid\n\n  let name\n  name = 'value'          // ✓ ok\n  ```\n\n* **避免一成不變的循環條件。**\n\n  eslint: [`no-unmodified-loop-condition`](http://eslint.org/docs/rules/no-unmodified-loop-condition)\n\n  ```js\n  for (let i = 0; i < items.length; j++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **避免不必要的三元運算子。**\n\n  eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary)\n\n  ```js\n  let score = val ? val : 0     // ✗ avoid\n  let score = val || 0          // ✓ ok\n  ```\n\n* **避免在 `return`、`throw`、`continue` 和 `break` 後面有不會被執行的程式碼。**\n\n  eslint: [`no-unreachable`](http://eslint.org/docs/rules/no-unreachable)\n\n  ```js\n  function doSomething () {\n    return true\n    console.log('never called')     // ✗ avoid\n  }\n  ```\n\n* **避免在 `finally` 裡面加入控制流的語句。**\n\n  eslint: [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally)\n\n  ```js\n  try {\n    // ...\n  } catch (e) {\n    // ...\n  } finally {\n    return 42     // ✗ avoid\n  }\n  ```\n\n* **關係運算子的左運算元不可以被否定。**\n\n  eslint: [`no-unsafe-negation`](http://eslint.org/docs/rules/no-unsafe-negation)\n\n  ```js\n  if (!key in obj) {}       // ✗ avoid\n  ```\n\n* **避免不必要的 `.call()` 和 `.apply()` 用法。**\n\n  eslint: [`no-useless-call`](http://eslint.org/docs/rules/no-useless-call)\n\n  ```js\n  sum.call(null, 1, 2, 3)   // ✗ avoid\n  ```\n\n* **避免物件中使用多餘計算的屬性。**\n\n  eslint: [`no-useless-computed-key`](http://eslint.org/docs/rules/no-useless-computed-key)\n\n  ```js\n  const user = { ['name']: 'John Doe' }   // ✗ avoid\n  const user = { name: 'John Doe' }       // ✓ ok\n  ```\n\n* **避免不必要的建構子。**\n\n  eslint: [`no-useless-constructor`](http://eslint.org/docs/rules/no-useless-constructor)\n\n  ```js\n  class Car {\n    constructor () {      // ✗ avoid\n    }\n  }\n  ```\n\n* **避免不必要的跳脫字元。**\n\n  eslint: [`no-useless-escape`](http://eslint.org/docs/rules/no-useless-escape)\n\n  ```js\n  let message = 'Hell\\o'  // ✗ avoid\n  ```\n\n* **避免在 import、export 和 destructured 時，不必要的重新命名。**\n\n  eslint: [`no-useless-rename`](http://eslint.org/docs/rules/no-useless-rename)\n\n  ```js\n  import { config as config } from './config'     // ✗ avoid\n  import { config } from './config'               // ✓ ok\n  ```\n\n* **避免在屬性前加空白。**\n\n  eslint: [`no-whitespace-before-property`](http://eslint.org/docs/rules/no-whitespace-before-property)\n\n  ```js\n  user .name      // ✗ avoid\n  user.name       // ✓ ok\n  ```\n\n* **避免使用 `with`。**\n\n  eslint: [`no-with`](http://eslint.org/docs/rules/no-with)\n\n  ```js\n  with (val) {...}    // ✗ avoid\n  ```\n\n* **維持物件屬性宣告時，換行的一致性。**\n\n  eslint: [`object-property-newline`](http://eslint.org/docs/rules/object-property-newline)\n\n  ```js\n  const user = {\n    name: 'Jane Doe', age: 30,\n    username: 'jdoe86'            // ✗ avoid\n  }\n\n  const user = { name: 'Jane Doe', age: 30, username: 'jdoe86' }    // ✓ ok\n\n  const user = {\n    name: 'Jane Doe',\n    age: 30,\n    username: 'jdoe86'\n  }                                                                 // ✓ ok\n  ```\n\n* **程式區塊前後不要加空行。**\n\n  eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks)\n\n  ```js\n  if (user) {\n                              // ✗ avoid\n    const name = getName()\n\n  }\n\n  if (user) {\n    const name = getName()    // ✓ ok\n  }\n  ```\n\n* **展開運算子（spread operator）前不要加空格。**\n\n  eslint: [`rest-spread-spacing`](http://eslint.org/docs/rules/rest-spread-spacing)\n\n  ```js\n  fn(... args)    // ✗ avoid\n  fn(...args)     // ✓ ok\n  ```\n\n* **分號後面要加空格，前面不要加。**\n\n  eslint: [`semi-spacing`](http://eslint.org/docs/rules/semi-spacing)\n\n  ```js\n  for (let i = 0 ;i < items.length ;i++) {...}    // ✗ avoid\n  for (let i = 0; i < items.length; i++) {...}    // ✓ ok\n  ```\n\n* **程式區塊前要加空格。**\n\n  eslint: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks)\n\n  ```js\n  if (admin){...}     // ✗ avoid\n  if (admin) {...}    // ✓ ok\n  ```\n\n* **括弧內不要加空格。**\n\n  eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens)\n\n  ```js\n  getName( name )     // ✗ avoid\n  getName(name)       // ✓ ok\n  ```\n\n* **一元運算子後面要加空格。**\n\n  eslint: [`space-unary-ops`](http://eslint.org/docs/rules/space-unary-ops)\n\n  ```js\n  typeof!admin        // ✗ avoid\n  typeof !admin        // ✓ ok\n  ```\n\n* **註解前要加空格。**\n\n  eslint: [`spaced-comment`](http://eslint.org/docs/rules/spaced-comment)\n\n  ```js\n  //comment           // ✗ avoid\n  // comment          // ✓ ok\n\n  /*comment*/         // ✗ avoid\n  /* comment */       // ✓ ok\n  ```\n\n* **樣板語法不加空格。**\n\n  eslint: [`template-curly-spacing`](http://eslint.org/docs/rules/template-curly-spacing)\n\n  ```js\n  const message = `Hello, ${ name }`    // ✗ avoid\n  const message = `Hello, ${name}`      // ✓ ok\n  ```\n\n* **用 `isNaN()` 檢查是否為 `NaN`.**\n\n  eslint: [`use-isnan`](http://eslint.org/docs/rules/use-isnan)\n\n  ```js\n  if (price === NaN) { }      // ✗ avoid\n  if (isNaN(price)) { }       // ✓ ok\n  ```\n\n* **`typeof` 比較的對象一定要是有效的字串。**\n\n  eslint: [`valid-typeof`](http://eslint.org/docs/rules/valid-typeof)\n\n  ```js\n  typeof name === 'undefimed'     // ✗ avoid\n  typeof name === 'undefined'     // ✓ ok\n  ```\n\n* **立即執行的函數需要被包起來。**\n\n  eslint: [`wrap-iife`](http://eslint.org/docs/rules/wrap-iife)\n\n  ```js\n  const getName = function () { }()     // ✗ avoid\n\n  const getName = (function () { }())   // ✓ ok\n  const getName = (function () { })()   // ✓ ok\n  ```\n\n* **`yield*` 中的 `*` 前後要加空格。**\n\n  eslint: [`yield-star-spacing`](http://eslint.org/docs/rules/yield-star-spacing)\n\n  ```js\n  yield* increment()    // ✗ avoid\n  yield * increment()   // ✓ ok\n  ```\n\n* **避免使用 Yoda 語法。**\n\n  eslint: [`yoda`](http://eslint.org/docs/rules/yoda)\n\n  ```js\n  if (42 === age) { }    // ✗ avoid\n  if (age === 42) { }    // ✓ ok\n  ```\n\n## 分號\n\n* 不要加分號。 (詳見： [1](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding), [2](http://inimino.org/%7Einimino/blog/javascript_semicolons), [3](https://www.youtube.com/watch?v=gsfbh17Ax9I))\n\n  eslint: [`semi`](http://eslint.org/docs/rules/semi)\n\n  ```js\n  window.alert('hi')   // ✓ ok\n  window.alert('hi');  // ✗ avoid\n  ```\n\n* 絕對不要用 `(` 、 `[` 或 `` ` `` 當開頭，這是不用分號 **唯一** 可能遇到的問題。\n\n  eslint: [`no-unexpected-multiline`](http://eslint.org/docs/rules/no-unexpected-multiline)\n\n  ```js\n  // ✓ ok\n  ;(function () {\n    window.alert('ok')\n  }())\n\n  // ✗ avoid\n  (function () {\n    window.alert('ok')\n  }())\n  ```\n\n  ```js\n  // ✓ ok\n  ;[1, 2, 3].forEach(bar)\n\n  // ✗ avoid\n  [1, 2, 3].forEach(bar)\n  ```\n\n  ```js\n  // ✓ ok\n  ;`hello`.indexOf('o')\n\n  // ✗ avoid\n  `hello`.indexOf('o')\n  ```\n\n  注意：如果你通常會這樣寫程式，你也許是太想讓自己的程式碼看起來比別人聰明了。\n\n  一些看似很厲害的縮寫通常是對讀程式碼的人不友善的，你應該盡量把程式碼寫的清楚而且可讀性高。\n\n  比起這種寫法：\n\n  ```js\n  ;[1, 2, 3].forEach(bar)\n  ```\n\n  這種寫法是更推薦的：\n\n  ```js\n  var nums = [1, 2, 3]\n  nums.forEach(bar)\n  ```\n\n\n## 延伸閱讀\n\n- [An Open Letter to JavaScript Leaders Regarding Semicolons][1]\n- [JavaScript Semicolon Insertion – Everything you need to know][2]\n\n##### 還有延伸影片：\n\n- [Are Semicolons Necessary in JavaScript? - YouTube][3]\n\n所有當今流行的程式語言都使用 AST 為基礎來做程式碼的最小化（code minification），所以可以完美的處理沒有分號的 JavaScript。\n\n##### 節選自 *[\"An Open Letter to JavaScript Leaders Regarding Semicolons\"][1]*:\n>\n> [依賴自動插入分號]非常的安全，而且合語法的 JavaScript 是跨瀏覽器都相容的。Closure compiler、yuicompressor、packer 和 jsmin 都可以正確的最小化，所以沒有效能的問題。\n>\n> 我很抱歉，這個語言社群的領導者們給你們謊言和恐懼，而不是教育你們。這是很羞恥的。我建議你們去學習一下 JavaScript 語句到底是如何結束的（還有哪些是不會結束的），如此你們就可以寫下漂亮的程式碼。\n>\n> 一般來說， `\\n` 結束一個語句，除非：\n>   1. 這個語句有未結束的括弧、陣列、或物件，或其他不正常結束的句子（比如說用 `.` 或 `,` 結尾）\n>   2. 該行的內容是 `--` 或 `++` （這種情況下，他會減少或增加下一個遇到的元素）\n>   3. 該行是 `for()`、`while()`、`do`、`if()` 或 `else`，而還沒有出現 `{`\n>   4. 隔行的開頭是 `[`、`(`、`+`、`*`、`/`、`-`、`,`、`.` 或其他一定要兩個運算元的一元運算子。\n>\n> 第一種是非常顯而易見的。即使 JSLint 也允許 JSON 、有括弧的建構子和 `var` 誇多行語句的宣告可以有 `\\n` 在其中。\n>\n> 第二種是非常奇怪的語法。我現實中沒有看過這種例子（除了在這類討論之外），會想寫出 `i\\n++\\nj` 這種奇怪的程式碼，這會被編譯器解讀成 `i; ++j`，而非 `i++; j`。\n>\n> 第三種就非常好理解。`if (x)\\ny()` 和 `if (x) { y() }` 是相同的。建構子會一直往後找到一個區塊或一個語句。\n>\n> `;` 是一個合法的 JavaScript 語句。所以 `if(x);` 和 `if(x){}` 是相同的，代表 “如果 x, 什麼都不要做。” 當迴圈的判斷和更新是同一個函式的時候，有時候會被用到。不太常見，但是也不是沒看過。\n>\n> 第四種是那些常常被提到說：「看！你需要分號吧！」的例子。但是其實這很簡單可以避免，只要在該行開始前加個分號就好了。舉例來說，如果你原本要這樣寫：\n>\n> ```js\n> foo();\n> [1,2,3].forEach(bar);\n> ```\n>\n> 你其實可以這樣寫：\n>\n> ```js\n> foo()\n> ;[1,2,3].forEach(bar)\n> ```\n>\n> 這樣的好處是這些前綴字是很好被察覺的，你可以很容易發現那些 `(` 或 `[` 開頭而沒有分號的地方。\n\n[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding\n[2]: http://inimino.org/~inimino/blog/javascript_semicolons\n[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I\n"
  },
  {
    "path": "docs/webstorm.md",
    "content": "# [WebStorm][webstorm-1] configuration for Standard Style\n\n## Native support for `standard`\n\nWebStorm [recently announced native support](https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2272/)\nfor `standard` directly in the IDE!\n\nThis applies to all JetBrains products, including PhpStorm, IntelliJ, RubyMine, etc.\n\nIf you still prefer to configure `standard` manually, use the following guide.\n\n## Configure `standard` support manually\n\n1. Close your IDE.\n2. [Figure out where your configuration lives][webstorm-2] (_IDE Settings_ section)\n3. Navigate to `your-config-dir/codestyles`. If this directory doesn't exist,\n   create it in the WebStorm config settings directory\n4. Create a `Standard.xml` file:\n  ```xml\n    <code_scheme name=\"Standard\">\n      <JSCodeStyleSettings>\n        <option name=\"USE_SEMICOLON_AFTER_STATEMENT\" value=\"false\" />\n        <option name=\"USE_DOUBLE_QUOTES\" value=\"false\" />\n        <option name=\"SPACES_WITHIN_IMPORTS\" value=\"true\" />\n      </JSCodeStyleSettings>\n      <codeStyleSettings language=\"JavaScript\">\n        <option name=\"KEEP_BLANK_LINES_IN_CODE\" value=\"1\" />\n        <option name=\"SPACE_BEFORE_METHOD_PARENTHESES\" value=\"true\" />\n        <option name=\"KEEP_SIMPLE_BLOCKS_IN_ONE_LINE\" value=\"true\" />\n        <option name=\"KEEP_SIMPLE_METHODS_IN_ONE_LINE\" value=\"true\" />\n        <indentOptions>\n          <option name=\"INDENT_SIZE\" value=\"2\" />\n          <option name=\"CONTINUATION_INDENT_SIZE\" value=\"2\" />\n          <option name=\"TAB_SIZE\" value=\"2\" />\n        </indentOptions>\n      </codeStyleSettings>\n    </code_scheme>\n  ```\n\n5. You may install dependencies and config globally or locally and with support of ES7 or without it\n  - **Local** install:\n    - `npm install --save-dev eslint-config-standard eslint-config-standard-jsx eslint-plugin-promise eslint-plugin-react eslint-plugin-standard`\n    - `echo '{\"extends\": [\"standard\", \"standard-jsx\"]}' > .eslintrc`\n  - **Global** install:\n    - `npm install --global eslint-config-standard eslint-config-standard-jsx eslint-plugin-promise eslint-plugin-react eslint-plugin-standard`\n    - `echo '{\"extends\": [\"standard\", \"standard-jsx\"]}' > ~/.eslintrc`\n\n  Be aware: The second command above will overwrite an existing `.eslintrc` if one exists.\n\n  If you choose global install, the first command may require you to use `sudo`. If\n  it does require sudo, that means you do not have permission to write to the\n  directories that npm uses to store global packages. `Standard` will work, but if\n  you would like to fix it, [read this article][npm-article].\n\n6. Start up the IDE and open a _Settings_/_Preferences_ screen (choose between project and default settings accordingly to your preference)\n7. Under `Editor > Code Style > JavaScript` change `Scheme` to `Standard`\n8. Under `Editor > Code Style > HTML` just select `Other`, in `Spaces` setting, check `In empty tag`\n9. Under `Editor > Inspections > JavaScript > Code style issues` untick `Unterminated statement`\n10. Under `Languages & Frameworks > JavaScript > Code Quality Tools > ESLint` just select `Enable`. If you didn't install `ESLint` before and you don't have it in your dependencies - that's all. If you do - be sure to use `ESLint package` of the same version as current version of `standard` is using. Or just remove your old one - you probably won't need it anymore\n\n---\n\n[npm-article]: https://docs.npmjs.com/getting-started/fixing-npm-permissions\n[webstorm-1]: https://www.jetbrains.com/webstorm/\n[webstorm-2]: https://www.jetbrains.com/help/phpstorm/2016.1/directories-used-by-phpstorm-to-store-settings-caches-plugins-and-logs.html?origin=old_help#d66583e60\n"
  },
  {
    "path": "eslintrc.json",
    "content": "{\n  \"extends\": [\"happiness\", \"happiness-jsx\"]\n}\n"
  },
  {
    "path": "index.js",
    "content": "var Linter = require('standard-engine').linter;\nvar opts = require('./options');\n\nmodule.exports = new Linter(opts);\n"
  },
  {
    "path": "options.js",
    "content": "var eslint = require('eslint');\nvar path = require('path');\nvar pkg = require('./package.json');\n\nmodule.exports = {\n\tbugs: pkg.bugs.url,\n\tcmd: 'happiness',\n\teslint: eslint,\n\teslintConfig: {\n\t\tconfigFile: path.join(__dirname, 'eslintrc.json')\n\t},\n\thomepage: pkg.homepage,\n\ttagline: 'Use JavaScript Happiness Style',\n\tversion: pkg.version\n};\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"happiness\",\n  \"description\": \"JavaScript Happiness Style\",\n  \"version\": \"10.0.2\",\n  \"author\": {\n    \"email\": \"feross@feross.org\",\n    \"name\": \"Feross Aboukhadijeh\",\n    \"url\": \"http://feross.org/\"\n  },\n  \"contributors\": [{\n    \"name\": \"Jed Watson\"\n  }, {\n    \"name\": \"Daniel Cousens\"\n  }, {\n    \"name\": \"Wes Todd\"\n  }],\n  \"bin\": \"./bin/cmd.js\",\n  \"bugs\": {\n    \"url\": \"https://github.com/JedWatson/happiness/issues\"\n  },\n  \"dependencies\": {\n    \"eslint\": \"~3.19.0\",\n    \"eslint-config-happiness\": \"10.2.1\",\n    \"eslint-config-happiness-jsx\": \"4.0.2\",\n    \"eslint-plugin-import\": \"~2.2.0\",\n    \"eslint-plugin-node\": \"~4.2.2\",\n    \"eslint-plugin-promise\": \"~3.5.0\",\n    \"eslint-plugin-react\": \"~6.10.0\",\n    \"eslint-plugin-standard\": \"~3.0.1\",\n    \"standard-engine\": \"~7.0.0\"\n  },\n  \"devDependencies\": {\n    \"babel-eslint\": \"^7.0.0\",\n    \"cross-spawn\": \"^5.0.1\",\n    \"eslint-index\": \"^1.3.0\",\n    \"minimist\": \"^1.2.0\",\n    \"mkdirp\": \"^0.5.1\",\n    \"run-parallel-limit\": \"^1.0.3\",\n    \"standard-packages\": \"^3.1.9\",\n    \"tape\": \"^4.6.0\"\n  },\n  \"engines\": {\n    \"node\": \">=4\"\n  },\n  \"homepage\": \"https://github.com/JedWatson/happiness\",\n  \"keywords\": [\n    \"JavaScript Happiness Style\",\n    \"JavaScript Standard Style\",\n    \"check\",\n    \"checker\",\n    \"code\",\n    \"code checker\",\n    \"code linter\",\n    \"code standards\",\n    \"code style\",\n    \"enforce\",\n    \"eslint\",\n    \"hint\",\n    \"jscs\",\n    \"jshint\",\n    \"lint\",\n    \"policy\",\n    \"quality\",\n    \"simple\",\n    \"standard\",\n    \"happiness\",\n    \"standard style\",\n    \"happiness style\",\n    \"style\",\n    \"style checker\",\n    \"style linter\",\n    \"verify\"\n  ],\n  \"license\": \"MIT\",\n  \"main\": \"index.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/JedWatson/happiness.git\"\n  },\n  \"scripts\": {\n    \"show-rules\": \"eslint-index eslintrc.json\",\n    \"show-rules-disabled\": \"eslint-index eslintrc.json --status omitted off\",\n    \"show-summary\": \"eslint-index eslintrc.json --format table\",\n    \"test\": \"./bin/cmd.js --verbose && tape test/*.js\",\n    \"test-disabled\": \"npm test -- --disabled\",\n    \"test-offline\": \"npm test -- --offline\",\n    \"test-offline-quick\": \"npm test -- --offline --quick\",\n    \"test-quick\": \"npm test -- --quick\",\n    \"update-authors\": \"./bin/update-authors.sh\"\n  }\n}\n"
  },
  {
    "path": "test/api.js",
    "content": "var standard = require('../');\nvar test = require('tape');\n\ntest('api: lintFiles', function (t) {\n\tt.plan(3);\n\tstandard.lintFiles([], { cwd: 'bin' }, function (err, result) {\n\t\tt.error(err, 'no error while linting');\n\t\tt.equal(typeof result, 'object', 'result is an object');\n\t\tt.equal(result.errorCount, 0);\n\t});\n});\n\ntest('api: lintText', function (t) {\n\tt.plan(3);\n\tstandard.lintText('console.log(\"hi there\");\\n', function (err, result) {\n\t\tt.error(err, 'no error while linting');\n\t\tt.equal(typeof result, 'object', 'result is an object');\n\t\tt.equal(result.errorCount, 1, 'should have used single quotes');\n\t});\n});\n"
  },
  {
    "path": "test/clone.js",
    "content": "/**\n * Clones several projects that are known to follow \"JavaScript Standard Style\" and runs\n * the `standard` style checker to verify that it passes without warnings. This helps\n * ensure we don't accidentally introduce new style rules that cause previously \"good\"\n * code to start failing with new warnings! (And if we do, then that needs to be a MAJOR\n * VERSION BUMP.)\n *\n\nvar crossSpawn = require('cross-spawn')\nvar fs = require('fs')\nvar minimist = require('minimist')\nvar mkdirp = require('mkdirp')\nvar os = require('os')\nvar parallelLimit = require('run-parallel-limit')\nvar path = require('path')\nvar standardPackages = require('standard-packages')\nvar test = require('tape')\n\nvar GIT = 'git'\nvar STANDARD = path.join(__dirname, '..', 'bin', 'cmd.js')\nvar TMP = path.join(__dirname, '..', 'tmp')\nvar PARALLEL_LIMIT = os.cpus().length\n\nvar argv = minimist(process.argv.slice(2), {\n  boolean: [\n    'disabled',\n    'offline',\n    'quick',\n    'quiet'\n  ]\n})\n\nvar testPackages = argv.quick\n  ? standardPackages.test.slice(0, 20)\n  : standardPackages.test\n\nvar disabledPackages = []\ntestPackages = testPackages.filter(function (pkg) {\n  if (pkg.disable) disabledPackages.push(pkg)\n  return !pkg.disable\n})\n\nif (argv.disabled) {\n  testPackages = disabledPackages\n} else {\n  test('Disabled Packages', function (t) {\n    disabledPackages.forEach(function (pkg) {\n      console.log('DISABLED: ' + pkg.name + ': ' + pkg.disable + ' (' + pkg.repo + ')')\n    })\n    t.end()\n  })\n}\n\ntest('test github repos that use `standard`', function (t) {\n  t.plan(testPackages.length)\n\n  mkdirp.sync(TMP)\n\n  parallelLimit(testPackages.map(function (pkg) {\n    var name = pkg.name\n    var url = pkg.repo + '.git'\n    var folder = path.join(TMP, name)\n    return function (cb) {\n      fs.access(path.join(TMP, name), fs.R_OK | fs.W_OK, function (err) {\n        if (argv.offline) {\n          if (err) {\n            t.pass('SKIPPING (offline): ' + name + ' (' + pkg.repo + ')')\n            return cb(null)\n          }\n          runStandard(cb)\n        } else {\n          downloadPackage(function (err) {\n            if (err) return cb(err)\n            runStandard(cb)\n          })\n        }\n\n        function downloadPackage (cb) {\n          if (err) gitClone(cb)\n          else gitPull(cb)\n        }\n\n        function gitClone (cb) {\n          var args = [ 'clone', '--depth', 1, url, path.join(TMP, name) ]\n          spawn(GIT, args, { stdio: 'ignore' }, function (err) {\n            if (err) err.message += ' (git clone) (' + name + ')'\n            cb(err)\n          })\n        }\n\n        function gitPull (cb) {\n          var args = [ 'pull' ]\n          spawn(GIT, args, { cwd: folder, stdio: 'ignore' }, function (err) {\n            if (err) err.message += ' (git pull) (' + name + ')'\n            cb(err)\n          })\n        }\n\n        function runStandard (cb) {\n          var args = [ '--verbose' ]\n          if (pkg.args) args.push.apply(args, pkg.args)\n          spawn(STANDARD, args, { cwd: folder }, function (err) {\n            var str = name + ' (' + pkg.repo + ')'\n            if (err) { t.fail(str) } else { t.pass(str) }\n            cb(null)\n          })\n        }\n      })\n    }\n  }), PARALLEL_LIMIT, function (err) {\n    if (err) throw err\n  })\n})\n\nfunction spawn (command, args, opts, cb) {\n  if (!opts.stdio) opts.stdio = argv.quiet ? 'ignore' : 'inherit'\n\n  var child = crossSpawn(command, args, opts)\n  child.on('error', cb)\n  child.on('close', function (code) {\n    if (code !== 0) return cb(new Error('non-zero exit code: ' + code))\n    cb(null)\n  })\n  return child\n}\n*/\n"
  },
  {
    "path": "test/cmd.js",
    "content": "var path = require('path');\nvar test = require('tape');\nvar crossSpawn = require('cross-spawn');\n\nvar CMD_PATH = path.join(__dirname, '..', 'bin', 'cmd.js');\n\ntest('command line usage: --help', function (t) {\n\tt.plan(1);\n\n\tvar child = crossSpawn(CMD_PATH, ['--help']);\n\tchild.on('error', function (err) {\n\t\tt.fail(err);\n\t});\n\tchild.on('close', function (code) {\n\t\tt.equal(code, 0, 'zero exit code');\n\t});\n});\n"
  }
]