Skip to content

Commit 2c1599f

Browse files
authored
Merge pull request #39 from dozoisch/pretty_lint
Add Prettier & Update Eslint
2 parents 2ffe5e6 + 8d566ee commit 2c1599f

File tree

9 files changed

+9261
-127
lines changed

9 files changed

+9261
-127
lines changed

.eslintrc

Lines changed: 0 additions & 37 deletions
This file was deleted.

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"use strict";
2+
module.exports = {
3+
extends: ["eslint:recommended", "prettier", "prettier/react"],
4+
parserOptions: {
5+
sourceType: "module",
6+
ecmaVersion: "2018",
7+
ecmaFeatures: {
8+
jsx: true,
9+
},
10+
},
11+
env: {
12+
es6: true,
13+
browser: true,
14+
},
15+
plugins: ["prettier"],
16+
rules: {
17+
"prettier/prettier": "error",
18+
},
19+
};

karma.conf.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
1-
/* eslint no-var: 0, strict: [2, "global"] */
1+
/* eslint-env node */
22
"use strict";
33
require("babel-register");
44

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

8-
module.exports = function (config) {
8+
module.exports = function(config) {
99
config.set({
10-
1110
basePath: "",
1211

13-
frameworks: [
14-
"mocha",
15-
"chai",
16-
],
12+
frameworks: ["mocha", "chai"],
1713

18-
files: [
19-
"test/index.js",
20-
],
14+
files: ["test/index.js"],
2115

2216
preprocessors: {
23-
"test/index.js": ["webpack", "sourcemap"],
17+
"test/index.js": ["webpack", "sourcemap"]
2418
},
2519

2620
webpack: webpackConfig,
2721

2822
webpackMiddleware: {
29-
noInfo: isCI,
23+
noInfo: isCI
3024
},
3125

3226
reporters: ["mocha"],
3327

3428
mochaReporter: {
35-
output: "autowatch",
29+
output: "autowatch"
3630
},
3731

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

4438
autoWatch: true,
4539

46-
browsers: [ isCI ? "PhantomJS" : "Chrome" ],
40+
browsers: [isCI ? "PhantomJS" : "Chrome"],
4741

4842
captureTimeout: 60000,
4943
browserNoActivityTimeout: 30000,
5044

51-
singleRun: isCI,
45+
singleRun: isCI
5246
});
5347
};

0 commit comments

Comments
 (0)