Skip to content

Commit 47c26cc

Browse files
authored
Fix missing commas (facebookarchive#1107)
Updated comma-dangle eslint rule and fixed resulting errors
1 parent 3b91e36 commit 47c26cc

113 files changed

Lines changed: 615 additions & 604 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ dist/
33
docs/
44
node_modules/
55
website/
6+
gulpfile.js
7+
scripts/module-map.js

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@
99

1010
module.exports = {
1111
extends: 'fbjs/strict',
12+
rules: {
13+
'comma-dangle': [2, {
14+
arrays: 'always-multiline',
15+
objects: 'always-multiline',
16+
imports: 'always-multiline',
17+
exports: 'always-multiline',
18+
functions: 'always-multiline',
19+
}],
20+
},
1221
};

examples/draft-0-10-0/tex/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ import ReactDOM from 'react-dom';
2121

2222
ReactDOM.render(
2323
<TeXEditorExample />,
24-
document.getElementById('target')
24+
document.getElementById('target'),
2525
);

examples/draft-0-10-0/tex/js/components/TeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class KatexOutput extends React.Component {
3232
katex.render(
3333
this.props.content,
3434
this.refs.container,
35-
{displayMode: true}
35+
{displayMode: true},
3636
);
3737
}, 0);
3838
}

examples/draft-0-10-0/tex/js/modifiers/insertTeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function insertTeXBlock(editorState) {
4646
const entityKey = contentStateWithEntity.getLastCreatedEntityKey();
4747
const newEditorState = EditorState.set(
4848
editorState,
49-
{currentContent: contentStateWithEntity}
49+
{currentContent: contentStateWithEntity},
5050
);
5151
return AtomicBlockUtils.insertAtomicBlock(newEditorState, entityKey, ' ');
5252
}

examples/draft-0-10-0/tex/js/modifiers/removeTeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function removeTeXBlock(editorState, blockKey) {
3131
var resetBlock = Modifier.setBlockType(
3232
withoutTeX,
3333
withoutTeX.getSelectionAfter(),
34-
'unstyled'
34+
'unstyled',
3535
);
3636

3737
var newState = EditorState.push(editorState, resetBlock, 'remove-range');

examples/draft-0-9-1/tex/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ import ReactDOM from 'react-dom';
2121

2222
ReactDOM.render(
2323
<TeXEditorExample />,
24-
document.getElementById('target')
24+
document.getElementById('target'),
2525
);

examples/draft-0-9-1/tex/js/components/TeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class KatexOutput extends React.Component {
3333
katex.render(
3434
this.props.content,
3535
this.refs.container,
36-
{displayMode: true}
36+
{displayMode: true},
3737
);
3838
}, 0);
3939
}

examples/draft-0-9-1/tex/js/modifiers/insertTeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function insertTeXBlock(editorState) {
4040
const entityKey = Entity.create(
4141
'TOKEN',
4242
'IMMUTABLE',
43-
{content: examples[nextFormula]}
43+
{content: examples[nextFormula]},
4444
);
4545

4646
return AtomicBlockUtils.insertAtomicBlock(editorState, entityKey, ' ');

examples/draft-0-9-1/tex/js/modifiers/removeTeXBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function removeTeXBlock(editorState, blockKey) {
3131
var resetBlock = Modifier.setBlockType(
3232
withoutTeX,
3333
withoutTeX.getSelectionAfter(),
34-
'unstyled'
34+
'unstyled',
3535
);
3636

3737
var newState = EditorState.push(editorState, resetBlock, 'remove-range');

0 commit comments

Comments
 (0)