Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: standard/standard
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.3.0
Choose a base ref
...
head repository: standard/standard
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.3.1
Choose a head ref

Commits on Sep 17, 2019

  1. Copy the full SHA
    1c3a258 View commit details
  2. Copy the full SHA
    b42def8 View commit details
  3. Copy the full SHA
    5764e7f View commit details
  4. Copy the full SHA
    3ad61f1 View commit details
  5. Copy the full SHA
    7bf5631 View commit details
  6. Copy the full SHA
    c5f525b View commit details
  7. Copy the full SHA
    86bbd1e View commit details
  8. Copy the full SHA
    300753d View commit details
  9. Copy the full SHA
    d1fcbf4 View commit details
  10. Copy the full SHA
    b0e5e62 View commit details
  11. Copy the full SHA
    8be039b View commit details
  12. Copy the full SHA
    bc9d332 View commit details
  13. Copy the full SHA
    9dd6012 View commit details
  14. Copy the full SHA
    fd5db17 View commit details
  15. Copy the full SHA
    03d56a9 View commit details
  16. Don't run on Node.js versions less than 8.6.0

    ESLint uses the spread operator which isn't supported in Node.js
    versions earlier than 8.6.0.
    watson committed Sep 17, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    watson Thomas Watson
    Copy the full SHA
    264db54 View commit details

Commits on Sep 18, 2019

  1. Update Japanese documents to follow original documents (#1417)

    Update Japanese documents to follow original documents
    feross authored Sep 18, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4869b15 View commit details
  2. Don't run on Node.js versions less than 8.6.0 (#1418)

    Don't run on Node.js versions less than 8.6.0
    feross authored Sep 18, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7886564 View commit details
  3. changelog

    feross committed Sep 18, 2019
    Copy the full SHA
    217d2be View commit details
  4. Create .tidelift.yml

    feross committed Sep 18, 2019
    Copy the full SHA
    b52a17f View commit details
  5. 14.3.1

    feross committed Sep 18, 2019
    Copy the full SHA
    0ff9ace View commit details
Showing with 34 additions and 52 deletions.
  1. +3 −0 .tidelift.yml
  2. +7 −1 CHANGELOG.md
  3. +7 −3 bin/cmd.js
  4. +10 −45 docs/README-ja.md
  5. +6 −2 docs/RULES-ja.md
  6. +1 −1 package.json
3 changes: 3 additions & 0 deletions .tidelift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ci:
tests:
unmaintained: skip
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased][unreleased]

## [14.3.1] - 2019-09-17

