From d0edfee9c1de25650f9edb4135a66a586348aefa Mon Sep 17 00:00:00 2001 From: "weiran.zsd" Date: Sun, 10 Feb 2019 19:45:31 +0800 Subject: [PATCH] Upgrade: some deps (#11372) --- Makefile.js | 4 ++-- docs/developer-guide/working-with-rules.md | 4 ++++ karma.conf.js | 2 +- package.json | 24 +++++++++++----------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Makefile.js b/Makefile.js index fc1d5b40c2b..cbc00e6efeb 100644 --- a/Makefile.js +++ b/Makefile.js @@ -821,10 +821,10 @@ target.browserify = function() { } // 2. browserify the temp directory - exec(`${getBinFile("browserify")} -x espree lib/linter.js -o ${BUILD_DIR}eslint.js -s eslint --global-transform [ babelify --presets [ es2015 ] ]`); + exec(`${getBinFile("browserify")} -x espree lib/linter.js -o ${BUILD_DIR}eslint.js -s eslint --global-transform [ babelify --presets [ @babel/preset-env ] ]`); // 3. Browserify espree - exec(`${getBinFile("browserify")} -r espree -o ${TEMP_DIR}espree.js --global-transform [ babelify --presets [ es2015 ] ]`); + exec(`${getBinFile("browserify")} -r espree -o ${TEMP_DIR}espree.js --global-transform [ babelify --presets [ @babel/preset-env ] ]`); // 4. Concatenate Babel polyfill, Espree, and ESLint files together cat("./node_modules/babel-polyfill/dist/polyfill.js", `${TEMP_DIR}espree.js`, `${BUILD_DIR}eslint.js`).to(`${BUILD_DIR}eslint.js`); diff --git a/docs/developer-guide/working-with-rules.md b/docs/developer-guide/working-with-rules.md index a0524ea5b64..38c2a8319f4 100644 --- a/docs/developer-guide/working-with-rules.md +++ b/docs/developer-guide/working-with-rules.md @@ -333,6 +333,7 @@ Best practices for fixes: ({ "foo": 1 }) ``` + * This fixer can just select a quote type arbitrarily. If it guesses wrong, the resulting code will be automatically reported and fixed by the [`quotes`](/docs/rules/quotes.md) rule. ### context.options @@ -405,16 +406,19 @@ Once you have an instance of `SourceCode`, you can use the methods on it to work * `commentsExistBetween(nodeOrToken1, nodeOrToken2)` - returns `true` if comments exist between two nodes. > `skipOptions` is an object which has 3 properties; `skip`, `includeComments`, and `filter`. Default is `{skip: 0, includeComments: false, filter: null}`. +> > * `skip` is a positive integer, the number of skipping tokens. If `filter` option is given at the same time, it doesn't count filtered tokens as skipped. > * `includeComments` is a boolean value, the flag to include comment tokens into the result. > * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. > > `countOptions` is an object which has 3 properties; `count`, `includeComments`, and `filter`. Default is `{count: 0, includeComments: false, filter: null}`. +> > * `count` is a positive integer, the maximum number of returning tokens. > * `includeComments` is a boolean value, the flag to include comment tokens into the result. > * `filter` is a function which gets a token as the first argument, if the function returns `false` then the result excludes the token. > > `rangeOptions` is an object which has 1 property: `includeComments`. +> > * `includeComments` is a boolean value, the flag to include comment tokens into the result. There are also some properties you can access: diff --git a/karma.conf.js b/karma.conf.js index e8a027e540e..9b26395e988 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -36,7 +36,7 @@ module.exports = function(config) { }, babelPreprocessor: { options: { - presets: ["es2015"] + presets: ["@babel/preset-env"] } }, diff --git a/package.json b/package.json index f1776d80495..fe1786db2a5 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { "@babel/code-frame": "^7.0.0", - "ajv": "^6.5.3", + "ajv": "^6.9.1", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", "debug": "^4.0.1", - "doctrine": "^2.1.0", + "doctrine": "^3.0.0", "eslint-scope": "^4.0.0", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", @@ -73,10 +73,10 @@ "text-table": "^0.2.0" }, "devDependencies": { - "babel-core": "^6.26.3", + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.3.1", "babel-polyfill": "^6.26.0", - "babel-preset-es2015": "^6.24.1", - "babelify": "^8.0.0", + "babelify": "^10.0.0", "beefy": "^2.1.8", "brfs": "^2.0.0", "browserify": "^16.2.2", @@ -90,26 +90,26 @@ "eslint-plugin-rulesdir": "^0.1.0", "eslint-release": "^1.2.0", "eslint-rule-composer": "^0.3.0", - "eslump": "^1.6.2", + "eslump": "^2.0.0", "esprima": "^4.0.1", "istanbul": "^0.4.5", "jsdoc": "^3.5.5", - "karma": "^3.0.0", - "karma-babel-preprocessor": "^7.0.0", + "karma": "^4.0.0", + "karma-babel-preprocessor": "^8.0.0", "karma-chrome-launcher": "^2.2.0", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.3", "leche": "^2.2.3", "load-perf": "^0.2.0", - "markdownlint": "^0.11.0", + "markdownlint": "^0.12.0", "mocha": "^5.0.5", - "mock-fs": "^4.6.0", + "mock-fs": "^4.8.0", "npm-license": "^0.3.3", "proxyquire": "^2.0.1", - "puppeteer": "^1.9.0", + "puppeteer": "^1.12.2", "shelljs": "^0.8.2", "sinon": "^3.3.0", - "temp": "^0.8.3", + "temp": "^0.9.0", "through": "^2.3.8" }, "keywords": [