moved eslint configuration to package.json (#4571)
This should help in the efforts of keeping the root directory clean.
This commit is contained in:
parent
35caae1a1a
commit
28879629f3
21
.eslintrc
21
.eslintrc
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -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'));
|
||||||
|
21
package.json
21
package.json
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user