diff --git a/CHANGELOG.md b/CHANGELOG.md index b6ab5be..06e484b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ 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). +## 100.0.0 - 2019-04-03 + +- Added: `unicorn/prefer-query-selector` rule. +- Added: `unicorn/prefer-node-remove` rule. +- Added: `unicorn/prefer-text-content` rule. +- Added: `unicorn/no-for-loop` rule. +- Added: `unicorn/no-zero-fractions` rule. +- Added: `unicorn/prefer-includes` rule. +- Chore: minimum require `eslint-plugin-unicorn` version is now `^8.0.1`. + ## 99.0.0 - 2019-03-25 - Added: `jest/no-empty-title` rule. diff --git a/__tests__/index.js b/__tests__/index.js index 3a1f65e..97f49df 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -75,7 +75,7 @@ test("should load the `all` plugin config in the `eslint` to validate all rule s test("should load the `ava` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.ava); - const hasAvaPlugin = config.plugins.indexOf("ava") !== -1; + const hasAvaPlugin = config.plugins.includes("ava"); t.true(hasAvaPlugin, "there is ava plugin"); @@ -99,9 +99,9 @@ test("should load the `ava` plugin config in `eslint` to validate all rule synta test("should load the `esnext` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.esnext); - const hasUnicornPlugin = config.plugins.indexOf("unicorn") !== -1; - const hasPromisePlugin = config.plugins.indexOf("promise") !== -1; - const hasImportPlugin = config.plugins.indexOf("import") !== -1; + const hasUnicornPlugin = config.plugins.includes("unicorn"); + const hasPromisePlugin = config.plugins.includes("promise"); + const hasImportPlugin = config.plugins.includes("import"); t.true(hasUnicornPlugin, "there is unicorn plugin"); t.true(hasPromisePlugin, "there is promise plugin"); @@ -126,7 +126,7 @@ test("should load the `esnext` plugin config in `eslint` to validate all rule sy test("should load the `lodash` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.lodash); - const hasLodashPlugin = config.plugins.indexOf("lodash") !== -1; + const hasLodashPlugin = config.plugins.includes("lodash"); t.true(hasLodashPlugin, "there is lodash plugin"); @@ -147,7 +147,7 @@ test("should load the `lodash` plugin config in `eslint` to validate all rule sy test("should load the `node` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.node); - const hasNodePlugin = config.plugins.indexOf("node") !== -1; + const hasNodePlugin = config.plugins.includes("node"); t.true(hasNodePlugin, "there is node plugin"); @@ -165,8 +165,8 @@ test("should load the `node` plugin config in `eslint` to validate all rule synt test("should load the `react` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.react); - const hasReactPlugin = config.plugins.indexOf("react") !== -1; - const hasjsxA11yPlugin = config.plugins.indexOf("jsx-a11y") !== -1; + const hasReactPlugin = config.plugins.includes("react"); + const hasjsxA11yPlugin = config.plugins.includes("jsx-a11y"); t.true(hasReactPlugin, "there is react plugin"); t.true(hasjsxA11yPlugin, "there is jsx-a11y plugin"); @@ -206,7 +206,7 @@ module.exports = Clock; test("should load the `html` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.html); - const hasHTMLPlugin = config.plugins.indexOf("html") !== -1; + const hasHTMLPlugin = config.plugins.includes("html"); config.rules = { "no-alert": "error" @@ -264,7 +264,7 @@ test("should load the `html` plugin config in `eslint` to validate all rule synt test("should load the `jest` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.jest); - const hasJestPlugin = config.plugins.indexOf("jest") !== -1; + const hasJestPlugin = config.plugins.includes("jest"); t.true(hasJestPlugin, "there is jest plugin"); @@ -285,7 +285,7 @@ test("should load the `jest` plugin config in `eslint` to validate all rule synt test("should load the `markdown` plugin config in `eslint` to validate all rule syntax is correct", t => { const config = Object.assign({}, configs.markdown); - const hasMarkdownPlugin = config.plugins.indexOf("markdown") !== -1; + const hasMarkdownPlugin = config.plugins.includes("markdown"); config.rules = { "no-alert": "error" diff --git a/lib/config/rules/unicorn.js b/lib/config/rules/unicorn.js index 07dd039..1d5772c 100644 --- a/lib/config/rules/unicorn.js +++ b/lib/config/rules/unicorn.js @@ -7,67 +7,77 @@ module.exports = { "unicorn/catch-error-name": [ "error", { - name: "error", caughtErrorsIgnorePattern: "^ignore" } ], + // Enforce correct `Error` subclassing. + "unicorn/custom-error-definition": "error", + // Enforce passing a `message` value when throwing a built-in error. + "unicorn/error-message": "error", + // Require escape sequences to use uppercase values + "unicorn/escape-case": "error", // Enforce explicitly comparing the `length` property of a value "unicorn/explicit-length-check": "error", // Enforce a case style for filenames "unicorn/filename-case": "off", + // Enforce importing index files with `..` + "unicorn/import-index": "error", + // Enforce the use of `new` for all builtins, except `String`, `Number` and `Boolean`. + "unicorn/new-for-builtins": "error", // Enforce specifying rules to disable in `eslint-disable` comments "unicorn/no-abusive-eslint-disable": "error", - // Disallow `process.exit()` - // Use `no-process-exit` `eslint` rule - "unicorn/no-process-exit": "off", - // Require new when throwing an error (fixable) - "unicorn/throw-new-error": "error", - // Enforce lowercase identifier and uppercase value for number literals - // Use `prettier` - "unicorn/number-literal-case": "off", - // Require escape sequences to use uppercase values - "unicorn/escape-case": "error", // Require `Array.isArray()` instead of `instanceof Array` "unicorn/no-array-instanceof": "error", + // Do not use leading/trailing space between `console.log` parameters. + "unicorn/no-console-spaces": "error", + // Prevents passing a function reference directly to iterator methods. + "unicorn/no-fn-reference-in-iterator": "off", + // Do not use a `for` loop that can be replaced with a `for-of` loop + "unicorn/no-for-loop": "error", + // Enforce the use of unicode escapes instead of hexadecimal escapes. + "unicorn/no-hex-escape": "error", // Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()` // Use `node/no-deprecated-api` rule. "unicorn/no-new-buffer": "off", - // Enforce the use of unicode escapes instead of hexadecimal escapes. - "unicorn/no-hex-escape": "error", - // Enforce correct `Error` subclassing. - "unicorn/custom-error-definition": "error", - // Prefer `String#startsWith` & `String#endsWith` over more complex alternatives. - "unicorn/prefer-starts-ends-with": "error", - // Need investigate - // Enforce throwing `TypeError` in type checking conditions. - "unicorn/prefer-type-error": "off", - // Prevents passing a function reference directly to iterator methods. - "unicorn/no-fn-reference-in-iterator": "off", - // Enforce importing index files with `..` - "unicorn/import-index": "error", - // Enforce the use of `new` for all builtins, except `String`, `Number` and `Boolean`. - "unicorn/new-for-builtins": "error", - // Enforce the use of regex shorthands to improve readability. - "unicorn/regex-shorthand": "error", - // Prefer the spread operator over `Array.from()`. - "unicorn/prefer-spread": "error", - // Enforce passing a `message` value when throwing a built-in error. - "unicorn/error-message": "error", + // Disallow `process.exit()` + // Use `no-process-exit` `eslint` rule + "unicorn/no-process-exit": "off", + // Disallow unreadable array destructuring. + "unicorn/no-unreadable-array-destructuring": "off", // Disallow unsafe regular expressions. "unicorn/no-unsafe-regex": "off", + // Disallow unused object properties. + "unicorn/no-unused-properties": "off", + // Disallow number literals with zero fractions or dangling dots + "unicorn/no-zero-fractions": "error", + // Enforce lowercase identifier and uppercase value for number literals + // Use `prettier` + "unicorn/number-literal-case": "off", // Prefer `addEventListener` over `on`-functions. "unicorn/prefer-add-event-listener": "error", // Prefer the exponentiation operator over Math.pow() "unicorn/prefer-exponentiation-operator": "error", - // Do not use leading/trailing space between `console.log` parameters. - "unicorn/no-console-spaces": "error", - // Disallow unreadable array destructuring. - "unicorn/no-unreadable-array-destructuring": "off", - // Disallow unused object properties. - "unicorn/no-unused-properties": "off", + // Prefer `.includes()` over `.indexOf()` when checking for existence or non-existence + "unicorn/prefer-includes": "error", // Prefer `append` over `appendChild`. "unicorn/prefer-node-append": "error", - // Prefer `querySelector` over `getElementById`, `querySelectorAll` over g`etElementsByClassName` and `getElementsByTagName` - // Need enable in future - "unicorn/prefer-query-selector": "off" + // Prefer `remove` over `parentNode.removeChild` and `parentElement.removeChild`. + "unicorn/prefer-node-remove": "error", + // Prefer `querySelector` over `getElementById`, `querySelectorAll` over `getElementsByClassName` and `getElementsByTagName` + "unicorn/prefer-query-selector": "error", + // Prefer the spread operator over `Array.from()`. + "unicorn/prefer-spread": "error", + // Prefer `String#startsWith` & `String#endsWith` over more complex alternatives. + "unicorn/prefer-starts-ends-with": "error", + // Prefer `textContent` over `innerText` + "unicorn/prefer-text-content": "error", + // Maybe enable in future + // Enforce throwing `TypeError` in type checking conditions. + "unicorn/prefer-type-error": "off", + // Prevent abbreviations + "unicorn/prevent-abbreviations": "off", + // Enforce the use of regex shorthands to improve readability. + "unicorn/regex-shorthand": "error", + // Require new when throwing an error (fixable) + "unicorn/throw-new-error": "error" }; diff --git a/package-lock.json b/package-lock.json index 11c79a4..bc38149 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "99.0.0", + "version": "100.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -56,17 +56,17 @@ } }, "@babel/core": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.0.tgz", - "integrity": "sha512-Dzl7U0/T69DFOTwqz/FJdnOSWS57NpjNfCwMKHABr589Lg8uX1RrlBIJ7L5Dubt/xkLsx0xH5EBFzlBVes1ayA==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", + "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.0", - "@babel/parser": "^7.4.0", + "@babel/helpers": "^7.4.3", + "@babel/parser": "^7.4.3", "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.0", + "@babel/traverse": "^7.4.3", "@babel/types": "^7.4.0", "convert-source-map": "^1.1.0", "debug": "^4.1.0", @@ -149,9 +149,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", - "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", + "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -159,7 +159,7 @@ "@babel/helper-split-export-declaration": "^7.0.0", "@babel/template": "^7.2.2", "@babel/types": "^7.2.2", - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "@babel/helper-plugin-utils": { @@ -169,12 +169,12 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz", - "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", + "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "@babel/helper-remap-async-to-generator": { @@ -222,13 +222,13 @@ } }, "@babel/helpers": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.2.tgz", - "integrity": "sha512-gQR1eQeroDzFBikhrCccm5Gs2xBjZ57DNjGbqTaHo911IpmSxflOQWMAHPw/TXk8L3isv7s9lYzUkexOeTQUYg==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", + "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", "dev": true, "requires": { "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.0", + "@babel/traverse": "^7.4.3", "@babel/types": "^7.4.0" } }, @@ -244,9 +244,9 @@ } }, "@babel/parser": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.2.tgz", - "integrity": "sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", + "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -261,9 +261,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.0.tgz", - "integrity": "sha512-uTNi8pPYyUH2eWHyYWWSYJKwKg34hhgl4/dbejEjL+64OhbHjTX7wEVWMQl82tEmdDsGeu77+s8HHLS627h6OQ==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", + "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -319,14 +319,14 @@ } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz", - "integrity": "sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz", + "integrity": "sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.1.3" + "@babel/helper-regex": "^7.4.3", + "regexpu-core": "^4.5.4" } }, "@babel/plugin-transform-exponentiation-operator": { @@ -340,12 +340,12 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.0.tgz", - "integrity": "sha512-iWKAooAkipG7g1IY0eah7SumzfnIT3WNhT4uYB2kIsvHnNSB6MDYVa5qyICSwaTBDBY2c4SnJ3JtEa6ltJd6Jw==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", + "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-module-transforms": "^7.4.3", "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-simple-access": "^7.1.0" } @@ -371,16 +371,16 @@ } }, "@babel/traverse": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", - "integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", + "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.4.0", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.0", + "@babel/parser": "^7.4.3", "@babel/types": "^7.4.0", "debug": "^4.1.0", "globals": "^11.1.0", @@ -481,9 +481,9 @@ } }, "@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==", + "version": "11.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.0.tgz", + "integrity": "sha512-rx29MMkRdVmzunmiA4lzBYJNnXsW/PhG4kMBy2ATsYaDjGGR75dCFEVVROKpNwlVdcUX3xxlghKQOeDPBJobng==", "dev": true }, "@types/unist": { @@ -737,9 +737,9 @@ "dev": true }, "ava": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-1.4.0.tgz", - "integrity": "sha512-0k0YzgIhRWPibh4guIe1XdmJw985EQ86haALTosN8fRWEUDjWe3h2f7brTYfS7OsvKrHalO2p5AhaMwIFGY5/A==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/ava/-/ava-1.4.1.tgz", + "integrity": "sha512-wKpgOPTL7hJSBWpfbU4SA8rlsTZrph9g9g7qYDV7M6uK1rKeW8oCUJWRwCd8B24S4N0Y5myf6cTEnA66WIk0sA==", "dev": true, "requires": { "@ava/babel-preset-stage-4": "^2.0.0", @@ -937,15 +937,15 @@ "dev": true }, "binary-extensions": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", - "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", + "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==", "dev": true }, "boxen": { @@ -1394,9 +1394,9 @@ "dev": true }, "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, "common-path-prefix": { @@ -1755,9 +1755,9 @@ } }, "del": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-4.0.0.tgz", - "integrity": "sha512-/BnSJ+SuZyLu7xMn48kZY0nMXDi+5KNmR4g8n21Wivsl8+B9njV6/5kcTNE9juSprp0zRWBU28JuHUq0FqK1Nw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.0.tgz", + "integrity": "sha512-C4kvKNlYrwXhKxz97BuohF8YoGgQ23Xm9lvoHmgT7JaPGprSEjk3+XFled74Yt/x0ZABUHg2D67covzAPUKx5Q==", "dev": true, "requires": { "globby": "^6.1.0", @@ -1765,7 +1765,7 @@ "is-path-in-cwd": "^2.0.0", "p-map": "^2.0.0", "pify": "^4.0.1", - "rimraf": "^2.6.2" + "rimraf": "^2.6.3" }, "dependencies": { "globby": { @@ -1970,9 +1970,9 @@ "dev": true }, "eslint": { - "version": "5.15.3", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.3.tgz", - "integrity": "sha512-vMGi0PjCHSokZxE0NLp2VneGw5sio7SSiDNgIUn2tC0XkWJRNOIoHIg3CliLVfXnJsiHxGAYrkw0PieAu8+KYQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1995,7 +1995,7 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "inquirer": "^6.2.2", - "js-yaml": "^3.12.0", + "js-yaml": "^3.13.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", "lodash": "^4.17.11", @@ -2453,9 +2453,9 @@ } }, "eslint-plugin-promise": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", - "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.1.1.tgz", + "integrity": "sha512-faAHw7uzlNPy7b45J1guyjazw28M+7gJokKUjC5JSFoYfUEyy6Gw/i7YQvmv2Yk00sUjWcmzXQLpU1Ki/C2IZQ==", "dev": true }, "eslint-plugin-react": { @@ -2485,18 +2485,21 @@ } }, "eslint-plugin-unicorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-7.1.0.tgz", - "integrity": "sha512-lW/ZwGR638V0XuZgR160qVQvPtw8tw3laKT5LjJPt+W+tN7kVf2S2V7x+ZrEEwSjEb3OiEzb3cppzaKuYtgYeg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-8.0.1.tgz", + "integrity": "sha512-BIkPbCww71GZPnT1U4jzlNQyabmV7JlHu3qhCGLkZZKFp7jWkWdCQziadYdpLFLD5A+Z2nSi1LPe8/fkesvPVg==", "dev": true, "requires": { "clean-regexp": "^1.0.0", "eslint-ast-utils": "^1.0.0", "import-modules": "^1.1.0", "lodash.camelcase": "^4.1.1", + "lodash.defaultsdeep": "^4.6.0", "lodash.kebabcase": "^4.0.1", "lodash.snakecase": "^4.0.1", + "lodash.topairs": "^4.3.0", "lodash.upperfirst": "^4.2.0", + "reserved-words": "^0.1.2", "safe-regex": "^2.0.1" }, "dependencies": { @@ -2540,9 +2543,9 @@ "dev": true }, "esm": { - "version": "3.2.20", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.20.tgz", - "integrity": "sha512-NA92qDA8C/qGX/xMinDGa3+cSPs4wQoFxskRrSnDo/9UloifhONFm4sl4G+JsyCqM007z2K+BfQlH5rMta4K1Q==", + "version": "3.2.22", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz", + "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==", "dev": true }, "espower-location-detector": { @@ -3790,9 +3793,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz", - "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4176,9 +4179,9 @@ "dev": true }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -4912,6 +4915,12 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.defaultsdeep": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", + "integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", + "dev": true + }, "lodash.difference": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", @@ -4960,6 +4969,12 @@ "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", "dev": true }, + "lodash.topairs": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.topairs/-/lodash.topairs-4.3.0.tgz", + "integrity": "sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ=", + "dev": true + }, "lodash.upperfirst": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", @@ -6686,16 +6701,16 @@ } }, "ora": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.2.0.tgz", - "integrity": "sha512-XHMZA5WieCbtg+tu0uPF8CjvwQdNzKCX6BVh3N6GFsEXH40mTk5dsw/ya1lBTUGJslcEFJFQ8cBhOgkkZXQtMA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", "dev": true, "requires": { "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-spinners": "^2.0.0", "log-symbols": "^2.2.0", - "strip-ansi": "^5.0.0", + "strip-ansi": "^5.2.0", "wcwidth": "^1.0.1" } }, @@ -6753,9 +6768,9 @@ "dev": true }, "p-try": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", - "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "package-hash": { @@ -6783,9 +6798,9 @@ } }, "parent-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", - "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -7130,33 +7145,33 @@ } }, "react": { - "version": "16.8.5", - "resolved": "https://registry.npmjs.org/react/-/react-16.8.5.tgz", - "integrity": "sha512-daCb9TD6FZGvJ3sg8da1tRAtIuw29PbKZW++NN4wqkbEvxL+bZpaaYb4xuftW/SpXmgacf1skXl/ddX6CdOlDw==", + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz", + "integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.13.5" + "scheduler": "^0.13.6" } }, "react-dom": { - "version": "16.8.5", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.5.tgz", - "integrity": "sha512-VIEIvZLpFafsfu4kgmftP5L8j7P1f0YThfVTrANMhZUFMDOsA6e0kfR6wxw/8xxKs4NB59TZYbxNdPCDW34x4w==", + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz", + "integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.13.5" + "scheduler": "^0.13.6" } }, "react-is": { - "version": "16.8.5", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.5.tgz", - "integrity": "sha512-sudt2uq5P/2TznPV4Wtdi+Lnq3yaYW8LfvPKLM9BKD8jJNBkxMVyB0C9/GmVhLw7Jbdmndk/73n7XQGeN9A3QQ==", + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", + "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==", "dev": true }, "read-pkg": { @@ -7780,11 +7795,12 @@ } }, "remark-lint-no-undefined-references": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/remark-lint-no-undefined-references/-/remark-lint-no-undefined-references-1.0.3.tgz", - "integrity": "sha512-yQxSpTQ3aGY4aszGSktAzeBC+h/k/YR/bf4ATrjCK5dz4C3InodCcrW/mtarLHR/3/kvM7NcGiOl0PElKJW5mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remark-lint-no-undefined-references/-/remark-lint-no-undefined-references-1.1.0.tgz", + "integrity": "sha512-XscZKp6AyQjsdwo68R6IwCKQH89PlTY7c3ar4GAsjc7oEJHw9h2EvtlhcQtHPV+E1Op/XRg0gJGJ5UZzY7ZjaQ==", "dev": true, "requires": { + "collapse-white-space": "^1.0.4", "unified-lint-rule": "^1.0.0", "unist-util-generated": "^1.1.0", "unist-util-visit": "^1.4.0" @@ -7992,6 +8008,12 @@ "integrity": "sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=", "dev": true }, + "reserved-words": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz", + "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", + "dev": true + }, "resolve": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", @@ -8111,9 +8133,9 @@ "dev": true }, "scheduler": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.5.tgz", - "integrity": "sha512-K98vjkQX9OIt/riLhp6F+XtDPtMQhqNcf045vsh+pcuvHq+PHy1xCrH3pq1P40m6yR46lpVvVhKdEOtnimuUJw==", + "version": "0.13.6", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", + "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -8121,9 +8143,9 @@ } }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, "semver-compare": { @@ -8668,9 +8690,9 @@ "dev": true }, "synchronous-promise": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.6.tgz", - "integrity": "sha512-TyOuWLwkmtPL49LHCX1caIwHjRzcVd62+GF6h8W/jHOeZUFHpnd2XJDVuUlaTaLPH1nuu2M69mfHr5XbQJnf/g==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.7.tgz", + "integrity": "sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A==", "dev": true }, "table": { @@ -9034,9 +9056,9 @@ }, "dependencies": { "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", + "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", "dev": true }, "json5": { diff --git a/package.json b/package.json index e4b35ba..5bb0e3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-itgalaxy", - "version": "99.0.0", + "version": "100.0.0", "description": "Itgalaxy org's ESLint rules and configs.", "keywords": [ "eslint", @@ -45,7 +45,7 @@ "eslint-plugin-node": "^8.0.0", "eslint-plugin-promise": "^4.0.0", "eslint-plugin-react": "^7.12.0", - "eslint-plugin-unicorn": "^7.1.0", + "eslint-plugin-unicorn": "^8.0.1", "husky": "^1.0.0", "lint-staged": "^8.0.4", "npm-run-all": "^4.0.1", @@ -71,7 +71,7 @@ "eslint-plugin-node": "^8.0.0", "eslint-plugin-promise": "^4.0.0", "eslint-plugin-react": "^7.12.0", - "eslint-plugin-unicorn": "^7.1.0" + "eslint-plugin-unicorn": "^8.0.1" }, "scripts": { "coveralls": "nyc report --reporter=text-lcov | coveralls",