Skip to content

Commit

Permalink
Add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Jan 10, 2019
1 parent 313d954 commit 53bbc60
Show file tree
Hide file tree
Showing 38 changed files with 6,787 additions and 2,590 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[**.ts]
indent_size = 4
indent_size = 2
3 changes: 3 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
singleQuote = true
trailingComma = "es5"
arrowParens = "always"
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ dist: trusty

language: node_js
node_js:
- "6.1"
- "7"
36 changes: 18 additions & 18 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const path = require("path");
const webpack = require("webpack");
const webpackConfig = require("./webpack.config")[0];
const path = require('path');
const webpack = require('webpack');
const webpackConfig = require('./webpack.config')[0];

process.env.CHROME_BIN = require("puppeteer").executablePath();
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "",
basePath: '',

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ["mocha", "sinon-chai"],
frameworks: ['mocha', 'sinon-chai'],

// list of files / patterns to load in the browser
files: ["test/unit/**/*_test.ts"],
files: ['test/unit/**/*_test.ts'],

mime: {
"text/x-typescript": ["ts", "tsx"]
'text/x-typescript': ['ts', 'tsx'],
},

// list of files to exclude
Expand All @@ -26,35 +26,35 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
"**/*.ts": ["webpack", "sourcemap"]
'**/*.ts': ['webpack', 'sourcemap'],
},

webpack: {
resolve: webpackConfig.resolve,
module: webpackConfig.module,
externals: webpackConfig.externals,

devtool: "inline-source-map",
devtool: 'inline-source-map',

plugins: [
new webpack.DefinePlugin({
VERSION: '"0.0.0"'
VERSION: '"0.0.0"',
}),
new webpack.SourceMapDevToolPlugin({
filename: null,
test: /\.ts$/
})
]
test: /\.ts$/,
}),
],
},

webpackMiddleware: {
stats: "errors-only"
stats: 'errors-only',
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["spec"],
reporters: ['spec'],

// web server port
port: 9876,
Expand All @@ -71,14 +71,14 @@ module.exports = function(config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ["ChromeHeadless"],
browsers: ['ChromeHeadless'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
concurrency: 1
concurrency: 1,
});
};
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@types/sinon": "5.0.7",
"@types/sinon-chai": "3.2.1",
"chai": "4.2.0",
"cross-fetch": "^2.2.3",
"error-stack-parser": "2.0.2",
"imports-loader": "0.8.0",
"karma": "3.1.1",
Expand All @@ -40,12 +41,12 @@
"sinon-chai": "3.3.0",
"source-map-loader": "0.2.4",
"ts-loader": "5.3.1",
"tslint": "5.11.0",
"tslint-loader": "3.6.0",
"typescript": "3.2.1",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",
"tslint-loader": "^3.5.4",
"typescript": "^3.2.2",
"webpack": "4.26.1",
"webpack-cli": "3.1.2",
"cross-fetch": "^2.2.3"
"webpack-cli": "3.1.2"
},
"main": "dist/client.js",
"types": "dist/client.d.ts",
Expand Down
Loading

0 comments on commit 53bbc60

Please sign in to comment.