Skip to content

Commit eba604d

Browse files
author
DD Liu
committed
Add eslint config scratch
1 parent 4e55838 commit eba604d

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/*
22
dist/*
3-
playground/
3+
playground/
4+
webpack.config.js

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['scratch', 'scratch/node']
2+
extends: ['scratch', 'scratch/es6', 'scratch/node']
33
};

src/.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['scratch', 'scratch/es6', 'scratch/react'],
4+
env: {
5+
browser: true
6+
}
7+
};

src/components/paper-canvas.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class PaperCanvas extends React.Component {
1010
componentDidMount () {
1111
paper.setup('paper-canvas');
1212
// Create a Paper.js Path to draw a line into it:
13-
var path = new paper.Path();
13+
const path = new paper.Path();
1414
// Give the stroke a color
1515
path.strokeColor = 'black';
16-
var start = new paper.Point(100, 100);
16+
const start = new paper.Point(100, 100);
1717
// Move to start and draw a line from there
1818
path.moveTo(start);
1919
// Note that the plus operator on Point objects does not work

0 commit comments

Comments
 (0)