Skip to content

Commit c60f395

Browse files
committed
lint
1 parent 6b34596 commit c60f395

9 files changed

Lines changed: 13 additions & 17 deletions

File tree

docs/projects.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@
8181
## Linters
8282

8383
[ESLint plugin for React JSS](https://github.com/dashxhq/eslint-plugin-react-jss) ESLint plugin for React JSS
84-

packages/jss-plugin-global/src/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import nested from 'jss-plugin-nested'
66
import global from './index'
77

88
const settings = {
9-
createGenerateId: () => rule => `${rule.key}-id`
9+
createGenerateId: () => (rule) => `${rule.key}-id`
1010
}
1111

1212
describe('jss-plugin-global', () => {

packages/jss-plugin-nested/src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ export default function jssNested() {
1818

1919
warning(
2020
false,
21-
`[JSS] Could not find the referenced rule "${key}" in "${container.options.meta ||
22-
container.toString()}".`
21+
`[JSS] Could not find the referenced rule "${key}" in "${
22+
container.options.meta || container.toString()
23+
}".`
2324
)
2425
return key
2526
}

packages/jss-plugin-nested/src/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import functionPlugin from 'jss-plugin-rule-value-function'
99
import nested from '.'
1010

1111
const settings = {
12-
createGenerateId: () => rule => `${rule.key}-id`
12+
createGenerateId: () => (rule) => `${rule.key}-id`
1313
}
1414

1515
describe('jss-plugin-nested', () => {

packages/jss-plugin-rule-value-function/src/plugin-nested.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {getCss, getStyle, removeWhitespace, resetSheets} from '../../../tests/ut
55
import pluginNested from '../../jss-plugin-nested'
66
import pluginFunction from '.'
77

8-
const settings = {createGenerateId: () => rule => `${rule.key}-id`}
8+
const settings = {createGenerateId: () => (rule) => `${rule.key}-id`}
99

1010
describe('jss-plugin-rule-value-function: plugin-nested', () => {
1111
let jss
@@ -21,7 +21,7 @@ describe('jss-plugin-rule-value-function: plugin-nested', () => {
2121
sheet = jss
2222
.createStyleSheet(
2323
{
24-
a: data => ({
24+
a: (data) => ({
2525
color: data.color,
2626
'@media all': {
2727
color: 'green'
@@ -61,7 +61,7 @@ describe('jss-plugin-rule-value-function: plugin-nested', () => {
6161
{
6262
a: {
6363
color: 'red',
64-
'@media all': data => ({
64+
'@media all': (data) => ({
6565
color: data.color
6666
})
6767
}

packages/jss/src/DomRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import toCssValue from './utils/toCssValue'
66
/**
77
* Cache the value from the first time a function is called.
88
*/
9-
const memoize = fn => {
9+
const memoize = (fn) => {
1010
let value
1111
return () => {
1212
if (!value) value = fn()

packages/jss/src/index.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import {Properties as CSSProperties} from 'csstype'
66
//
77
// TODO: refactor to only include Observable types if plugin is installed.
88
export interface MinimalObservable<T> {
9-
subscribe(
10-
nextOrObserver: ((value: T) => void) | {next: (value: T) => void}
11-
): {
9+
subscribe(nextOrObserver: ((value: T) => void) | {next: (value: T) => void}): {
1210
unsubscribe: () => void
1311
}
1412
}

packages/jss/tests/functional/sheet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ describe('Functional: sheet', () => {
211211
})
212212

213213
it('should be set by the options argument', () => {
214-
;[-50, 0, 50, 9999].forEach(n => {
214+
;[-50, 0, 50, 9999].forEach((n) => {
215215
const sheet2 = jss.createStyleSheet({}, {index: n})
216216
expect(sheet2.options.index).to.be(n)
217217
})

packages/jss/tests/integration/sheet.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('Integration: sheet', () => {
6868
it('should have no selector in stringified rule when id gnerator is called', () => {
6969
let css
7070
// Simulate cache based id generator.
71-
const generateId = rule => {
71+
const generateId = (rule) => {
7272
css = rule.toString()
7373
return css
7474
}
@@ -302,9 +302,7 @@ describe('Integration: sheet', () => {
302302
let id
303303
const options = {
304304
generateId: () => {
305-
id = `c${Math.random()
306-
.toString()
307-
.substr(2)}`
305+
id = `c${Math.random().toString().substr(2)}`
308306
return id
309307
}
310308
}

0 commit comments

Comments
 (0)