Skip to content

Commit

Permalink
Merge pull request #39 from dozoisch/pretty_lint
Browse files Browse the repository at this point in the history
Add Prettier & Update Eslint
  • Loading branch information
hartzis authored Aug 16, 2018
2 parents 2ffe5e6 + 8d566ee commit 2c1599f
Show file tree
Hide file tree
Showing 9 changed files with 9,261 additions and 127 deletions.
37 changes: 0 additions & 37 deletions .eslintrc

This file was deleted.

19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use strict";
module.exports = {
extends: ["eslint:recommended", "prettier", "prettier/react"],
parserOptions: {
sourceType: "module",
ecmaVersion: "2018",
ecmaFeatures: {
jsx: true,
},
},
env: {
es6: true,
browser: true,
},
plugins: ["prettier"],
rules: {
"prettier/prettier": "error",
},
};
28 changes: 11 additions & 17 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
/* eslint no-var: 0, strict: [2, "global"] */
/* eslint-env node */
"use strict";
require("babel-register");

var webpackConfig = require("./webpack.config.test.js");
var isCI = process.env.CONTINUOUS_INTEGRATION === "true";
const webpackConfig = require("./webpack.config.test.js");
const isCI = process.env.CONTINUOUS_INTEGRATION === "true";

module.exports = function (config) {
module.exports = function(config) {
config.set({

basePath: "",

frameworks: [
"mocha",
"chai",
],
frameworks: ["mocha", "chai"],

files: [
"test/index.js",
],
files: ["test/index.js"],

preprocessors: {
"test/index.js": ["webpack", "sourcemap"],
"test/index.js": ["webpack", "sourcemap"]
},

webpack: webpackConfig,

webpackMiddleware: {
noInfo: isCI,
noInfo: isCI
},

reporters: ["mocha"],

mochaReporter: {
output: "autowatch",
output: "autowatch"
},

port: 9876,
Expand All @@ -43,11 +37,11 @@ module.exports = function (config) {

autoWatch: true,

browsers: [ isCI ? "PhantomJS" : "Chrome" ],
browsers: [isCI ? "PhantomJS" : "Chrome"],

captureTimeout: 60000,
browserNoActivityTimeout: 30000,

singleRun: isCI,
singleRun: isCI
});
};
Loading

0 comments on commit 2c1599f

Please sign in to comment.