mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-05-15 07:31:10 -04:00
Add eslint config scratch
This commit is contained in:
parent
4e558380e7
commit
eba604d242
4 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
node_modules/*
|
||||
dist/*
|
||||
playground/
|
||||
playground/
|
||||
webpack.config.js
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['scratch', 'scratch/node']
|
||||
extends: ['scratch', 'scratch/es6', 'scratch/node']
|
||||
};
|
||||
|
|
7
src/.eslintrc.js
Normal file
7
src/.eslintrc.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ['scratch', 'scratch/es6', 'scratch/react'],
|
||||
env: {
|
||||
browser: true
|
||||
}
|
||||
};
|
|
@ -10,10 +10,10 @@ class PaperCanvas extends React.Component {
|
|||
componentDidMount () {
|
||||
paper.setup('paper-canvas');
|
||||
// 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
|
||||
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
|
||||
path.moveTo(start);
|
||||
// Note that the plus operator on Point objects does not work
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue