Add eslint config scratch

This commit is contained in:
DD Liu 2017-07-17 14:20:32 -04:00
parent 4e558380e7
commit eba604d242
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,4 @@
node_modules/* node_modules/*
dist/* dist/*
playground/ playground/
webpack.config.js

View file

@ -1,3 +1,3 @@
module.exports = { module.exports = {
extends: ['scratch', 'scratch/node'] extends: ['scratch', 'scratch/es6', 'scratch/node']
}; };

7
src/.eslintrc.js Normal file
View file

@ -0,0 +1,7 @@
module.exports = {
root: true,
extends: ['scratch', 'scratch/es6', 'scratch/react'],
env: {
browser: true
}
};

View file

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