mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-06-03 08:44:48 -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/*
|
node_modules/*
|
||||||
dist/*
|
dist/*
|
||||||
playground/
|
playground/
|
||||||
|
webpack.config.js
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
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 () {
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue