Install and configure eslint-config-scratch

This commit is contained in:
Ray Schamp 2017-04-17 11:20:53 -04:00
parent 7ac04913ba
commit cd699dbc0f
4 changed files with 9 additions and 22 deletions

View file

@ -1,22 +0,0 @@
{
"parser": "babel-eslint",
"rules": {
"curly": [2, "multi-line"],
"eol-last": [2],
"indent": [2, 4],
"linebreak-style": [2, "unix"],
"max-len": [2, 120, 4],
"no-trailing-spaces": [2, { "skipBlankLines": true }],
"no-unused-vars": [2, {"args": "after-used", "varsIgnorePattern": "^_"}],
"quotes": [2, "single"],
"semi": [2, "always"],
"space-before-function-paren": [2, "always"],
"strict": [2, "never"]
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended"]
}

3
.eslintrc.js Normal file
View file

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

View file

@ -26,6 +26,7 @@
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-scratch": "^3.1.0",
"json": "^9.0.6",
"minilog": "^3.0.1",
"soundfont-player": "0.10.5",

5
src/.eslintrc.js Normal file
View file

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