Skip to content

chore: bump dependencies and add prettier #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
module.exports = {
"parser": "esprima",
"env": {
"node": true,
"browser": true,
parser: 'esprima',
env: {
node: true,
browser: true,
},
'globals': {
globals: {
// we want to enable a limited sub-set of ES6 features
// this library should (partially) work even in IE
// false meaning this code doesn't define it
Promise: false,
DataView: false,
ArrayBuffer: false,
Float32Array: false
Float32Array: false,
},
"plugins": [
"prettier",
],
"extends": [
"eslint:recommended",
"prettier",
],
"rules": {
"prettier/prettier": ["error", {"singleQuote": true, "printWidth": 160}],
"no-var": "off",
"prefer-const": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
}
};
plugins: ['prettier'],
extends: ['eslint:recommended', 'prettier'],
rules: {
'no-var': 'off',
'prefer-const': 'off',
'prefer-rest-params': 'off',
'prefer-spread': 'off',
},
}
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"printWidth": 160
}
24 changes: 4 additions & 20 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,10 @@
"name": "watson-speech",
"description": "IBM Watson Speech to Text and Text to Speech SDK for web browsers.",
"main": "dist/watson-speech.js",
"authors": [
"Nathan Friedly <http://nfriedly.com>"
],
"authors": ["Nathan Friedly <http://nfriedly.com>"],
"license": "Apache-2.0",
"keywords": [
"voice",
"recognition",
"speech",
"text",
"transcription",
"synthesis"
],
"moduleType": [
"amd",
"globals",
"node"
],
"keywords": ["voice", "recognition", "speech", "text", "transcription", "synthesis"],
"moduleType": ["amd", "globals", "node"],
"homepage": "https://watson-speech.mybluemix.net/",
"ignore": [
"**/*",
"!dist/*.js"
]
"ignore": ["**/*", "!dist/*.js"]
}
18 changes: 9 additions & 9 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/*-spec.js': ['browserify']
'test/*-spec.js': ['browserify'],
},
browserify: {
debug: true,
// 'brfs' makes fs.read* work
// 'browserify-shim' wraps non-browserify modules
// 'envify' makes process.env work
transform: ['envify']
transform: ['envify'],
},
// test results reporter to use
// possible values: 'dots', 'progress'
Expand Down Expand Up @@ -59,16 +59,16 @@ module.exports = function(config) {
'--use-fake-device-for-media-stream',
'--use-fake-ui-for-media-stream',
'--use-file-for-fake-audio-capture=' + path.join(__dirname, 'test/resources/audio.wav'),
'--no-sandbox'
]
'--no-sandbox',
],
},
// automatically approve getUserMedia calls
FirefoxAutoGUM: {
base: 'Firefox',
prefs: {
'media.navigator.permission.disabled': true
}
}
'media.navigator.permission.disabled': true,
},
},
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand All @@ -80,10 +80,10 @@ module.exports = function(config) {
port: 9877,
// this function takes express app object and allows you to modify it
// to your liking. For more see http://expressjs.com/4x/api.html
appVisitor: testServer
appVisitor: testServer,
},
browserDisconnectTimeout: 15000,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 30000
browserNoActivityTimeout: 30000,
});
};
Loading