Skip to content

Commit c86f531

Browse files
committed
Updated packages related to eslint
1 parent 574f89e commit c86f531

32 files changed

+757
-1506
lines changed

.eslintrc

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

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
parser: 'babel-eslint',
3+
extends: ['jss'],
4+
globals: {
5+
benchmark: true
6+
},
7+
env: {
8+
mocha: true,
9+
browser: true
10+
},
11+
}

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,8 @@
5353
"caniuse-support": "^0.4.3",
5454
"cross-env": "^5.2.0",
5555
"es5-shim": "^4.5.10",
56-
"eslint": "^5.0.1",
57-
"eslint-config-airbnb": "^17.0.0",
58-
"eslint-config-jss": "^3.0.0",
59-
"eslint-plugin-import": "^2.13.0",
60-
"eslint-plugin-jsx-a11y": "^6.0.3",
61-
"eslint-plugin-react": "^7.10.0",
56+
"eslint": "^5.13.0",
57+
"eslint-config-jss": "^5.0.1",
6258
"expect.js": "^0.3.1",
6359
"karma": "^3.1.4",
6460
"karma-benchmark": "^1.0.0",

src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
* @license MIT
77
*/
88

9-
import prefix from './prefix'
10-
import supportedKeyframes from './supported-keyframes'
11-
import supportedProperty from './supported-property'
12-
import supportedValue from './supported-value'
9+
import prefix from './prefix';
10+
import supportedKeyframes from './supported-keyframes';
11+
import supportedProperty from './supported-property';
12+
import supportedValue from './supported-value';
1313

1414
export {
1515
prefix,
1616
supportedKeyframes,
1717
supportedProperty,
18-
supportedValue
19-
}
18+
supportedValue,
19+
};

src/index.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {currentBrowser} from 'caniuse-support'
1+
import { currentBrowser } from 'caniuse-support';
22

3-
const msg = `Detected browser: ${currentBrowser.id} ${currentBrowser.version}`
4-
console.log(msg) // eslint-disable-line no-console
3+
const msg = `Detected browser: ${currentBrowser.id} ${currentBrowser.version}`;
4+
console.log(msg); // eslint-disable-line no-console

src/plugins/appearence.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import prefix from '../prefix'
1+
import prefix from '../prefix';
22

33
// Support old appearance props syntax.
44
// https://caniuse.com/#search=appearance
55
export default {
66
noPrefill: ['appearance'],
77
supportedProperty: (prop) => {
8-
if (prop !== 'appearance') return false
9-
if (prefix.js === 'ms') return `-webkit-${prop}`
10-
return prefix.css + prop
11-
}
12-
}
8+
if (prop !== 'appearance') return false;
9+
if (prefix.js === 'ms') return `-webkit-${prop}`;
10+
return prefix.css + prop;
11+
},
12+
};

src/plugins/break-props-old.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import prefix from '../prefix'
2-
import pascalize from '../utils/pascalize'
1+
import prefix from '../prefix';
2+
import pascalize from '../utils/pascalize';
33

44
// Support old break-* props syntax.
55
// https://caniuse.com/#search=multicolumn
66
// https://github.com/postcss/autoprefixer/issues/491
77
// https://github.com/postcss/autoprefixer/issues/177
88
export default {
99
supportedProperty: (prop, style) => {
10-
if (!/^break-/.test(prop)) return false
10+
if (!/^break-/.test(prop)) return false;
1111
if (prefix.js === 'Webkit') {
12-
const jsProp = `WebkitColumn${pascalize(prop)}`
13-
return jsProp in style ? `${prefix.css}column-${prop}` : false
12+
const jsProp = `WebkitColumn${pascalize(prop)}`;
13+
return jsProp in style ? `${prefix.css}column-${prop}` : false;
1414
}
1515
if (prefix.js === 'Moz') {
16-
const jsProp = `page${pascalize(prop)}`
17-
return jsProp in style ? `page-${prop}` : false
16+
const jsProp = `page${pascalize(prop)}`;
17+
return jsProp in style ? `page-${prop}` : false;
1818
}
19-
return false
20-
}
21-
}
19+
return false;
20+
},
21+
};

src/plugins/color-adjust.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import prefix from '../prefix'
1+
import prefix from '../prefix';
22

33
// Support old color-adjust prop syntax.
44
// https://caniuse.com/#search=color-adjust
55
export default {
66
noPrefill: ['color-adjust'],
77
supportedProperty: (prop) => {
8-
if (prop !== 'color-adjust') return false
9-
if (prefix.js === 'Webkit') return `${prefix.css}print-${prop}`
10-
return prop
11-
}
12-
}
8+
if (prop !== 'color-adjust') return false;
9+
if (prefix.js === 'Webkit') return `${prefix.css}print-${prop}`;
10+
return prop;
11+
},
12+
};

src/plugins/flex-2009.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import prefix from '../prefix'
2-
import pascalize from '../utils/pascalize'
1+
import prefix from '../prefix';
2+
import pascalize from '../utils/pascalize';
33

44
const propMap = {
55
flex: 'box-flex',
@@ -9,28 +9,28 @@ const propMap = {
99
'align-items': 'box-align',
1010
'flex-flow': ['box-orient', 'box-direction'],
1111
'justify-content': 'box-pack',
12-
}
12+
};
1313

14-
const propKeys = Object.keys(propMap)
14+
const propKeys = Object.keys(propMap);
1515

16-
const prefixCss = p => prefix.css + p
16+
const prefixCss = p => prefix.css + p;
1717

1818
// Support old flex spec from 2009.
1919
export default {
20-
supportedProperty: (prop, style, {multiple}) => {
20+
supportedProperty: (prop, style, { multiple }) => {
2121
if (propKeys.indexOf(prop) > -1) {
22-
const newProp = propMap[prop]
22+
const newProp = propMap[prop];
2323
if (!Array.isArray(newProp)) {
24-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false
24+
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
2525
}
26-
if (!multiple) return false
26+
if (!multiple) return false;
2727
for (let i = 0; i < newProp.length; i++) {
2828
if (!(prefix.js + pascalize(newProp[0]) in style)) {
29-
return false
29+
return false;
3030
}
3131
}
32-
return newProp.map(prefixCss)
32+
return newProp.map(prefixCss);
3333
}
34-
return false
35-
}
36-
}
34+
return false;
35+
},
36+
};

src/plugins/flex-2012.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import prefix from '../prefix'
2-
import pascalize from '../utils/pascalize'
1+
import prefix from '../prefix';
2+
import pascalize from '../utils/pascalize';
33

44
const propMap = {
55
'flex-grow': 'flex-positive',
@@ -10,13 +10,13 @@ const propMap = {
1010
'align-items': 'flex-align',
1111
'align-content': 'flex-line-pack',
1212
// 'align-self' is handled by 'align-self' plugin.
13-
}
13+
};
1414

1515
// Support old flex spec from 2012.
1616
export default {
1717
supportedProperty: (prop, style) => {
18-
const newProp = propMap[prop]
19-
if (!newProp) return false
20-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false
21-
}
22-
}
18+
const newProp = propMap[prop];
19+
if (!newProp) return false;
20+
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
21+
},
22+
};

0 commit comments

Comments
 (0)