- Skip running on versions of Node.js older than 8.6.0. [#1418](https://github.com/standard/standard/pull/1418)

## [14.3.0] - 2019-09-14

- Update `eslint` to `~6.4.0`
@@ -858,7 +862,9 @@ In `package.json`, use the "standard" property:

[view diff](https://github.com/standard/standard/compare/v3.9.0...v4.0.0)

[unreleased]: https://github.com/standard/standard/compare/v14.3.0...HEAD
[unreleased]: https://github.com/standard/standard/compare/v14.3.1...HEAD

[14.3.1]: https://github.com/standard/standard/compare/v14.3.0...v14.3.1

[14.3.0]: https://github.com/standard/standard/compare/v14.2.0...v14.3.0

10 changes: 7 additions & 3 deletions bin/cmd.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env node

if (process.version.match(/v(\d+)\./)[1] < 8) {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
} else {
var match = process.version.match(/v(\d+)\.(\d+)/)
var major = parseInt(match[1], 10)
var minor = parseInt(match[2], 10)

if (major >= 9 || (major === 8 && minor >= 6)) {
require('standard-engine').cli(require('../options'))
} else {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
}
55 changes: 10 additions & 45 deletions docs/README-ja.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
</h1>

<p align="center">
<a href="https://discord.gg/ZegqCBr"><img src="https://img.shields.io/discord/612704110008991783" alt="discord"></a>
<a href="https://travis-ci.org/standard/standard"><img src="https://img.shields.io/travis/standard/standard/master.svg" alt="travis"></a>
<a href="https://www.npmjs.com/package/standard"><img src="https://img.shields.io/npm/v/standard.svg" alt="npm version"></a>
<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>
@@ -29,50 +30,18 @@

このモジュールは、3つの方法であなたの(そして他の人の!)時間を節約します。:

- **設定不要** プロジェクトに一貫性のあるスタイルを適用する最も簡単な方法です。単に入れるだけ!
- **設定不要** プロジェクトのコード品質を高める最も簡単な方法です。決断はいりません。管理するための`.eslintrc`ファイルも不要です。ただこれだけで動作します。
- **コードを自動的にフォーマット** ただ`standard --fix`を実行するだけで、汚いコードや一貫性のないコードにサヨナラしましょう。
- **スタイルの問題やプログラマーのエラーを早期にキャッチ** レビュアーと作業者の間の往復をなくすことで、貴重なコードレビューの時間を節約します。

導入するために考えなければならないことも、管理するための`.eslintrc``.jshintrc``.jscsrc`ファイルも必要ありません。ただこれだけで動作します。

インストール方法:

```
npm install standard --save-dev
```
今すぐ`npx standard --fix`を実行して、試してみましょう!

### オープンソースサポーター

<a href="https://tidelift.com/subscription/pkg/npm-standard?utm_source=npm-standard&utm_medium=readme" target='_blank'><img src='https://feross.org/images/supporters/tidelift.png' width=250></a>

[Become a supporter!](https://feross.org/thanks/)

## StandardJS — ルール

- **2スペース** – インデントのため
- **文字列にはシングルクォート** – エスケープを避ける場合を除く
- **未使用の変数なし** – 多くのバグをキャッチ!
- **セミコロンなし**[It's][1] [fine.][2] [Really!][3] (訳注: 試してみなって!マジで良いぞ!)
- [詳細][4]
- **キーワードの後にスペース** `if (condition) { ... }`
- **関数名の後にスペース** `function name (arg) { ... }`
- 常に`==`ではなく`===`を使用 – ただし`obj == null``null || undefined`をチェックするために許容されています
- 常にnode.jsの`err`引数をハンドル
- ファイルの先頭に`/* global */`コメントでブラウザのグローバルオブジェクトを宣言
- `open``length``event``name`のようなあいまいな名前のグローバルオブジェクトの誤用を防ぎます
- 例: `/* global alert, prompt */`
- 例外: `window``document``navigator`
- **そして[もっと良いこと色々][5]***`standard`を今すぐ試そう!*

[1]: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding
[2]: http://inimino.org/~inimino/blog/javascript_semicolons
[3]: https://www.youtube.com/watch?v=gsfbh17Ax9I
[4]: RULES-ja.md#semicolons
[5]: RULES-ja.md#javascript-standard-style

より良いアイデアを得るには、JavaScript Standard Styleで書かれた[サンプルファイル](https://github.com/expressjs/body-parser/blob/master/index.js)を見てみましょう。
または、`standard`を使用している[何千ものプロジェクト](https://raw.githubusercontent.com/standard/standard-packages/master/all.json)を参照してください!

## 目次

- クイックスタート
@@ -184,8 +153,6 @@ ESLint"](https://www.youtube.com/watch?v=kuHfMw8j4xk)をご覧ください。こ

<h2 id="#who-uses-javascript-standard-style">誰がJavaScript Standard Styleを使用していますか?</h2>

多くの人々!

[<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/nodejs.png>](https://nodejs.org) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/npm.png>](https://www.npmjs.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/github.png>](https://github.com) | [<img width=190 src=https://cdn.rawgit.com/standard/standard/master/docs/logos/elastic.png>](https://www.elastic.co) |
|---|---|---|---|

@@ -475,8 +442,6 @@ $ standard --parser babel-eslint
}
```

もし`standard`がグローバルインストールされている場合(つまり`npm install standard --global`)、`npm install babel-eslint --global``babel-eslint`もグローバルインストールしてください。

<h2 id="can-i-use-a-javascript-language-variant-like-flow-or-typescript">FlowやTypeScriptのようなJavaScriptの代替言語を使用できますか?</h2>

`standard`は最新のECMAScriptの機能をサポートしています。しかしながら、FlowやTypeScriptは言語に新たな構文を追加するため、そのまま使用することはできません。
@@ -510,11 +475,9 @@ $ standard --parser babel-eslint --plugin flowtype

*注: `plugin``plugins`は同じです。*

もし`standard`がグローバルインストールされている場合(つまり`npm install standard --global`)、`npm install babel-eslint eslint-plugin-flowtype --global``babel-eslint``eslint-plugin-flowtype`もグローバルインストールしてください。

### TypeScript

TypeScriptを使用するには、`@typescript-eslint/parser`をパーサとして、`eslint-plugin-typescript`をプラグインとして`standard`を実行し、`*.ts`ファイルをリントするようにstandardに伝える必要があります(デフォルトではリントされないため)。
TypeScriptを使用するには、`@typescript-eslint/parser`をパーサとして、`@typescript-eslint/eslint-plugin`をプラグインとして`standard`を実行し、`**/*.ts`ファイルをリントするようにstandardに伝える必要があります(デフォルトではリントされないため)。

```bash
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev
@@ -523,7 +486,7 @@ npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-de
そして、次のコマンドを実行します。:

```bash
$ standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin *.ts
$ standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin **/*.ts
```

あるいは、次の内容を`package.json`に追加してください。:
@@ -540,11 +503,9 @@ $ standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint
`package.json`にこれを追加すると、次のコマンドが実行できます。:

```bash
standard *.ts
standard **/*.ts
```

もし`standard`がグローバルインストールされている場合(つまり`npm install standard --global`)、`npm install @typescript-eslint/parser eslint-plugin-typescript --global``@typescript-eslint/parser``eslint-plugin-typescript`もグローバルインストールしてください。

<h2 id="what-about-mocha-jest-jasmine-qunit-etc">Mocha、Jest、Jasmine、QUnitなどはどうすれば?</h2>

テストファイルでmochaをサポートするには、次のコメントをテストファイルの先頭に追加します。:
@@ -732,6 +693,10 @@ var opts = {

多くの **[エディタープラグイン](#are-there-text-editor-plugins)****[`standard`を使用しているnpmパッケージ](https://github.com/standard/standard-packages)** のリスト、 **[`standard`のエコシステムのパッケージ](https://github.com/standard/awesome-standard)** の素晴らしいリストもあります。

<h2 id="security-policies-and-procedures">セキュリティポリシーと手続き</h2>

`standard`チームとコミュニティは、`standard`におけるすべてのバグを真摯に受け止めています。問題を報告する方法については、[security policies and procedures](https://github.com/standard/.github/blob/master/SECURITY.md)を参照してください。

<h2 id="license">ライセンス</h2>

[MIT](LICENSE). Copyright (c) [Feross Aboukhadijeh](https://feross.org).
8 changes: 6 additions & 2 deletions docs/RULES-ja.md
Original file line number Diff line number Diff line change
@@ -35,8 +35,12 @@
eslint: [`quotes`](http://eslint.org/docs/rules/quotes)

```js
console.log('hello there')
$("<div class='box'>")
console.log('hello there') // ✓ ok
console.log("hello there") // ✗ avoid
console.log(`hello there`) // ✗ avoid

$("<div class='box'>") // ✓ ok
console.log(`hello ${name}`) // ✓ ok
```

* **未使用の変数は定義しない。**
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "standard",
"description": "JavaScript Standard Style",
"version": "14.3.0",
"version": "14.3.1",
"author": {
"email": "feross@feross.org",
"name": "Feross Aboukhadijeh",