Skip to content

Commit 831f00c

Browse files
committed
Fix eslint setup
Update ignored files and fix a couple of errors.
1 parent a3cf757 commit 831f00c

File tree

39 files changed

+76
-72
lines changed

39 files changed

+76
-72
lines changed
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
node_modules
1+
/src/editor/vendor
2+
3+
/node_modules
4+
/contentElements
25
/editor.js
36
/frontend
7+
/frontend-server.js
8+
/contentElements-editor.js
9+
/contentElements-frontend.js
10+
/contentElements-frontend.css
11+
/testHelpers.js
12+
/widgets
13+
/.storybook/out/
14+
/.storybook/seed.json
15+
/.storybook/preview-head.html

entry_types/scrolled/package/.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ module.exports = {
55
"plugin:import/warnings",
66
"plugin:storybook/recommended"
77
],
8+
"rules": {
9+
"no-trailing-spaces": "error"
10+
},
811
"settings": {
912
"import/resolver": {
1013
"jest": {

entry_types/scrolled/package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
},
8686
"scripts": {
8787
"test": "jest",
88-
"lint": "eslint .",
88+
"lint": "eslint",
8989
"start-storybook": "storybook dev --port 8001",
9090
"build-storybook": "storybook build -o .storybook/out",
9191
"snapshot": "storybook build --quiet -o .storybook/out && PERCY_TOKEN=${PERCY_TOKEN:-$PT} percy storybook .storybook/out"

entry_types/scrolled/package/spec/contentElements/externalLinkList/editor/models/ExternalLinkCollection-spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Backbone from 'backbone';
21

32
import {
43
ExternalLinkCollection

entry_types/scrolled/package/spec/frontend/Atmo-spec.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import _ from 'underscore';
21
import {media, PlayerSourceIDMap, MultiPlayer} from 'pageflow/frontend';
32
import {Atmo} from 'frontend/Atmo';
43

@@ -11,12 +10,12 @@ describe('Atmo', function() {
1110
{type: 'audio/m4a', src: 'http://example.com/example.m4a'},
1211
{type: 'audio/mp3', src: 'http://example.com/example.ogg'}
1312
];
14-
13+
1514
let updateAtmo = (config, pool, atmo) => {
1615
if (config.sources) {
1716
pool.mapSources(config.atmoAudioFileId, config.sources);
1817
}
19-
18+
2019
atmo.atmoSourceId = config.atmoAudioFileId;
2120
atmo.update();
2221
}
@@ -25,8 +24,8 @@ describe('Atmo', function() {
2524
it('fades to atmo audio file', function() {
2625
let {pool, atmo, multiPlayer} = buildAtmo({});
2726
let multiPlayerSpy = jest.spyOn(multiPlayer, 'fadeTo');
28-
29-
media.mute(false);
27+
28+
media.mute(false);
3029
updateAtmo({
3130
sources: fileSources,
3231
atmoAudioFileId: 5
@@ -39,27 +38,27 @@ describe('Atmo', function() {
3938
it('does not fade to audio file if atmo is disabled', function() {
4039
let {pool, atmo, multiPlayer} = buildAtmo({});
4140
let multiPlayerSpy = jest.spyOn(multiPlayer, 'fadeTo');
42-
41+
4342
media.mute(false);
4443
atmo.disable();
4544
updateAtmo({
4645
sources: fileSources,
4746
atmoAudioFileId: 5
4847
}, pool, atmo);
49-
48+
5049
expect(multiPlayerSpy).not.toHaveBeenCalledWith(5);
5150
});
5251

5352
it('pauses multiPlayer if backgroundMedia is muted', function() {
5453
let {pool, atmo, multiPlayer} = buildAtmo({});
5554
let multiPlayerSpy = jest.spyOn(multiPlayer, 'fadeOutAndPause');
56-
55+
5756
media.mute(true);
5857
updateAtmo({
5958
sources: fileSources,
6059
atmoAudioFileId: 5
6160
}, pool, atmo);
62-
61+
6362
expect(multiPlayerSpy).toHaveBeenCalled();
6463
});
6564

@@ -78,7 +77,7 @@ describe('Atmo', function() {
7877
});
7978

8079
it('updates atmo on documment visible state', function() {
81-
let {pool, atmo, multiPlayer} = buildAtmo({});
80+
let {pool, atmo} = buildAtmo({});
8281
let atmoSpy = jest.spyOn(atmo, 'update');
8382

8483
updateAtmo({
@@ -106,7 +105,7 @@ describe('Atmo', function() {
106105
}, pool, atmo);
107106

108107
multiPlayer.trigger('playfailed');
109-
108+
110109
expect(mediaSpy).toHaveBeenCalled();
111110
});
112111
});
@@ -122,7 +121,7 @@ describe('Atmo', function() {
122121
}, pool, atmo);
123122

124123
atmo.pause();
125-
124+
126125
expect(multiPlayerSpy).toHaveBeenCalled();
127126
});
128127
});
@@ -140,7 +139,7 @@ describe('Atmo', function() {
140139

141140
media.mute(false);
142141
atmo.resume();
143-
142+
144143
expect(multiPlayerSpy).toHaveBeenCalled();
145144
});
146145

@@ -156,7 +155,7 @@ describe('Atmo', function() {
156155
media.mute(false);
157156
atmo.disable();
158157
atmo.resume();
159-
158+
160159
expect(multiPlayerSpy).not.toHaveBeenCalled();
161160
});
162161

@@ -171,7 +170,7 @@ describe('Atmo', function() {
171170

172171
media.mute(true);
173172
atmo.resume();
174-
173+
175174
expect(multiPlayerSpy).not.toHaveBeenCalled();
176175
});
177176
});

entry_types/scrolled/package/spec/frontend/features/scrollToSectionMessage-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('SCROLL_TO_SECTION message', () => {
6767
});
6868

6969
it('activates excursion of section', async () => {
70-
const {fakeSectionBoundingClientRectsByPermaId} = renderEntry({
70+
renderEntry({
7171
seed: {
7272
storylines: [
7373
{

entry_types/scrolled/package/spec/frontend/inlineEditing/EditableInlineText/lineBreaks-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66

77
import {createHyperscript} from 'slate-hyperscript';
88

9-
export const jsx = createHyperscript({
9+
const jsx = createHyperscript({
1010
elements: {
1111
block: {},
1212
inline: { inline: true },

entry_types/scrolled/package/spec/frontend/inlineEditing/EditableTable/withFixedColumns-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66

77
import {createHyperscript} from 'slate-hyperscript';
88

9-
export const h = createHyperscript({
9+
const h = createHyperscript({
1010
elements: {
1111
row: {type: 'row'},
1212
label: {type: 'label'},

entry_types/scrolled/package/spec/frontend/inlineEditing/EditableText/getUniformSelectedNode-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55

66
import {createHyperscript} from 'slate-hyperscript';
77

8-
export const jsx = createHyperscript({
8+
const jsx = createHyperscript({
99
elements: {
1010
textBlock: {type: 'textBlock'},
1111
inlineImage: {type: 'inlineImage'},

entry_types/scrolled/package/spec/frontend/inlineEditing/EditableText/lineBreaks-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66

77
import {createHyperscript} from 'slate-hyperscript';
88

9-
export const jsx = createHyperscript({
9+
const jsx = createHyperscript({
1010
elements: {
1111
block: {},
1212
inline: { inline: true },

0 commit comments

Comments
 (0)