-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): use neostandard over standard (#120)
* chore: use `neostandard` over `standard` as javascript style guide * chore: lint source using `neostandard` rules
- Loading branch information
Showing
16 changed files
with
1,121 additions
and
889 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = Object.freeze({ | ||
BADGES: 'badges.json', | ||
BADGES_MIN: 'badges.min.json' | ||
BADGES: 'badges.json', | ||
BADGES_MIN: 'badges.min.json' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const path = require('path') | ||
|
||
module.exports = Object.freeze({ | ||
DATA: path.resolve(__dirname, '../data') | ||
DATA: path.resolve(__dirname, '../data') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = Object.freeze({ | ||
en_US: 'en-US' | ||
en_US: 'en-US' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict' | ||
|
||
const jest = require('eslint-plugin-jest') | ||
const neostandard = require('neostandard') | ||
|
||
module.exports = [ | ||
...neostandard(), | ||
{ | ||
files: ['lib/__tests__/**'], | ||
...jest.configs['flat/recommended'], | ||
rules: { | ||
// Keep 'flat/recommended' below so rules will take precedence over 'flat/style' or any other | ||
// just in case that the same rule is defined in both places with different error level | ||
// i.e. jest/no-alias-methods rule | ||
...jest.configs['flat/style'].rules, | ||
...jest.configs['flat/recommended'].rules | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
class HTTPException { | ||
static throwIfFailed(response) { | ||
if (!response.ok) { | ||
throw new Error(`HTTP-${response.status} ${response.statusText}`) | ||
} | ||
static throwIfFailed (response) { | ||
if (!response.ok) { | ||
throw new Error(`HTTP-${response.status} ${response.statusText}`) | ||
} | ||
} | ||
} | ||
|
||
class HTTPClient { | ||
static getJSON(url) { | ||
return fetch(url).then(response => { | ||
HTTPException.throwIfFailed(response) | ||
return response.json() | ||
}) | ||
} | ||
static getJSON (url) { | ||
return fetch(url).then(response => { | ||
HTTPException.throwIfFailed(response) | ||
return response.json() | ||
}) | ||
} | ||
} | ||
|
||
module.exports = HTTPClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.