└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # ESLint 2 | 3 | [![Gitter](https://badges.gitter.im/eslint/eslint-jp.svg)](https://gitter.im/eslint/eslint-jp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 4 | 5 | このリポジトリは [ESLint](https://github.com/eslint/eslint) に関するバグ報告・機能提案・質問を日本語で行える場所です。 6 | 7 | ESLint に関することなら、何でもお気軽に [Issue](https://github.com/eslint/eslint-jp/issues/new) を作ってみてください。 8 | 9 | 例えば、 10 | 11 | - バグっぽい動作を見つけた 12 | - こんな機能 / ルールがほしい 13 | - この機能を日本語で解説して欲しい 14 | - ○○したいんだけど、どうすればいいの? 15 | 16 | オープンソース プロジェクトにとってユーザーの声は財産です。 17 | どうぞよろしくお願いします。 18 | 19 | ## 解説記事など 20 | 21 | - [ESLint 最初の一歩](http://qiita.com/mysticatea/items/f523dab04a25f617c87d) 22 | - [ESLint v2.0.0 の変更点まとめ](http://qiita.com/mysticatea/items/8bcecd821cca9e849078) 23 | - [共有設定でらくらく ESLint](http://qiita.com/mysticatea/items/dc35ced6bd5e782f50cd) 24 | - [ESLint をグローバルにインストールせずに使う](http://qiita.com/mysticatea/items/6bd56ff691d3a1577321) 25 | - [ESLint のカスタムルールを作ろう! (その1)](http://qiita.com/mysticatea/items/cc3f648e11368799e66c) 26 | 27 | ---- 28 | 29 | 以下は [README.md](https://github.com/eslint/eslint#readme) の一部です。 30 | 31 | ## インストール方法 32 | 33 | ESLint は npm を使ってインストールします。 34 | 35 | npm install -g eslint 36 | 37 | ## 使い方 38 | 39 | 最初に `--init` オプションを利用して設定ファイルを作ります。 40 | 41 | eslint --init 42 | 43 | そして、任意の JS コードに対して eslint コマンドを実行します。 44 | 45 | eslint test.js test2.js 46 | 47 | ## 設定ファイル 48 | 49 | `eslint --init` コマンドを実行すると、`.eslintrc` ファイルが作成されます。 50 | `.eslintrc` ファイルによって、どんなルールで JS コードを検証するかを設定することができます。 51 | 52 | ```json 53 | { 54 | "extends": "eslint:recommended", 55 | "rules": { 56 | "semi": [2, "always"], 57 | "quotes": [2, "double"] 58 | } 59 | } 60 | ``` 61 | 62 | `"semi"` と `"quotes"` はルール名です ([ルール一覧](http://eslint.org/docs/rules) (英語))。 63 | `2` とあるのは各ルールの警告レベルを設定しています。 64 | 65 | * `0` - ルールをオフにします。 66 | * `1` - 警告モードでルールをオンにします (ルール違反を見つけても `eslint` コマンドは正常終了します)。 67 | * `2` - エラーモードでルールをオンにします (ルール違反を見つけたら `eslint` コマンドは異常終了(exit code 1)します)。 68 | 69 | これらのルール・レベルによって、ESLint のふるまいを細やかに制御できます。 70 | 設定項目についての詳細は [configuration docs](http://eslint.org/docs/user-guide/configuring) (英語) を参照ください。 71 | 72 | ## 開発チーム 73 | 74 | * Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead 75 | * Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin)) - reviewer 76 | * Brandon Mills ([@btmills](https://github.com/btmills)) - reviewer 77 | * Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps)) - reviewer 78 | * Toru Nagashima (長島 徹) ([@mysticatea](https://github.com/mysticatea)) - reviewer 79 | * Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma)) - committer 80 | * Jamund Ferguson ([@xjamundx](https://github.com/xjamundx)) - committer 81 | * Ian VanSchooten ([@ianvs](https://github.com/ianvs)) - committer 82 | * Burak Yiğit Kaya ([@byk](https://github.com/byk)) - committer 83 | * Alberto Rodríguez ([@alberto](https://github.com/alberto)) - committer 84 | * Kai Cataldo ([@kaicataldo](https://github.com/kaicataldo)) - committer 85 | * Michael Ficarra ([@michaelficarra](https://github.com/michaelficarra)) - committer 86 | --------------------------------------------------------------------------------