Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 647e898

Browse files
committed
Apply lint to all directories.
1 parent 5a2ba31 commit 647e898

File tree

6 files changed

+28
-21
lines changed

6 files changed

+28
-21
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
dist
1+
dist
2+
lib

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build": "rimraf lib dist && npm run build-lib && npm run build-dist",
2626
"examples": "webpack-dev-server --config examples/webpack.config.js --no-info --content-base examples/",
2727
"flow": "flow check",
28-
"eslint": "eslint src examples interfaces *.js",
28+
"eslint": "eslint .",
2929
"fixlint": "npm run eslint -- --fix",
3030
"lint": "npm run eslint && npm run flow",
3131
"start": "babel-node examples/server.js",

scripts/update-prefix-data.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* this if browser support changes or `inline-style-prefixer` gets fixes for the
44
* supported browsers.
55
*/
6-
import path from 'path'
7-
import generateData from 'inline-style-prefixer/generator'
6+
import path from 'path';
7+
import generateData from 'inline-style-prefixer/generator';
88

99
const browserList = {
1010
chrome: 30,
@@ -19,9 +19,9 @@ const browserList = {
1919
op_mini: 5,
2020
and_uc: 9,
2121
and_chr: 30
22-
}
22+
};
2323

2424
generateData(browserList, {
2525
staticPath: path.join(__dirname, '../src/prefix-data/static.js'),
2626
dynamicPath: path.join(__dirname, '../src/prefix-data/dynamic.js')
27-
})
27+
});

test/.eslintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parserOptions:
2+
sourceType: "script"

test/enhancer-test.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1-
"use strict";
1+
'use strict';
22

33
const React = require('react');
44
const renderToString = require('react-dom/server').renderToString;
55

66
const Enhancer = require('../lib/enhancer');
7-
const StyleRoot = require('../lib/components/style-root');
87
const createEsClass = require('../lib/test-helpers').createEsClass;
98

109
const render = (Component, props) =>
11-
renderToString(React.createElement(Component, Object.assign({
12-
radiumConfig: { userAgent: 'testy-mctestface' }
13-
}, props)));
10+
renderToString(
11+
React.createElement(
12+
Component,
13+
Object.assign(
14+
{
15+
radiumConfig: {userAgent: 'testy-mctestface'}
16+
},
17+
props
18+
)
19+
)
20+
);
1421

1522
// Full assertion wrapper
16-
const assertValidEnhancedComponent = (Composed) => {
23+
const assertValidEnhancedComponent = Composed => {
1724
const Enhanced = Enhancer(Composed);
1825
const rendered = render(Enhanced);
1926

2027
expect(render(Composed)).to.not.equal(rendered);
21-
expect(rendered)
22-
.to.contain('data-radium="true"').and
23-
.to.contain('style="background:red;color:white"');
28+
expect(rendered).to
29+
.contain('data-radium="true"')
30+
.and.to.contain('style="background:red;color:white"');
2431
};
2532

2633
describe('Enhancer', () => {
2734
let testElement;
2835

2936
beforeEach(() => {
3037
testElement = React.createElement('div', {
31-
style: [
32-
{ background: 'red' },
33-
{ color: 'white' }
34-
]
38+
style: [{background: 'red'}, {color: 'white'}]
3539
});
3640
});
3741

@@ -49,7 +53,7 @@ describe('Enhancer', () => {
4953
});
5054

5155
it('handles real functions', () => {
52-
const Composed = function () {
56+
const Composed = function() {
5357
return testElement;
5458
};
5559

test/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
const chai = require('chai');
44
const sinonChai = require('sinon-chai');

0 commit comments

Comments
 (0)