lint: require strict mode.

This commit is contained in:
Christopher Jeffrey 2017-06-24 05:11:54 -07:00
parent a0bd9680fe
commit d3b24da2e1
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
18 changed files with 47 additions and 12 deletions

View File

@ -9,6 +9,7 @@
"ecmaVersion": 8 "ecmaVersion": 8
}, },
"rules": { "rules": {
"strict": 2,
"indent": ["error", 2, { "indent": ["error", 2, {
"SwitchCase": 1, "SwitchCase": 1,
"CallExpression": { "CallExpression": {

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'ebd41040e4bb3ec742c9e381d31ef2a41a48b6685c96e7cef3c1df6cd4331c99', 'ebd41040e4bb3ec742c9e381d31ef2a41a48b6685c96e7cef3c1df6cd4331c99',
'ca42dd41745fd0b81eb902362cf9d8bf719da1bd1b1efc946f5b4c99f42c1b9e', 'ca42dd41745fd0b81eb902362cf9d8bf719da1bd1b1efc946f5b4c99f42c1b9e',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'的', '的',
'一', '一',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'的', '的',
'一', '一',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'abandon', 'abandon',
'ability', 'ability',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'abaisser', 'abaisser',
'abandon', 'abandon',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'abaco', 'abaco',
'abbaglio', 'abbaglio',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'あいこくしん', 'あいこくしん',
'あいさつ', 'あいさつ',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'ábaco', 'ábaco',
'abdomen', 'abdomen',

View File

@ -4,6 +4,8 @@
* https://github.com/bcoin-org/bcoin * https://github.com/bcoin-org/bcoin
*/ */
'use strict';
var assert = require('assert'); var assert = require('assert');
var crypto = require('../crypto/crypto'); var crypto = require('../crypto/crypto');

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'2.7.8.12:8333', '2.7.8.12:8333',
'2.228.70.198:8333', '2.228.70.198:8333',

View File

@ -1,3 +1,5 @@
'use strict';
module.exports = [ module.exports = [
'thfsmmn2jbitcoin.onion', 'thfsmmn2jbitcoin.onion',
'it2pj4f7657g3rhi.onion', 'it2pj4f7657g3rhi.onion',

View File

@ -4,4 +4,6 @@
* https://github.com/bcoin-org/bcoin * https://github.com/bcoin-org/bcoin
*/ */
'use strict';
module.exports = require('../../vendor/setimmediate'); module.exports = require('../../vendor/setimmediate');

View File

@ -4,6 +4,8 @@
* https://github.com/bcoin-org/bcoin * https://github.com/bcoin-org/bcoin
*/ */
'use strict';
module.exports = typeof setImmediate !== 'function' module.exports = typeof setImmediate !== 'function'
? process.nextTick ? process.nextTick
: setImmediate; : setImmediate;

View File

@ -4,6 +4,8 @@
* https://github.com/bcoin-org/bcoin * https://github.com/bcoin-org/bcoin
*/ */
'use strict';
var unorm = require('../../vendor/unorm'); var unorm = require('../../vendor/unorm');
function nfkd(str) { function nfkd(str) {

View File

@ -4,6 +4,8 @@
* https://github.com/bcoin-org/bcoin * https://github.com/bcoin-org/bcoin
*/ */
'use strict';
var unorm; var unorm;
/** /**

View File

@ -49,6 +49,8 @@ tojs() {
local data=$(cat) local data=$(cat)
local body=$(echo "$data" | head -n -1) local body=$(echo "$data" | head -n -1)
local last=$(echo "$data" | tail -n 1) local last=$(echo "$data" | tail -n 1)
echo "'use strict';"
echo ''
echo 'module.exports = [' echo 'module.exports = ['
echo "$body" | while read line; do echo "$body" | while read line; do
echo " '${line}'," echo " '${line}',"

View File

@ -12,6 +12,8 @@ tojs() {
local data=$(cat) local data=$(cat)
local body=$(echo "$data" | head -n -1) local body=$(echo "$data" | head -n -1)
local last=$(echo "$data" | tail -n 1) local last=$(echo "$data" | tail -n 1)
echo "'use strict';"
echo ''
echo 'module.exports = [' echo 'module.exports = ['
echo "$body" | while read line; do echo "$body" | while read line; do
if echo "$line" | grep '^#' > /dev/null; then if echo "$line" | grep '^#' > /dev/null; then