diff --git a/.travis.yml b/.travis.yml index 2562f65..4cc9b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: env: JOB_PART=test-only before_install: - - 'if [[ `npm -v` != 5* ]]; then npm i -g npm@latest; fi' + - 'if [[ `npm -v` != 6* ]]; then npm i -g npm@latest; fi' - nvm --version - node --version - npm --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 20aff4d..573da38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,21 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). Except add new rule (it is breaking changed by default). +## 72.0.0 - 2018-07-17 + +- Added: `node/no-unsupported-features/es-builtins` rule. +- Added: `node/no-unsupported-features/es-syntax` rule. +- Added: `node/no-unsupported-features/node-builtins` rule. +- Added: `node/prefer-global/buffer` rule. +- Added: `node/prefer-global/console` rule. +- Added: `node/prefer-global/process` rule. +- Changed: use `ecmaVersion` `2019`. +- Chore: minimum require `eslint-plugin-node` version is now `^5.0.0`. + ## 71.0.0 - 2018-07-16 - Added: `ava/no-import-test-files` rule. -- Changed: minimum require `eslint-plugin-ava` version is now `^5.0.0`. +- Chore: minimum require `eslint-plugin-ava` version is now `^5.0.0`. ## 70.0.1 - 2018-07-05 @@ -19,11 +30,11 @@ rule (it is breaking changed by default). - Added: `jsx-a11y/label-has-associated-control` rule. - Added: `prefer-object-spread` rule. - Added: `max-classes-per-file` rule. -- Changed: minimum require `eslint` version is now `^5.0.0`. -- Changed: minimum require `eslint-plugin-import` version is now `^2.13.0`. -- Changed: minimum require `eslint-plugin-prettier` version is now `^2.6.1`. -- Changed: minimum require `eslint-plugin-react` version is now `^7.10.0`. -- Changed: minimum require `eslint-plugin-jsx-a11y` version is now `^6.1.0`. +- Chore: minimum require `eslint` version is now `^5.0.0`. +- Chore: minimum require `eslint-plugin-import` version is now `^2.13.0`. +- Chore: minimum require `eslint-plugin-prettier` version is now `^2.6.1`. +- Chore: minimum require `eslint-plugin-react` version is now `^7.10.0`. +- Chore: minimum require `eslint-plugin-jsx-a11y` version is now `^6.1.0`. - Changed: removed `prettier` preset. ## 69.0.0 - 2018-06-21 @@ -39,8 +50,8 @@ rule (it is breaking changed by default). - Changed: disable `strict` rule for `markdown` preset. - Changed: disable `no-process-env` rule for `markdown` preset. - Changed: disable `no-console` rule for `markdown` preset. -- Changed: minimum require `eslint-plugin-jest` version is now `^21.17.0`. -- Changed: minimum require `eslint-plugin-react` version is now `^7.9.1`. +- Chore: minimum require `eslint-plugin-jest` version is now `^21.17.0`. +- Chore: minimum require `eslint-plugin-react` version is now `^7.9.1`. ## 68.0.0 - 2018-05-22 @@ -77,40 +88,40 @@ rule (it is breaking changed by default). - Added: `jest/lowercase-name` rule. - Added: `jest/lowercase-name` rule. - Added: `jest/no-test-prefixes` rule. -- Changed: minimum require `eslint-plugin-jest` version is now `^21.12.1`. -- Changed: minimum require `eslint-plugin-unicorn` version is now `^4.0.1`. +- Chore: minimum require `eslint-plugin-jest` version is now `^21.12.1`. +- Chore: minimum require `eslint-plugin-unicorn` version is now `^4.0.1`. ## 63.0.0 - 2018-02-13 - Added: `jest/consistent-test-it` rule. - Added: `jest/valid-describe` rule. -- Changed: minimum require `eslint-plugin-jest` version is now `^21.9.0`. +- Chore: minimum require `eslint-plugin-jest` version is now `^21.9.0`. ## 62.0.0 - 2018-02-05 - Added: `react/jsx-child-element-spacing` rule. - Added: `react/jsx-sort-default-props` rule. - Added: `react/no-this-in-sfc` rule. -- Changed: minimum require `eslint` version is now `^4.17.0`. -- Changed: minimum require `eslint-plugin-node` version is now `^6.0.0`. -- Changed: minimum require `eslint-plugin-react` version is now `^7.6.1`. +- Chore: minimum require `eslint` version is now `^4.17.0`. +- Chore: minimum require `eslint-plugin-node` version is now `^6.0.0`. +- Chore: minimum require `eslint-plugin-react` version is now `^7.6.1`. ## 61.0.0 - 2018-01-17 - Added: `jest/valid-expect-in-promise` rule. -- Changed: minimum require `eslint-plugin-jest` version is now `^21.7.0`. +- Chore: minimum require `eslint-plugin-jest` version is now `^21.7.0`. ## 60.0.0 - 2018-01-11 - Added: `jest/globals` env. - Added: `jest/prefer-expect-assertions` rule. -- Changed: minimum require `eslint-plugin-jest` version is now `^21.6.1`. +- Chore: minimum require `eslint-plugin-jest` version is now `^21.6.1`. ## 59.0.0 - 2017-12-05 - Added: `jest/prefer-to-be-null` rule. - Added: `jest/prefer-to-be-undefined` rule. -- Changed: minimum require `nodejs` version is now `^6.9.0`. +- Chore: minimum require `nodejs` version is now `^6.9.0`. ## 58.0.0 - 2017-11-28 @@ -125,19 +136,19 @@ rule (it is breaking changed by default). - Added: `unicorn/new-for-builtins` rule. - Added: `jest/prefer-to-have-length` rule. - Changed: disable `no-unexpected-multiline` rule. -- Changed: minimum require `eslint-plugin-unicorn` version is now `^3.0.0`. +- Chore: minimum require `eslint-plugin-unicorn` version is now `^3.0.0`. ## 56.0.0 - 2017-10-19 - Added: `import/exports-last` rule. -- Changed: minimum require `eslint-plugin-import` version is now `^2.8.0`. +- Chore: minimum require `eslint-plugin-import` version is now `^2.8.0`. ## 55.0.0 - 2017-10-15 - Added: `promise/no-return-in-finally` rule. - Added: `lines-between-class-members` rule. -- Changed: minimum require `eslint` version is now `^4.9.0`. -- Changed: minimum require `eslint-plugin-promise` version is now `^3.6.0`. +- Chore: minimum require `eslint` version is now `^4.9.0`. +- Chore: minimum require `eslint-plugin-promise` version is now `^3.6.0`. ## 54.0.0 - 2017-09-28 @@ -146,8 +157,7 @@ rule (it is breaking changed by default). ## 53.0.0 - 2017-09-08 -- Chore **(Major update)**: minimum required `eslint-plugin-jest` version is now - `^21.0.0`. +- Chore: minimum required `eslint-plugin-jest` version is now `^21.0.0`. ## 52.0.0 - 2017-08-15 @@ -178,8 +188,7 @@ rule (it is breaking changed by default). - Changed: set `balanced` to `true` for block comments in `spaced-comment` rule. - Changed: set `location` to `start` in `no-warning-comments` rule. - Changed: set `enforceInMethodNames` to `true` in `no-underscore-dangle` rule. -- Chore **(Major update)**: minimum required `eslint-plugin-react` version is - now `^7.2.0`. +- Chore: minimum required `eslint-plugin-react` version is now `^7.2.0`. - Changed: override `class-methods-use-this` rule for react. - Changed: update supported `node` version. - Changed: use `default` fallthrough comment. diff --git a/lib/config/all.js b/lib/config/all.js index ecad637..a363232 100644 --- a/lib/config/all.js +++ b/lib/config/all.js @@ -25,7 +25,7 @@ module.exports = { }, parser: "babel-eslint", parserOptions: { - ecmaVersion: 8, + ecmaVersion: 2019, sourceType: "module", ecmaFeatures: { jsx: true diff --git a/lib/config/esnext.js b/lib/config/esnext.js index 7566154..705f165 100644 --- a/lib/config/esnext.js +++ b/lib/config/esnext.js @@ -11,7 +11,7 @@ module.exports = { }, parser: "babel-eslint", parserOptions: { - ecmaVersion: 8, + ecmaVersion: 2019, sourceType: "module", allowImportExportEverywhere: true }, diff --git a/lib/config/node.js b/lib/config/node.js index 19fe101..eaf3993 100644 --- a/lib/config/node.js +++ b/lib/config/node.js @@ -4,7 +4,7 @@ const nodeRules = require("./rules/node"); module.exports = { parserOptions: { - ecmaVersion: 2018 + ecmaVersion: 2019 }, env: { es6: true, diff --git a/lib/config/react.js b/lib/config/react.js index 4e5651a..91e7256 100644 --- a/lib/config/react.js +++ b/lib/config/react.js @@ -10,7 +10,7 @@ module.exports = { es6: true }, parserOptions: { - ecmaVersion: 8, + ecmaVersion: 2019, sourceType: "module", ecmaFeatures: { jsx: true diff --git a/lib/config/rules/node.js b/lib/config/rules/node.js index 639a202..ee09aa4 100644 --- a/lib/config/rules/node.js +++ b/lib/config/rules/node.js @@ -53,8 +53,12 @@ module.exports = { "node/no-unpublished-import": "error", // Disallow require()s for files that are not published. "node/no-unpublished-require": "error", - // Disallow unsupported ECMAScript features on the specified version. - "node/no-unsupported-features": ["error"], + // Disallow unsupported ECMAScript built-ins on the specified version + "node/no-unsupported-features/es-builtins": "error", + // Disallow unsupported ECMAScript syntax on the specified version + "node/no-unsupported-features/es-syntax": "error", + // Disallow unsupported Node.js built-in APIs on the specified version + "node/no-unsupported-features/node-builtins": "error", // Disallow exit as throw "node/process-exit-as-throw": "error", // Suggest correct usage of shebang. @@ -73,7 +77,10 @@ module.exports = { allowBatchAssign: false } ], - - // Deprecated - "node/no-hide-core-modules": "off" + "node/prefer-global/buffer": ["error", "always"], + "node/prefer-global/console": ["error", "always"], + "node/prefer-global/process": ["error", "always"], + // Enable after migrate on node@10 + "node/prefer-global/url-search-params": "off", + "node/prefer-global/url": "off" }; diff --git a/package-lock.json b/package-lock.json index 54f9d54..99c49f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "71.0.0", + "version": "72.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3201,6 +3201,24 @@ "pkg-up": "^2.0.0" } }, + "eslint-plugin-es": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.0" + }, + "dependencies": { + "regexpp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", + "dev": true + } + } + }, "eslint-plugin-html": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-4.0.5.tgz", @@ -3298,15 +3316,25 @@ } }, "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.0.tgz", + "integrity": "sha512-l5r5Zan0zHBP8nPqsxhABFcZ33FtN8o40+NiHri0N3Qa71AOcIX8BmXlXvQEhwsPmUE7Bg9Umkseo24waJmpYg==", "dev": true, "requires": { - "ignore": "^3.3.6", + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" + "resolve": "^1.8.1", + "semver": "^5.5.0" + }, + "dependencies": { + "ignore": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", + "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "dev": true + } } }, "eslint-plugin-promise": { diff --git a/package.json b/package.json index 6e703ce..c2568a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "71.0.0", + "version": "72.0.0", "description": "itgalaxy org's ESLint rules and configs.", "keywords": [ "eslint", @@ -39,7 +39,7 @@ "eslint-plugin-jsx-a11y": "^6.1.0", "eslint-plugin-lodash": "^2.4.3", "eslint-plugin-markdown": "^1.0.0-beta.8", - "eslint-plugin-node": "^6.0.0", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-promise": "^3.6.0", "eslint-plugin-react": "^7.10.0", "eslint-plugin-unicorn": "^4.0.1", @@ -65,7 +65,7 @@ "eslint-plugin-jsx-a11y": "^6.1.0", "eslint-plugin-lodash": "^2.4.3", "eslint-plugin-markdown": "^1.0.0-beta.8", - "eslint-plugin-node": "^6.0.0", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-promise": "^3.6.0", "eslint-plugin-react": "^7.10.0", "eslint-plugin-unicorn": "^4.0.1", @@ -120,7 +120,9 @@ "sourceType": "module" }, "rules": { - "node/no-unsupported-features": "off" + "node/no-unsupported-features/es-builtins": "off", + "node/no-unsupported-features/es-syntax": "off", + "node/no-unsupported-features/node-builtins": "off" } } ],