moved eslint configuration to package.json (#4571)

This should help in the efforts of keeping the root directory clean.
This commit is contained in:
Manuel Lopez 2016-06-01 09:32:06 -05:00 committed by Vladimir Agafonkin
parent 35caae1a1a
commit 28879629f3
3 changed files with 22 additions and 22 deletions

View File

@ -1,21 +0,0 @@
{
"globals": {
"L": true,
},
"env": {
"commonjs": true,
"amd": true,
"node": false
},
"extends": "mourner",
"rules": {
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"indent": [2, "tab", {"VariableDeclarator": 0}],
"curly": 2,
"spaced-comment": 2,
"strict": 0,
"wrap-iife": 0,
"key-spacing": 0,
"consistent-return": 0
}
}

View File

@ -43,7 +43,7 @@ function calculateVersion(officialRelease, callback) {
} }
desc('Check Leaflet source for errors with ESLint'); desc('Check Leaflet source for errors with ESLint');
task('lint', {async: true}, hint('Checking for JS errors...', 'src --config .eslintrc')); task('lint', {async: true}, hint('Checking for JS errors...', 'src --config package.json'));
desc('Check Leaflet specs source for errors with ESLint'); desc('Check Leaflet specs source for errors with ESLint');
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc')); task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc'));

View File

@ -29,6 +29,27 @@
"build": "jake build", "build": "jake build",
"release": "./build/publish.sh" "release": "./build/publish.sh"
}, },
"eslintConfig": {
"globals": {
"L": true
},
"env": {
"commonjs": true,
"amd": true,
"node": false
},
"extends": "mourner",
"rules": {
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"indent": [2, "tab", {"VariableDeclarator": 0}],
"curly": 2,
"spaced-comment": 2,
"strict": 0,
"wrap-iife": 0,
"key-spacing": 0,
"consistent-return": 0
}
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/Leaflet/Leaflet.git" "url": "git://github.com/Leaflet/Leaflet.git"