Skip to content

Commit 7ea1e35

Browse files
author
Ray Schamp
committed
Set up base eslint config in .eslintrc.js
After doing this, new rules began applying for some reason: `eol-last` only began taking the 'always' parameter as of 3.6.0, so I needed to update eslint. `no-unused-var` started warning about process.env after updating the config structure `comma-dangle` decided to start working, maybe because of the upgrade to eslint? Autofixed with --fix
1 parent 55d359a commit 7ea1e35

File tree

9 files changed

+12
-14
lines changed

9 files changed

+12
-14
lines changed

.eslintrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
module.exports = {
2-
env: {
3-
node: true
4-
}
2+
extends: ['scratch', 'scratch/node']
53
};

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
"start": "webpack-dev-server --port $npm_package_config_port --content-base=./build",
1919
"test": "npm run lint && npm run build"
2020
},
21-
"eslintConfig": {
22-
"extends": ["scratch"]
23-
},
2421
"author": "Massachusetts Institute of Technology",
2522
"license": "BSD-3-Clause",
2623
"homepage": "https://github.com/LLK/scratch-gui#readme",
@@ -40,7 +37,7 @@
4037
"babel-preset-es2015": "6.14.0",
4138
"babel-preset-react": "6.11.1",
4239
"copy-webpack-plugin": "3.0.1",
43-
"eslint": "3.5.0",
40+
"eslint": "3.8.1",
4441
"eslint-config-scratch": "^2.0.0",
4542
"eslint-plugin-react": "6.4.1",
4643
"gh-pages": "0.11.0",

src/.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ module.exports = {
33
node: false,
44
browser: true
55
},
6-
extends: ['scratch/es6', 'scratch/react']
6+
extends: ['scratch/es6', 'scratch/react'],
7+
globals: {
8+
process: true
9+
}
710
};

src/components/green-flag.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GreenFlagComponent extends React.Component {
2626

2727
GreenFlagComponent.propTypes = {
2828
onClick: React.PropTypes.func,
29-
title: React.PropTypes.string,
29+
title: React.PropTypes.string
3030
};
3131

3232
GreenFlagComponent.defaultProps = {

src/components/library.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ LibraryComponent.propTypes = {
6161
React.PropTypes.shape({
6262
md5: React.PropTypes.string,
6363
name: React.PropTypes.string,
64-
rawURL: React.PropTypes.string,
64+
rawURL: React.PropTypes.string
6565
})
6666
/* eslint-enable react/no-unused-prop-types, lines-around-comment */
6767
),

src/components/sprite-selector.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SpriteSelectorComponent extends React.Component {
1616
style={{
1717
position: 'absolute',
1818
top: 380,
19-
right: 10,
19+
right: 10
2020
}}
2121
{...props}
2222
>

src/components/stage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class StageComponent extends React.Component {
1717
top: 10,
1818
right: 10,
1919
width: width,
20-
height: height,
20+
height: height
2121
}}
2222
{...props}
2323
/>

src/components/stop-all.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class StopAllComponent extends React.Component {
2626

2727
StopAllComponent.propTypes = {
2828
onClick: React.PropTypes.func,
29-
title: React.PropTypes.string,
29+
title: React.PropTypes.string
3030
};
3131

3232
StopAllComponent.defaultProps = {

src/containers/gui.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ GUI.propTypes = {
122122
spriteSelectorProps: shapeFromPropTypes(SpriteSelector.propTypes, {omit: ['vm']}),
123123
stageProps: shapeFromPropTypes(Stage.propTypes, {omit: ['vm']}),
124124
stopAllProps: shapeFromPropTypes(StopAll.propTypes, {omit: ['vm']}),
125-
vm: React.PropTypes.instanceOf(VM),
125+
vm: React.PropTypes.instanceOf(VM)
126126
};
127127

128128
GUI.defaultProps = {

0 commit comments

Comments
 (0)