From 28879629f3aa3be0b2f7f68bc29d49584106c377 Mon Sep 17 00:00:00 2001 From: Manuel Lopez Date: Wed, 1 Jun 2016 09:32:06 -0500 Subject: [PATCH] moved eslint configuration to package.json (#4571) This should help in the efforts of keeping the root directory clean. --- .eslintrc | 21 --------------------- Jakefile.js | 2 +- package.json | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 7216fcf8..00000000 --- a/.eslintrc +++ /dev/null @@ -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 - } -} diff --git a/Jakefile.js b/Jakefile.js index 7633f2d4..8c86f1ac 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -43,7 +43,7 @@ function calculateVersion(officialRelease, callback) { } 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'); task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc')); diff --git a/package.json b/package.json index b8325e0c..5aa843d4 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,27 @@ "build": "jake build", "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": { "type": "git", "url": "git://github.com/Leaflet/Leaflet.git"