Skip to content

Commit 0a8fe8e

Browse files
committed
Switch to using airbnb base eslint as there is no need for react rules here
1 parent 1b9684e commit 0a8fe8e

File tree

6 files changed

+34
-210
lines changed

6 files changed

+34
-210
lines changed

.eslintrc.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
module.exports = {
2-
extends: 'airbnb',
2+
extends: 'airbnb-base',
33
env: {
44
browser: true,
55
jest: true,
66
},
77
rules: {
8-
'array-bracket-spacing': 'off',
9-
'arrow-parens': 'off',
10-
'no-plusplus': 'off',
11-
'no-restricted-syntax': 'off',
8+
'array-bracket-spacing': [ 'error', 'always' ],
9+
'arrow-parens': [ 'error', 'as-needed' ],
1210
'no-underscore-dangle': 'off',
1311
},
1412
};

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
"babel-plugin-transform-object-rest-spread": "6.26.0",
2929
"babel-preset-env": "1.6.0",
3030
"eslint": "4.5.0",
31-
"eslint-config-airbnb": "15.1.0",
31+
"eslint-config-airbnb-base": "11.3.2",
3232
"eslint-loader": "1.9.0",
3333
"eslint-plugin-import": "2.7.0",
34-
"eslint-plugin-jsx-a11y": "5.1.1",
35-
"eslint-plugin-react": "7.3.0",
3634
"jest": "20.0.4",
3735
"jsdoc-to-markdown": "3.0.0",
3836
"webpack": "3.5.5"

src/getBounds.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @return {Object}
77
*/
8-
export default (elem) => {
8+
export default elem => {
99
const { top, left, width, height } = elem.getBoundingClientRect();
1010

1111
return {

src/getHeight.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import getBounds from './getBounds';
77
*
88
* @return {Number} The total height.
99
*/
10-
export default (letters) => {
10+
export default letters => {
1111
const mid = getBounds(letters[Math.floor(letters.length / 2)]);
1212
const first = getBounds(letters[0]);
1313

src/utils/__tests__/splitNode-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('splitNode', () => {
4848
it('handles any node', () => {
4949
const testText = 'Some test text.';
5050
const { length } = testText;
51-
const nodeTypes = ['div', 'a', 'time', 'asdf'];
51+
const nodeTypes = [ 'div', 'a', 'time', 'asdf' ];
5252
const nodes = nodeTypes.map(type => createNode(testText, type));
5353

5454
nodes.forEach(node => expect(splitNode(node)).toHaveLength(length));
@@ -77,7 +77,7 @@ describe('splitNode', () => {
7777
});
7878

7979
it('handles all emojis (chars whose length might be `2`)', () => {
80-
const emojis = ['🙂', '🤓', '👹', '🙉', '💩'];
80+
const emojis = [ '🙂', '🤓', '👹', '🙉', '💩' ];
8181
const testText = emojis.join('');
8282
const { length } = emojis;
8383
const node = createNode(testText);

0 commit comments

Comments
 (0)