diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 00000000..3ff9da1e
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,21 @@
+version: 2
+jobs:
+ build:
+ working_directory: ~/app
+ docker:
+ - image: circleci/node:8.9.4
+ steps:
+ - checkout
+ - restore_cache:
+ keys:
+ # Find a cache corresponding to this specific package.json checksum
+ # when this file is changed, this key will fail
+ - v1-npm-deps-{{ arch }}-{{ checksum "yarn.lock" }}
+ # Find the most recent cache used from any branch
+ - v1-npm-deps-{{ arch }} # used if above checksum fails
+ - run: yarn
+ - save_cache:
+ key: v1-npm-deps-{{ arch }}-{{ checksum "yarn.lock" }}
+ paths:
+ - node_modules
+ - run: yarn run check
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93a683d7..6f893b3f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,45 @@
# Changelog
-
+## [Unreleased]
+* **Breaking:** the version of TypeScript supported by this plugin is 2.7.x (in line with [typescript-eslint-parser](https://github.com/eslint/typescript-eslint-parser)’s TypeScript support)
+* Updated dependencies that support the new ESLint documentation URL metadata. Errors from these plugins are accompanied by a link to the documentation for the broken rule.
+* Dependencies are now strictly versioned for tighter control over the exact rules the plugin enforces.
+
+| Package | old | new |
+| ------- | --- | --- |
+| `eslint-plugin-ava` | `^4.4.0` | `4.5.1` |
+| `eslint-plugin-import` | `^2.8.0` | `2.9.0` |
+| `eslint-plugin-jest` | `^21.5.0` | `21.14.1` |
+| `eslint-plugin-lodash` | `^2.5.0` | `2.6.1` |
+| `eslint-plugin-node` | `^5.2.1` | `6.0.1` |
+| `eslint-plugin-prettier` | `^2.4.0` | `2.6.0` |
+| `eslint-plugin-promise` | `^3.6.0` | `3.7.0` |
+| `eslint-plugin-react` | `^7.5.1` | `7.7.0` |
+| `eslint-plugin-typescript` | `^0.8.1` | `0.10.0` |
+
+* Added rules:
+ - [`react/forbid-dom-props`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md) (disabled)
+ - [`react/jsx-child-element-spacing`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md) **error**
+ - [`react/jsx-max-depth`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md) (disabled)
+ - [`react/jsx-sort-default-props`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md) (disabled)
+ - [`react/no-this-in-sfc`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md) **error**
+ - [`import/group-exports`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/group-exports.md) (disabled)
+ - [`import/no-self-import`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-self-import.md) **error**
+ - [`import/no-default-export`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md) (disabled)
+ - [`import/no-useless-path-segments`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-useless-path-segments.md) **error**
+ - [`jest/prefer-expect-assertions`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-expect-assertions.md) (disabled)
+ - [`jest/valid-expect-in-promise`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect-in-promise.md) **error**
+ - [`jest/valid-describe`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-describe.md) **error**
+ - [`jest/consistent-test-it`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/consistent-test-it.md) **error**
+ - [`jest/no-test-prefixes`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-test-prefixes.md) **error**
+ - [`jest/lowercase-name`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/lowercase-name.md) (disabled)
+ - [`jest/no-jest-import`](https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-jest-import.md) **error**
+ - [`promise/valid-params`](https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/valid-params.md) **error**
+ - [`promise/no-new-statics`](https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/no-new-statics.md) (disabled)
+ - [`typescript/explicit-function-return-type`](https://github.com/nzakas/eslint-plugin-typescript/blob/master/docs/rules/explicit-function-return-type.md) (disabled)
+ - [`typescript/no-non-null-assertion`](https://github.com/nzakas/eslint-plugin-typescript/blob/master/docs/rules/no-non-null-assertion.md) **error**
+* Updated `import/extensions` due to changes in its implementation: some extensions are explicitly allowed in `import`s: `.svg`, `.png`, `.jpg`, `.ico`. `.json` is still required as well.
+* Chore: updated CircleCI from v1 to v2.
## [19.0.1] - 2018-03-12
diff --git a/README.md b/README.md
index 8ea316fa..9dc37e04 100644
--- a/README.md
+++ b/README.md
@@ -113,24 +113,24 @@ A node project that will use Babel for transpilation would need the following ES
This plugin provides the following custom rules, which are included as appropriate in all core linting configs:
-- [binary-assignment-parens](docs/rules/binary-assignment-parens.md): Requires (or disallows) assignments of binary, boolean-producing expressions to be wrapped in parentheses.
-- [class-property-semi](docs/rules/class-property-semi.md): Requires (or disallows) semicolons for class properties.
-- [jquery-dollar-sign-reference](docs/rules/jquery-dollar-sign-reference.md): Requires that all jQuery objects are assigned to references prefixed with `$`.
-- [jsx-no-complex-expressions](docs/rules/jsx-no-complex-expressions.md): Disallows complex expressions embedded in in JSX.
-- [jsx-no-hardcoded-content](docs/rules/jsx-no-hardcoded-content.md): Disallows hardcoded content in JSX.
-- [no-useless-computed-properties](docs/rules/no-useless-computed-properties.md): Prevents the usage of unnecessary computed properties.
+- [binary-assignment-parens](docs/rules/binary-assignment-parens.md): Require (or disallow) assignments of binary, boolean-producing expressions to be wrapped in parentheses.
+- [class-property-semi](docs/rules/class-property-semi.md): Require (or disallow) semicolons for class properties.
+- [jquery-dollar-sign-reference](docs/rules/jquery-dollar-sign-reference.md): Require that all jQuery objects are assigned to references prefixed with `$`.
+- [jsx-no-complex-expressions](docs/rules/jsx-no-complex-expressions.md): Disallow complex expressions embedded in in JSX.
+- [jsx-no-hardcoded-content](docs/rules/jsx-no-hardcoded-content.md): Disallow hardcoded content in JSX.
+- [no-useless-computed-properties](docs/rules/no-useless-computed-properties.md): Prevent the usage of unnecessary computed properties.
- [polaris-no-bare-stack-item](docs/rules/polaris-no-bare-stack-item.md): Disallow the use of Polaris’s `Stack.Item` without any custom props.
- [polaris-prefer-sectioned-prop](docs/rules/polaris-prefer-sectioned-prop.md): Prefer the use of the `sectioned` props in Polaris components instead of wrapping all contents in a `Section` component.
- [prefer-class-properties](docs/rules/prefer-class-properties.md): Prefer class properties to assignment of literals in constructors.
- [prefer-early-return](docs/rules/prefer-early-return.md): Prefer early returns over full-body conditional wrapping in function declarations.
- [prefer-module-scope-constants](docs/rules/prefer-module-scope-constants.md): Prefer that screaming snake case variables always be defined using `const`, and always appear at module scope.
- [prefer-twine](docs/rules/prefer-twine.md): Prefer Twine over Bindings as the name for twine imports.
-- [react-initialize-state](docs/rules/react-initialize-state.md): Requires that React component state be initialized when it has a non-empty type.
-- [react-type-state](docs/rules/react-type-state.md): Requires that React component state be typed in TypeScript.
-- [restrict-full-import](docs/rules/restrict-full-import.md): Prevents importing the entirety of a package.
-- [sinon-no-restricted-features](docs/rules/sinon-no-restricted-features.md): Restricts the use of specified sinon features.
-- [sinon-prefer-meaningful-assertions](docs/rules/sinon-prefer-meaningful-assertions.md): Requires the use of meaningful sinon assertions through sinon.assert or sinon-chai.
-- [webpack/no-unnamed-dynamic-imports](docs/rules/webpack/no-unnamed-dynamic-imports.md): Requires that all dynamic imports contain a `webpackChunkName` comment.
+- [react-initialize-state](docs/rules/react-initialize-state.md): Require that React component state be initialized when it has a non-empty type.
+- [react-type-state](docs/rules/react-type-state.md): Require that React component state be typed in TypeScript.
+- [restrict-full-import](docs/rules/restrict-full-import.md): Prevent importing the entirety of a package.
+- [sinon-no-restricted-features](docs/rules/sinon-no-restricted-features.md): Restrict the use of specified sinon features.
+- [sinon-prefer-meaningful-assertions](docs/rules/sinon-prefer-meaningful-assertions.md): Require the use of meaningful sinon assertions through sinon.assert or sinon-chai.
+- [webpack/no-unnamed-dynamic-imports](docs/rules/webpack/no-unnamed-dynamic-imports.md): Require that all dynamic imports contain a `webpackChunkName` comment.
## Creating New Rules
diff --git a/circle.yml b/circle.yml
deleted file mode 100644
index 91a89cff..00000000
--- a/circle.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-machine:
- environment:
- PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
- node:
- version: 8.9.4
-
-dependencies:
- override:
- - yarn
- cache_directories:
- - ~/.cache/yarn
-
-test:
- override:
- - yarn run check
diff --git a/docs/rules/binary-assignment-parens.md b/docs/rules/binary-assignment-parens.md
index 73bef118..b85421e8 100644
--- a/docs/rules/binary-assignment-parens.md
+++ b/docs/rules/binary-assignment-parens.md
@@ -1,4 +1,4 @@
-# Requires (or disallows) assignments of binary, boolean-producing expressions to be wrapped in parentheses. (binary-assignment-parens)
+# Require (or disallow) assignments of binary, boolean-producing expressions to be wrapped in parentheses. (binary-assignment-parens)
## Rule Details
diff --git a/docs/rules/class-property-semi.md b/docs/rules/class-property-semi.md
index 069ca56d..a03781c4 100644
--- a/docs/rules/class-property-semi.md
+++ b/docs/rules/class-property-semi.md
@@ -1,4 +1,4 @@
-# Requires (or disallows) semicolons for class properties. (class-property-semi)
+# Require (or disallow) semicolons for class properties. (class-property-semi)
## Rule Details
diff --git a/docs/rules/jquery-dollar-sign-reference.md b/docs/rules/jquery-dollar-sign-reference.md
index f48d73a5..8a9e267d 100644
--- a/docs/rules/jquery-dollar-sign-reference.md
+++ b/docs/rules/jquery-dollar-sign-reference.md
@@ -1,4 +1,4 @@
-# Requires that all jQuery objects are assigned to references prefixed with `$`. (jquery-dollar-sign-reference)
+# Require that all jQuery objects are assigned to references prefixed with `$`. (jquery-dollar-sign-reference)
Identifying a reference as being a jQuery object makes it immediately obvious what methods are available on that reference.
diff --git a/docs/rules/jsx-no-complex-expressions.md b/docs/rules/jsx-no-complex-expressions.md
index 550a356b..c79d1a18 100644
--- a/docs/rules/jsx-no-complex-expressions.md
+++ b/docs/rules/jsx-no-complex-expressions.md
@@ -1,4 +1,4 @@
-# Disallows complex expressions embedded in in JSX. (jsx-no-complex-expressions)
+# Disallow complex expressions embedded in in JSX. (jsx-no-complex-expressions)
Having complex conditionals embedded in JSX can make it harder to read. This rule aims to improve the readability of JSX by preventing the use of complex expressions.
diff --git a/docs/rules/jsx-no-hardcoded-content.md b/docs/rules/jsx-no-hardcoded-content.md
index 4ee9c27b..973b7fa6 100644
--- a/docs/rules/jsx-no-hardcoded-content.md
+++ b/docs/rules/jsx-no-hardcoded-content.md
@@ -1,4 +1,4 @@
-# Disallows hardcoded content in JSX. (jsx-no-hardcoded-content)
+# Disallow hardcoded content in JSX. (jsx-no-hardcoded-content)
Many JSX components accept children and other properties that are intended for UI content. In an internationalized app, content is generally provided to these components through a translation function, not directly as strings. This rule enforces that components not accept harcoded literal content.
diff --git a/docs/rules/no-fully-static-classes.md b/docs/rules/no-fully-static-classes.md
index ed57fb88..c37c2ac9 100644
--- a/docs/rules/no-fully-static-classes.md
+++ b/docs/rules/no-fully-static-classes.md
@@ -1,4 +1,4 @@
-# Prevents the declaration of classes consisting only of static members. (no-fully-static-classes)
+# Prevent the declaration of classes consisting only of static members. (no-fully-static-classes)
## Rule Details
diff --git a/docs/rules/no-useless-computed-properties.md b/docs/rules/no-useless-computed-properties.md
index 804cc488..10862643 100644
--- a/docs/rules/no-useless-computed-properties.md
+++ b/docs/rules/no-useless-computed-properties.md
@@ -1,4 +1,4 @@
-# Prevents the usage of unnecessary computed properties. (no-useless-computed-properties)
+# Prevent the usage of unnecessary computed properties. (no-useless-computed-properties)
Computed properties allow you to define methods and properties of an object or class without having to know exact name of the key.
diff --git a/docs/rules/polaris-prefer-sectioned-prop.md b/docs/rules/polaris-prefer-sectioned-prop.md
index 160dac5f..32c202ff 100644
--- a/docs/rules/polaris-prefer-sectioned-prop.md
+++ b/docs/rules/polaris-prefer-sectioned-prop.md
@@ -4,7 +4,7 @@ Polaris provides a convenience `sectioned` prop for some components that wraps t
## Rule details
-This rule currently requires the use of the `sectioned` prop over the `Section` subcomponent for the following components:
+This rule currently Require the use of the `sectioned` prop over the `Section` subcomponent for the following components:
* [`Card`](https://polaris.shopify.com/components/structure/card)
* [`Popover`](https://polaris.shopify.com/components/overlays/popover)
diff --git a/docs/rules/react-initialize-state.md b/docs/rules/react-initialize-state.md
index 9f21fa10..78d99666 100644
--- a/docs/rules/react-initialize-state.md
+++ b/docs/rules/react-initialize-state.md
@@ -1,4 +1,4 @@
-# Requires that React component state be initialized when it has a non-empty type (react-initialize-state)
+# Require that React component state be initialized when it has a non-empty type (react-initialize-state)
Forgetting to initialize a React component’s state can lead to hard-to-understand errors when you try to access that state during the component’s lifecycle. This rule forces you to initialize state when you have provided a non-empty Flow or TypeScript type for state to `React.Component` or `React.PureComponent`.
diff --git a/docs/rules/react-type-state.md b/docs/rules/react-type-state.md
index 8547073e..5a0220be 100644
--- a/docs/rules/react-type-state.md
+++ b/docs/rules/react-type-state.md
@@ -1,4 +1,4 @@
-# Requires that React component state be typed in TypeScript. (react-type-state)
+# Require that React component state be typed in TypeScript. (react-type-state)
TypeScript will not correctly check your state instance property against the state declared in the component’s type initialization unless an explicit type annotation is provided. This rule enforces that the type annotation is provided when it detects a meaningful state type in a TypeScript React component.
diff --git a/docs/rules/restrict-full-import.md b/docs/rules/restrict-full-import.md
index 6eb1b1f9..e277652e 100644
--- a/docs/rules/restrict-full-import.md
+++ b/docs/rules/restrict-full-import.md
@@ -1,4 +1,4 @@
-# Prevents importing the entirety of a package. (restrict-full-import)
+# Prevent importing the entirety of a package. (restrict-full-import)
Importing the entirety of a large module can be undesirable because it becomes harder to track what properties are being used.
diff --git a/docs/rules/sinon-no-restricted-features.md b/docs/rules/sinon-no-restricted-features.md
index 1b7f9121..292ade42 100644
--- a/docs/rules/sinon-no-restricted-features.md
+++ b/docs/rules/sinon-no-restricted-features.md
@@ -1,4 +1,4 @@
-# Restricts the use of specified sinon features. (sinon-no-restricted-features)
+# Restrict the use of specified sinon features. (sinon-no-restricted-features)
[`sinon`](http://sinonjs.org) offers many of features, some of which you may not want to use in your codebase.
diff --git a/docs/rules/sinon-prefer-meaningful-assertions.md b/docs/rules/sinon-prefer-meaningful-assertions.md
index 0597024c..91097495 100644
--- a/docs/rules/sinon-prefer-meaningful-assertions.md
+++ b/docs/rules/sinon-prefer-meaningful-assertions.md
@@ -1,4 +1,4 @@
-# Requires the use of meaningful sinon assertions through sinon.assert or sinon-chai. (sinon-prefer-meaningful-assertions)
+# Require the use of meaningful sinon assertions through sinon.assert or sinon-chai. (sinon-prefer-meaningful-assertions)
Sinon provides [spy-specific assertions](http://sinonjs.org/docs/#assertions) that have more useful error messages. These same, more meaningful assertions are also available for BDD-style tests using [sinon-chai](https://github.com/domenic/sinon-chai).
diff --git a/lib/config/rules/babel.js b/lib/config/rules/babel.js
index 8f952b07..5a38f26f 100644
--- a/lib/config/rules/babel.js
+++ b/lib/config/rules/babel.js
@@ -4,9 +4,9 @@
module.exports = {
// Ignores capitalized decorators (@Decorator)
'babel/new-cap': ['error', {newIsCap: true, capIsNew: false}],
- // doesn't complain about export x from "mod"; or export * as x from "mod";
+ // Doesn't complain about export x from "mod"; or export * as x from "mod";
'babel/object-curly-spacing': ['error', 'never'],
- // doesn't fail when inside class properties
+ // Doesn't fail when inside class properties
'babel/no-invalid-this': 'error',
// Rule to flag missing semicolons
'babel/semi': 'error',
diff --git a/lib/config/rules/best-practices.js b/lib/config/rules/best-practices.js
index 03c4136f..5d440450 100755
--- a/lib/config/rules/best-practices.js
+++ b/lib/config/rules/best-practices.js
@@ -27,7 +27,7 @@ module.exports = {
'guard-for-in': 'error',
// Disallow the use of alert, confirm, and prompt
'no-alert': 'error',
- // disallow lexical declarations in case clauses
+ // Disallow lexical declarations in case clauses
'no-case-declarations': 'error',
// Disallow use of arguments.caller or arguments.callee
'no-caller': 'error',
@@ -79,7 +79,7 @@ module.exports = {
'no-multi-str': 'off',
// Disallow use of new operator for Function object
'no-new-func': 'error',
- // Disallows creating new instances of String, Number, and Boolean
+ // Disallow creating new instances of String, Number, and Boolean
'no-new-wrappers': 'error',
// Disallow use of new operator when not part of the assignment or comparison
'no-new': 'error',
@@ -100,7 +100,7 @@ module.exports = {
'no-restricted-properties': 'off',
// Disallow use of assignment in return statement
'no-return-assign': 'error',
- // Disallows unnecessary return await
+ // Disallow unnecessary return await
'no-return-await': 'error',
// Disallow use of javascript: urls.,
'no-script-url': 'off',
diff --git a/lib/config/rules/flowtype.js b/lib/config/rules/flowtype.js
index 4a617b49..ade2fe7a 100644
--- a/lib/config/rules/flowtype.js
+++ b/lib/config/rules/flowtype.js
@@ -11,11 +11,11 @@ module.exports = {
'flowtype/generic-spacing': ['error', 'never'],
// Checks for duplicate properties in Object annotations
'flowtype/no-dupe-keys': 'error',
- // Disallows $FlowFixMe comment suppressions
+ // Disallow $FlowFixMe comment suppressions
'flowtype/no-flow-fix-me-comments': 'off',
- // Disallows use of primitive constructors as types, such as Boolean, Number and String.
+ // Disallow use of primitive constructors as types, such as Boolean, Number and String.
'flowtype/no-primitive-constructor-types': 'error',
- // Disallows Flow type imports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation).
+ // Disallow Flow type imports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation).
'flowtype/no-types-missing-file-annotation': 'error',
// Warns against weak type annotations any, Object and Function.
'flowtype/no-weak-types': [
@@ -28,13 +28,13 @@ module.exports = {
],
// Enforces consistent separators between properties in Flow object types.
'flowtype/object-type-delimiter': ['error', 'comma'],
- // Requires that all function parameters have type annotations.
+ // Require that all function parameters have type annotations.
'flowtype/require-parameter-type': 'off',
- // Requires that functions have return type annotation.
+ // Require that functions have return type annotation.
'flowtype/require-return-type': 'off',
// Makes sure that files have a valid @flow annotation.
'flowtype/require-valid-file-annotation': ['error', 'always'],
- // Requires that all variable declarators have type annotations.
+ // Require that all variable declarators have type annotations.
'flowtype/require-variable-type': 'off',
// Enforces consistent use of semicolons after type aliases.
'flowtype/semi': ['error', 'always'],
diff --git a/lib/config/rules/import.js b/lib/config/rules/import.js
index 4e2a34ef..73840e5b 100644
--- a/lib/config/rules/import.js
+++ b/lib/config/rules/import.js
@@ -23,6 +23,8 @@ module.exports = {
'import/no-absolute-path': 'error',
// Forbid Webpack loader syntax in imports
'import/no-webpack-loader-syntax': 'error',
+ // Ensures that there are no useless path segments
+ 'import/no-useless-path-segments': 'error',
// Helpful warnings
@@ -40,6 +42,8 @@ module.exports = {
'import/no-extraneous-dependencies': 'error',
// Forbid the use of mutable exports with var or let.
'import/no-mutable-exports': 'error',
+ // Forbid a module from importing itself
+ 'import/no-self-import': 'error',
// Module systems
@@ -61,7 +65,23 @@ module.exports = {
// Report namespace imports
'import/no-namespace': 'off',
// Ensure consistent use of file extension within the import path
- 'import/extensions': ['error', {js: 'never', json: 'always'}],
+ 'import/extensions': [
+ 'error',
+ {
+ js: 'never',
+ json: 'always',
+ svg: 'always',
+ png: 'always',
+ jpg: 'always',
+ ico: 'always',
+ graphql: 'always',
+ css: 'always',
+ sass: 'always',
+ scss: 'always',
+ less: 'always',
+ styl: 'always',
+ },
+ ],
// Enforce a convention in module import order
'import/order': [
'error',
@@ -79,4 +99,8 @@ module.exports = {
'import/no-unassigned-import': 'off',
// Forbid anonymous values as default exports
'import/no-anonymous-default-export': 'error',
+ // Prohibit default exports. Mostly an inverse of prefer-default-export.
+ 'import/no-default-export': 'off',
+ // Reports when named exports are not grouped together in a single export declaration or when multiple assignments to CommonJS module.exports or exports object are present in a single file.
+ 'import/group-exports': 'off',
};
diff --git a/lib/config/rules/jest.js b/lib/config/rules/jest.js
index 44af41fc..399bd618 100644
--- a/lib/config/rules/jest.js
+++ b/lib/config/rules/jest.js
@@ -17,4 +17,18 @@ module.exports = {
'jest/prefer-to-be-undefined': 'error',
// Ensure `expect()` is called with a single argument and there is an actual expectation made.
'jest/valid-expect': 'error',
+ // Suggest using expect.assertions() OR expect.hasAssertions()
+ 'jest/prefer-expect-assertions': 'off',
+ // Enforce having return statement when testing with promises
+ 'jest/valid-expect-in-promise': 'error',
+ // Enforce valid describe() callback
+ 'jest/valid-describe': 'error',
+ // Have control over test and it usages
+ 'jest/consistent-test-it': 'error',
+ // Use .only and .skip over f and x
+ 'jest/no-test-prefixes': 'error',
+ // Enforce lowercase test names
+ 'jest/lowercase-name': 'off',
+ // Disallow importing Jest
+ 'jest/no-jest-import': 'error',
};
diff --git a/lib/config/rules/node.js b/lib/config/rules/node.js
index a47b6d65..7a79dedc 100755
--- a/lib/config/rules/node.js
+++ b/lib/config/rules/node.js
@@ -1,13 +1,13 @@
// see http://eslint.org/docs/rules/#nodejs and https://github.com/mysticatea/eslint-plugin-node
module.exports = {
- // enforce return after a callback
+ // Enforce return after a callback
'callback-return': ['error', ['callback', 'cb', 'next']],
- // disallow require() outside of the top-level module scope
+ // Disallow require() outside of the top-level module scope
'global-require': 'off',
// Enforces error handling in callbacks
'handle-callback-err': ['error', '^.*(e|E)rr(or)?$'],
- // disallow use of the Buffer() constructor
+ // Disallow use of the Buffer() constructor
'no-buffer-constructor': 'error',
// Disallow mixing regular variable and require declarations
'no-mixed-requires': 'off',
@@ -23,10 +23,10 @@ module.exports = {
'no-restricted-modules': 'off',
// Disallow use of synchronous methods
'no-sync': 'off',
- // disallow import declarations of extraneous packages
+ // Disallow import declarations of extraneous packages
// defer to import/no-extraneous-dependencies
'node/no-extraneous-import': 'off',
- // disallow require() expressions of extraneous packages
+ // Disallow require() expressions of extraneous packages
'node/no-extraneous-require': 'error',
// Enforce either module.exports or exports.
'node/exports-style': ['error', 'module.exports'],
diff --git a/lib/config/rules/possible-errors.js b/lib/config/rules/possible-errors.js
index fb81d522..2a76766b 100755
--- a/lib/config/rules/possible-errors.js
+++ b/lib/config/rules/possible-errors.js
@@ -1,9 +1,9 @@
// see http://eslint.org/docs/rules/#possible-errors
module.exports = {
- // enforce “for” loop update clause moving the counter in the right direction.
+ // Enforce “for” loop update clause moving the counter in the right direction.
'for-direction': 'error',
- // enforce return statements in getters
+ // Enforce return statements in getters
'getter-return': ['error', {allowImplicit: true}],
// Disallow await inside of loops
'no-await-in-loop': 'off',
diff --git a/lib/config/rules/promise.js b/lib/config/rules/promise.js
index 808a6c99..50d1edef 100644
--- a/lib/config/rules/promise.js
+++ b/lib/config/rules/promise.js
@@ -22,6 +22,10 @@ module.exports = {
'promise/no-callback-in-promise': 'off',
// Avoid creating new promises outside of utility libs (use pify instead)
'promise/avoid-new': 'off',
+ // Ensures the proper number of arguments are passed to Promise functions
+ 'promise/valid-params': 'error',
+ // Avoid calling new on a Promise static method
+ 'promise/no-new-statics': 'off',
// Async/Await Rules
diff --git a/lib/config/rules/react.js b/lib/config/rules/react.js
index e3c0d624..5f264185 100644
--- a/lib/config/rules/react.js
+++ b/lib/config/rules/react.js
@@ -13,6 +13,8 @@ module.exports = {
'react/destructuring-assignment': 'off',
// Forbid certain props on Components
'react/forbid-component-props': 'off',
+ // Forbid certain props on DOM Nodes
+ 'react/forbid-dom-props': 'off',
// Forbid certain elements e.g. forbid all
and use instead
'react/forbid-elements': 'off',
// Forbid foreign propTypes; forbids using another component's prop types unless they are explicitly imported/exported
@@ -49,6 +51,8 @@ module.exports = {
'react/no-render-return-value': 'error',
// Prevent usage of setState
'react/no-set-state': 'off',
+ // Prevent this from being used in stateless functional components
+ 'react/no-this-in-sfc': 'error',
// Prevent common casing typos
'react/no-typos': 'error',
// Prevent using string references in ref attribute.
@@ -92,6 +96,8 @@ module.exports = {
// Enforce boolean attributes notation in JSX
'react/jsx-boolean-value': 'error',
+ // Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
+ 'react/jsx-child-element-spacing': 'error',
// Validate closing bracket location in JSX
'react/jsx-closing-bracket-location': ['error', {location: 'tag-aligned'}],
// Validate closing tag location in JSX
@@ -114,6 +120,8 @@ module.exports = {
'react/jsx-indent': ['error', 2],
// Validate JSX has key prop when in array or iterator
'react/jsx-key': 'error',
+ // Validate a specific depth for JSX
+ 'react/jsx-max-depth': 'off',
// Limit maximum of props on a single line in JSX
'react/jsx-max-props-per-line': 'off',
// Prevent usage of .bind() and arrow functions in JSX props
@@ -132,6 +140,8 @@ module.exports = {
'react/jsx-one-expression-per-line': 'off',
// Enforce PascalCase for user-defined JSX components
'react/jsx-pascal-case': 'error',
+ // Enforce defaultProps declarations alphabetical sorting
+ 'react/jsx-sort-default-props': 'off',
// Enforce props alphabetical sorting
'react/jsx-sort-props': 'off',
// Enforce propTypes declarations alphabetical sorting (deprecated)
diff --git a/lib/config/rules/shopify.js b/lib/config/rules/shopify.js
index 5ea3a961..68aa74c9 100644
--- a/lib/config/rules/shopify.js
+++ b/lib/config/rules/shopify.js
@@ -1,19 +1,19 @@
module.exports = {
- // Requires (or disallows) assignments of binary, boolean-producing expressions to be wrapped in parentheses.
+ // Require (or disallow) assignments of binary, boolean-producing expressions to be wrapped in parentheses.
'shopify/binary-assignment-parens': ['error', 'always'],
- // Requires (or disallows) semicolons for class properties.
+ // Require (or disallow) semicolons for class properties.
'shopify/class-property-semi': 'error',
- // Requires that all jQuery objects are assigned to references prefixed with `$`.
+ // Require that all jQuery objects are assigned to references prefixed with `$`.
'shopify/jquery-dollar-sign-reference': 'off',
- // Disallows complex expressions embedded in in JSX.
+ // Disallow complex expressions embedded in in JSX.
'shopify/jsx-no-complex-expressions': 'off',
- // Disallows hardcoded content in JSX.
+ // Disallow hardcoded content in JSX.
'shopify/jsx-no-hardcoded-content': 'off',
// disallow the use of debugger (without fixer to prevent autofix on save in editors)
'shopify/no-debugger': 'error',
- // Prevents the usage of unnecessary computed properties.
+ // Prevent the usage of unnecessary computed properties.
'shopify/no-useless-computed-properties': 'error',
- // Prevents the declaration of classes consisting only of static members.
+ // Prevent the declaration of classes consisting only of static members.
'shopify/no-fully-static-classes': 'error',
// Prefer the use of the `sectioned` props in Polaris components instead of wrapping all contents in a `Section` component.
'shopify/polaris-prefer-sectioned-prop': 'off',
@@ -27,16 +27,16 @@ module.exports = {
'shopify/prefer-module-scope-constants': 'error',
// Prefer Twine over Bindings as the name for twine imports.
'shopify/prefer-twine': 'error',
- // Requires that React component state be initialized when it has a non-empty type.
+ // Require that React component state be initialized when it has a non-empty type.
'shopify/react-initialize-state': 'off',
- // Requires that React component state be typed in TypeScript.
+ // Require that React component state be typed in TypeScript.
'shopify/react-type-state': 'off',
- // Prevents importing the entirety of a package.
+ // Prevent importing the entirety of a package.
'shopify/restrict-full-import': 'off',
- // Restricts the use of specified sinon features.
+ // Restrict the use of specified sinon features.
'shopify/sinon-no-restricted-features': 'off',
- // Requires the use of meaningful sinon assertions through sinon.assert or sinon-chai.
+ // Require the use of meaningful sinon assertions through sinon.assert or sinon-chai.
'shopify/sinon-prefer-meaningful-assertions': 'off',
- // Requires that all dynamic imports contain a `webpackChunkName` comment.
+ // Require that all dynamic imports contain a `webpackChunkName` comment.
'shopify/webpack/no-unnamed-dynamic-imports': 'off',
};
diff --git a/lib/config/rules/typescript.js b/lib/config/rules/typescript.js
index e970d42a..18ea9d2a 100644
--- a/lib/config/rules/typescript.js
+++ b/lib/config/rules/typescript.js
@@ -1,44 +1,50 @@
// See https://github.com/nzakas/eslint-plugin-typescript
module.exports = {
- // enforces one space after the colon and zero spaces before the colon of a type annotation.
+ // Enforce one space after the colon and zero spaces before the colon of a type annotation.
'typescript/type-annotation-spacing': ['error'],
- // enforces accessibility modifiers on class properties and methods. (member-access from TSLint)
+ // Require explicit return types on functions and class methods
+ 'typescript/explicit-function-return-type': 'off',
+
+ // Enforce accessibility modifiers on class properties and methods. (member-access from TSLint)
'typescript/explicit-member-accessibility': 'off',
- // enforces interface names are prefixed. (interface-name from TSLint)
+ // Enforce interface names are prefixed. (interface-name from TSLint)
'typescript/interface-name-prefix': 'off',
- // enforces naming conventions for class members by visibility.
+ // Enforce naming conventions for class members by visibility.
'typescript/member-naming': 'off',
- // enforces /// is not used. (no-reference from TSLint)
+ // Enforce /// is not used. (no-reference from TSLint)
'typescript/no-triple-slash-reference': 'error',
- // disallow generic Array constructors
+ // Disallow generic Array constructors
'typescript/no-array-constructor': 'error',
- // enforces the use of as Type assertions instead of assertions. (no-angle-bracket-type-assertion from TSLint)
+ // Enforce the use of as Type assertions instead of assertions. (no-angle-bracket-type-assertion from TSLint)
'typescript/no-angle-bracket-type-assertion': 'error',
- // enforces the any type is not used. (no-any from TSLint)
+ // Enforce the any type is not used. (no-any from TSLint)
'typescript/no-explicit-any': 'off',
- // disallows the use of custom TypeScript modules and namespaces
+ // Disallow the use of custom TypeScript modules and namespaces
'typescript/no-namespace': 'off',
- // disallows the use of variables before they are defined.
+ // Disallow non-null assertions using the ! postfix operator
+ 'typescript/no-non-null-assertion': 'error',
+
+ // Disallow the use of variables before they are defined.
'typescript/no-use-before-define': 'off',
- // enforces the use of the keyword namespace over module to declare custom TypeScript modules. (no-internal-module from TSLint)
+ // Enforce the use of the keyword namespace over module to declare custom TypeScript modules. (no-internal-module from TSLint)
'typescript/prefer-namespace-keyword': 'off',
- // disallows the use of type aliases. (interface-over-type-literal from TSLint)
+ // Disallow the use of type aliases. (interface-over-type-literal from TSLint)
// breaks `export type Message = string | ((colorizer: any) => string);`
'typescript/no-type-alias': 'off',
- // enforces a standard member declaration order. (member-ordering from TSLint)
+ // Enforce a standard member declaration order. (member-ordering from TSLint)
'typescript/member-ordering': [
'error',
{
@@ -60,19 +66,19 @@ module.exports = {
},
],
- // prevents TypeScript-specific constructs from being erroneously flagged as unused
+ // Prevent TypeScript-specific constructs from being erroneously flagged as unused
'typescript/no-unused-vars': 'off',
- // enforces member overloads to be consecutive.
+ // Enforce member overloads to be consecutive.
'typescript/adjacent-overload-signatures': 'error',
- // disallows parameter properties in class constructors. (no-parameter-properties from TSLint)
+ // Disallow parameter properties in class constructors. (no-parameter-properties from TSLint)
'typescript/no-parameter-properties': 'off',
- // enforces PascalCased class and interface names. (class-name from TSLint)
+ // Enforce PascalCased class and interface names. (class-name from TSLint)
'typescript/class-name-casing': 'error',
- // enforces a member delimiter style in interfaces and type literals.
+ // Enforce a member delimiter style in interfaces and type literals.
'typescript/member-delimiter-style': [
'error',
{
@@ -85,10 +91,10 @@ module.exports = {
},
],
- // disallows the declaration of empty interfaces. (no-empty-interface from TSLint)
+ // Disallow the declaration of empty interfaces. (no-empty-interface from TSLint)
'typescript/no-empty-interface': 'off',
- // already supported by TS
+ // Already supported by TS
'no-undef': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
@@ -97,18 +103,18 @@ module.exports = {
'no-use-before-define': 'off',
'sort-class-members/sort-class-members': 'off',
- // does not support TS equivalent
+ // Does not support TS equivalent
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'no-empty-function': 'off',
- // flags overloaded methods in TS
+ // Flag overloaded methods in TS
'no-dupe-class-members': 'off',
- // flags typedef files with multiple modules with export default
+ // Flag typedef files with multiple modules with export default
'import/export': 'off',
- // breaks typescript-eslint-parser
+ // Breaks typescript-eslint-parser
strict: 'off',
'shopify/prefer-early-return': 'off',
'array-callback-return': 'off',
diff --git a/lib/config/rules/webpack.js b/lib/config/rules/webpack.js
index 116857cb..398157d4 100644
--- a/lib/config/rules/webpack.js
+++ b/lib/config/rules/webpack.js
@@ -1,4 +1,4 @@
module.exports = {
- // Requires that all dynamic imports contain a `webpackChunkName` comment.
+ // Require that all dynamic imports contain a `webpackChunkName` comment.
'shopify/webpack/no-unnamed-dynamic-imports': 'error',
};
diff --git a/lib/rules/binary-assignment-parens.js b/lib/rules/binary-assignment-parens.js
index d9a5c19b..381f071f 100644
--- a/lib/rules/binary-assignment-parens.js
+++ b/lib/rules/binary-assignment-parens.js
@@ -8,7 +8,14 @@ const BOOLEAN_OPERATORS = ['==', '===', '!=', '!==', '>', '>=', '<', '<='];
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Enforce (or disallow) assignments of binary, boolean-producing expressions to be wrapped in parentheses.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/binary-assignment-parens.md',
+ },
schema: [
{
diff --git a/lib/rules/class-property-semi.js b/lib/rules/class-property-semi.js
index 3b846e8a..4aff3884 100644
--- a/lib/rules/class-property-semi.js
+++ b/lib/rules/class-property-semi.js
@@ -1,6 +1,12 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description: 'Require (or disallow) semicolons for class properties.',
+ category: 'Stylistic Issues',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/class-property-semi.md',
+ },
fixable: 'code',
schema: [
{
diff --git a/lib/rules/jquery-dollar-sign-reference.js b/lib/rules/jquery-dollar-sign-reference.js
index 6b9e4d74..1f8baf92 100644
--- a/lib/rules/jquery-dollar-sign-reference.js
+++ b/lib/rules/jquery-dollar-sign-reference.js
@@ -55,7 +55,14 @@ const JQUERY_IDENTIFIER_REGEX = /^\$./;
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Require that all jQuery objects are assigned to references prefixed with `$`.',
+ category: 'Possible Errors',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/jquery-dollar-sign-reference.md',
+ },
},
create(context) {
diff --git a/lib/rules/jsx-no-complex-expressions.js b/lib/rules/jsx-no-complex-expressions.js
index b4acba5c..4aa5391b 100644
--- a/lib/rules/jsx-no-complex-expressions.js
+++ b/lib/rules/jsx-no-complex-expressions.js
@@ -8,9 +8,11 @@ const CONDITIONAL_EXPRESSION_WARNING = [
module.exports = {
meta: {
docs: {
- description: 'Disallows complex expressions embedded in in JSX.',
+ description: 'Disallow complex expressions embedded in in JSX.',
category: 'Best Practices',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/jsx-no-complex-expressions.md',
},
schema: [],
},
diff --git a/lib/rules/jsx-no-hardcoded-content.js b/lib/rules/jsx-no-hardcoded-content.js
index e518623e..c536a74d 100644
--- a/lib/rules/jsx-no-hardcoded-content.js
+++ b/lib/rules/jsx-no-hardcoded-content.js
@@ -7,9 +7,11 @@ const {
module.exports = {
meta: {
docs: {
- description: 'Disallows hardcoded content in JSX.',
+ description: 'Disallow hardcoded content in JSX.',
category: 'Best Practices',
recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/jsx-no-hardcoded-content.md',
},
schema: [
{
diff --git a/lib/rules/no-debugger.js b/lib/rules/no-debugger.js
index 0ca2bed8..22eb55f2 100644
--- a/lib/rules/no-debugger.js
+++ b/lib/rules/no-debugger.js
@@ -1,7 +1,7 @@
module.exports = {
meta: {
docs: {
- description: 'disallow the use of `debugger`',
+ description: 'Disallow the use of `debugger`.',
category: 'Possible Errors',
recommended: true,
},
diff --git a/lib/rules/no-fully-static-classes.js b/lib/rules/no-fully-static-classes.js
index 5ae8ffda..b6854391 100644
--- a/lib/rules/no-fully-static-classes.js
+++ b/lib/rules/no-fully-static-classes.js
@@ -1,6 +1,13 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Prevent the declaration of classes consisting only of static members.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/no-fully-static-classes.md',
+ },
},
create(context) {
diff --git a/lib/rules/no-useless-computed-properties.js b/lib/rules/no-useless-computed-properties.js
index 9b1b1235..1bf5b7f0 100644
--- a/lib/rules/no-useless-computed-properties.js
+++ b/lib/rules/no-useless-computed-properties.js
@@ -1,6 +1,12 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description: 'Prevent the usage of unnecessary computed properties.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/no-useless-computed-properties.md',
+ },
},
create(context) {
diff --git a/lib/rules/polaris-no-bare-stack-item.js b/lib/rules/polaris-no-bare-stack-item.js
index 736e2666..2ad402f6 100644
--- a/lib/rules/polaris-no-bare-stack-item.js
+++ b/lib/rules/polaris-no-bare-stack-item.js
@@ -7,6 +7,8 @@ module.exports = {
'Disallow the use of Polaris’s `Stack.Item` without any custom props.',
category: 'Best Practices',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/polaris-no-bare-stack-item.md',
},
schema: [],
},
diff --git a/lib/rules/polaris-prefer-sectioned-prop.js b/lib/rules/polaris-prefer-sectioned-prop.js
index a0d6e076..290d3d2b 100644
--- a/lib/rules/polaris-prefer-sectioned-prop.js
+++ b/lib/rules/polaris-prefer-sectioned-prop.js
@@ -9,6 +9,8 @@ module.exports = {
'Prefer the use of the `sectioned` props in Polaris components instead of wrapping all contents in a `Section` component.',
category: 'Best Practices',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/polaris-prefer-sectioned-prop.md',
},
schema: [],
},
diff --git a/lib/rules/prefer-class-properties.js b/lib/rules/prefer-class-properties.js
index bb16ad6c..f5f64471 100644
--- a/lib/rules/prefer-class-properties.js
+++ b/lib/rules/prefer-class-properties.js
@@ -1,6 +1,13 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Prefer class properties to assignment of literals in constructors.',
+ category: 'Stylistic Issues',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/prefer-class-properties.md',
+ },
schema: [
{
enum: ['always', 'never'],
diff --git a/lib/rules/prefer-early-return.js b/lib/rules/prefer-early-return.js
index f5a353ac..88643130 100644
--- a/lib/rules/prefer-early-return.js
+++ b/lib/rules/prefer-early-return.js
@@ -2,7 +2,14 @@ const defaultMaximumStatements = 1;
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Prefer early returns over full-body conditional wrapping in function declarations.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/prefer-early-return.md',
+ },
schema: [
{
type: 'object',
diff --git a/lib/rules/prefer-module-scope-constants.js b/lib/rules/prefer-module-scope-constants.js
index a2735040..5d851e43 100644
--- a/lib/rules/prefer-module-scope-constants.js
+++ b/lib/rules/prefer-module-scope-constants.js
@@ -5,6 +5,8 @@ module.exports = {
'Prefer that screaming snake case variables always be defined using `const`, and always appear at module scope.',
category: 'Best Practices',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/prefer-module-scope-constants.md',
},
schema: [],
},
diff --git a/lib/rules/prefer-twine.js b/lib/rules/prefer-twine.js
index 46057631..c24d55fd 100644
--- a/lib/rules/prefer-twine.js
+++ b/lib/rules/prefer-twine.js
@@ -1,6 +1,12 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description: 'Prefer Twine over Bindings as the name for twine imports.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/prefer-twine.md',
+ },
},
create(context) {
diff --git a/lib/rules/react-initialize-state.js b/lib/rules/react-initialize-state.js
index 4139ea76..ce890c2f 100644
--- a/lib/rules/react-initialize-state.js
+++ b/lib/rules/react-initialize-state.js
@@ -5,9 +5,11 @@ module.exports = {
meta: {
docs: {
description:
- 'Requires that React component state be initialized when it has a non-empty type.',
+ 'Require that React component state be initialized when it has a non-empty type.',
category: 'Possible Errors',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/react-initialize-state.md',
},
schema: [],
},
diff --git a/lib/rules/react-type-state.js b/lib/rules/react-type-state.js
index 8572f20b..f0b4f7c7 100644
--- a/lib/rules/react-type-state.js
+++ b/lib/rules/react-type-state.js
@@ -4,10 +4,11 @@ const {getName} = require('../utilities');
module.exports = {
meta: {
docs: {
- description:
- 'Requires that React component state be typed in TypeScript.',
+ description: 'Require that React component state be typed in TypeScript.',
category: 'Possible Errors',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/react-type-state.md',
},
schema: [],
},
diff --git a/lib/rules/restrict-full-import.js b/lib/rules/restrict-full-import.js
index 87d1eefb..24230d5e 100644
--- a/lib/rules/restrict-full-import.js
+++ b/lib/rules/restrict-full-import.js
@@ -1,6 +1,12 @@
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description: 'Prevent importing the entirety of a package.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/restrict-full-import.md',
+ },
schema: [
{
restricted: {
diff --git a/lib/rules/sinon-no-restricted-features.js b/lib/rules/sinon-no-restricted-features.js
index 004c3d68..daf36660 100644
--- a/lib/rules/sinon-no-restricted-features.js
+++ b/lib/rules/sinon-no-restricted-features.js
@@ -17,7 +17,13 @@ function createPropertyMatcher(properties) {
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description: 'Restrict the use of specified sinon features.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/sinon-no-restricted-features.md',
+ },
schema: [
{
type: 'object',
diff --git a/lib/rules/sinon-prefer-meaningful-assertions.js b/lib/rules/sinon-prefer-meaningful-assertions.js
index 9e1f14c3..b3ad6534 100644
--- a/lib/rules/sinon-prefer-meaningful-assertions.js
+++ b/lib/rules/sinon-prefer-meaningful-assertions.js
@@ -54,7 +54,14 @@ const PREFER_SINON_ASSERT_MESSAGE =
module.exports = {
meta: {
- docs: {},
+ docs: {
+ description:
+ 'Require the use of meaningful sinon assertions through sinon.assert or sinon-chai.',
+ category: 'Best Practices',
+ recommended: false,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/sinon-prefer-meaningful-assertions.md',
+ },
},
create(context) {
diff --git a/lib/rules/webpack/no-unnamed-dynamic-imports.js b/lib/rules/webpack/no-unnamed-dynamic-imports.js
index 7cc411f3..e023fec3 100644
--- a/lib/rules/webpack/no-unnamed-dynamic-imports.js
+++ b/lib/rules/webpack/no-unnamed-dynamic-imports.js
@@ -30,9 +30,11 @@ module.exports = {
meta: {
docs: {
description:
- 'Requires that all dynamic imports contain a `webpackChunkName` comment.',
+ 'Require that all dynamic imports contain a `webpackChunkName` comment.',
category: 'Best Practices',
recommended: true,
+ uri:
+ 'https://github.com/Shopify/eslint-plugin-shopify/blob/master/docs/rules/no-unnamed-dynamic-imports.md',
},
},
diff --git a/package.json b/package.json
index 6334b591..86aa60b6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-shopify",
- "version": "19.0.1",
+ "version": "20.0.0-beta.4",
"description": "Shopify’s ESLint rules and configs.",
"keywords": [
"eslint",
@@ -15,12 +15,12 @@
},
"scripts": {
"check": "yarn run lint && yarn test",
- "rules-status": "eslint-index lib/config/all.js --format table",
- "rules-omitted": "eslint-index lib/config/all.js --status omitted",
- "lint": "eslint . --max-warnings 0",
+ "rules-status": "eslint-index lib/config/all.js --format table",
+ "rules-omitted": "eslint-index lib/config/all.js --status omitted",
+ "lint": "eslint . --max-warnings 0 --format codeframe",
"prettier": "eslint --format codeframe . --fix",
"prettier-check": "eslint --print-config ./lib/config/prettier.js | eslint-config-prettier-check",
- "test": "NODE_PATH=$NODE_PATH:./transforms:./tests mocha 'tests/**/*.js' --reporter spec --compilers js:babel-core/register",
+ "test": "NODE_PATH=$NODE_PATH:./transforms:./tests mocha 'tests/**/*.js' --reporter spec --require babel-core/register",
"test:watch": "yarn test -- --watch --reporter min",
"test:cover": "babel-node node_modules/.bin/isparta cover --report text --report html _mocha -- --reporter spec --recursive tests/"
},
@@ -59,44 +59,44 @@
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-preset-shopify": "^16.2.0",
- "eslint": "^4.15.0",
+ "eslint": "^4.18.2",
"eslint-index": "^1.4.0",
"eslint-plugin-shopify": "file:./.",
"isparta": "^4.0.0",
"istanbul": "^0.4.5",
- "mocha": "^4.1.0",
- "prettier": "^1.9.2",
+ "mocha": "^5.0.4",
+ "prettier": "^1.11.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
- "typescript": "^2.6.2"
+ "typescript": "^2.7.2"
},
"peerDependencies": {
"eslint": "<5 >=4.7.1"
},
"optionalDependencies": {
- "prettier": "<2.0 >= 1.9.2"
+ "prettier": "^1.11.1"
},
"dependencies": {
- "babel-eslint": "^8.2.1",
- "eslint-config-prettier": "^2.9.0",
- "eslint-module-utils": "^2.1.1",
- "eslint-plugin-ava": "^4.4.0",
- "eslint-plugin-babel": "^4.1.2",
- "eslint-plugin-chai-expect": "^1.1.1",
- "eslint-plugin-flowtype": "^2.41.0",
- "eslint-plugin-import": "^2.8.0",
- "eslint-plugin-jest": "^21.5.0",
- "eslint-plugin-jsx-a11y": "^6.0.3",
- "eslint-plugin-lodash": "^2.5.0",
- "eslint-plugin-mocha": "^4.11.0",
- "eslint-plugin-node": "^5.2.1",
- "eslint-plugin-prettier": "^2.4.0",
- "eslint-plugin-promise": "^3.6.0",
- "eslint-plugin-react": "^7.5.1",
- "eslint-plugin-sort-class-members": "^1.3.0",
- "eslint-plugin-typescript": "^0.8.1",
+ "babel-eslint": "^8.2.2",
+ "eslint-config-prettier": "2.9.0",
+ "eslint-module-utils": "2.1.1",
+ "eslint-plugin-ava": "4.5.1",
+ "eslint-plugin-babel": "4.1.2",
+ "eslint-plugin-chai-expect": "1.1.1",
+ "eslint-plugin-flowtype": "2.41.0",
+ "eslint-plugin-import": "2.9.0",
+ "eslint-plugin-jest": "21.14.1",
+ "eslint-plugin-jsx-a11y": "6.0.3",
+ "eslint-plugin-lodash": "2.6.1",
+ "eslint-plugin-mocha": "4.11.0",
+ "eslint-plugin-node": "6.0.1",
+ "eslint-plugin-prettier": "2.6.0",
+ "eslint-plugin-promise": "3.7.0",
+ "eslint-plugin-react": "7.7.0",
+ "eslint-plugin-sort-class-members": "1.3.0",
+ "eslint-plugin-typescript": "0.10.0",
"merge": "^1.2.0",
"pkg-dir": "^2.0.0",
- "typescript-eslint-parser": "^11.0.0"
+ "typescript-eslint-parser": "14.0.0"
}
}
diff --git a/yarn.lock b/yarn.lock
index 62d4ce5f..86ed9907 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,53 +2,70 @@
# yarn lockfile v1
-"@babel/code-frame@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4"
+"@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6"
dependencies:
- chalk "^2.0.0"
- esutils "^2.0.2"
- js-tokens "^3.0.0"
+ "@babel/highlight" "7.0.0-beta.40"
+
+"@babel/generator@7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea"
+ dependencies:
+ "@babel/types" "7.0.0-beta.40"
+ jsesc "^2.5.1"
+ lodash "^4.2.0"
+ source-map "^0.5.0"
+ trim-right "^1.0.1"
-"@babel/helper-function-name@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz#366e3bc35147721b69009f803907c4d53212e88d"
+"@babel/helper-function-name@7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz#9d033341ab16517f40d43a73f2d81fc431ccd7b6"
dependencies:
- "@babel/helper-get-function-arity" "7.0.0-beta.36"
- "@babel/template" "7.0.0-beta.36"
- "@babel/types" "7.0.0-beta.36"
+ "@babel/helper-get-function-arity" "7.0.0-beta.40"
+ "@babel/template" "7.0.0-beta.40"
+ "@babel/types" "7.0.0-beta.40"
-"@babel/helper-get-function-arity@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz#f5383bac9a96b274828b10d98900e84ee43e32b8"
+"@babel/helper-get-function-arity@7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e"
dependencies:
- "@babel/types" "7.0.0-beta.36"
+ "@babel/types" "7.0.0-beta.40"
-"@babel/template@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.36.tgz#02e903de5d68bd7899bce3c5b5447e59529abb00"
+"@babel/highlight@7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255"
dependencies:
- "@babel/code-frame" "7.0.0-beta.36"
- "@babel/types" "7.0.0-beta.36"
- babylon "7.0.0-beta.36"
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^3.0.0"
+
+"@babel/template@7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8"
+ dependencies:
+ "@babel/code-frame" "7.0.0-beta.40"
+ "@babel/types" "7.0.0-beta.40"
+ babylon "7.0.0-beta.40"
lodash "^4.2.0"
-"@babel/traverse@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.36.tgz#1dc6f8750e89b6b979de5fe44aa993b1a2192261"
+"@babel/traverse@^7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e"
dependencies:
- "@babel/code-frame" "7.0.0-beta.36"
- "@babel/helper-function-name" "7.0.0-beta.36"
- "@babel/types" "7.0.0-beta.36"
- babylon "7.0.0-beta.36"
+ "@babel/code-frame" "7.0.0-beta.40"
+ "@babel/generator" "7.0.0-beta.40"
+ "@babel/helper-function-name" "7.0.0-beta.40"
+ "@babel/types" "7.0.0-beta.40"
+ babylon "7.0.0-beta.40"
debug "^3.0.1"
globals "^11.1.0"
invariant "^2.2.0"
lodash "^4.2.0"
-"@babel/types@7.0.0-beta.36":
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.36.tgz#64f2004353de42adb72f9ebb4665fc35b5499d23"
+"@babel/types@7.0.0-beta.40", "@babel/types@^7.0.0-beta.40":
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14"
dependencies:
esutils "^2.0.2"
lodash "^4.2.0"
@@ -315,14 +332,14 @@ babel-core@^6.1.4, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"
-babel-eslint@^8.2.1:
- version "8.2.1"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.1.tgz#136888f3c109edc65376c23ebf494f36a3e03951"
+babel-eslint@^8.2.2:
+ version "8.2.2"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b"
dependencies:
- "@babel/code-frame" "7.0.0-beta.36"
- "@babel/traverse" "7.0.0-beta.36"
- "@babel/types" "7.0.0-beta.36"
- babylon "7.0.0-beta.36"
+ "@babel/code-frame" "^7.0.0-beta.40"
+ "@babel/traverse" "^7.0.0-beta.40"
+ "@babel/types" "^7.0.0-beta.40"
+ babylon "^7.0.0-beta.40"
eslint-scope "~3.7.1"
eslint-visitor-keys "^1.0.0"
@@ -921,9 +938,9 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
lodash "^4.17.4"
to-fast-properties "^1.0.3"
-babylon@7.0.0-beta.36:
- version "7.0.0-beta.36"
- resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.36.tgz#3a3683ba6a9a1e02b0aa507c8e63435e39305b9e"
+babylon@7.0.0-beta.40, babylon@^7.0.0-beta.40:
+ version "7.0.0-beta.40"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a"
babylon@^6.18.0:
version "6.18.0"
@@ -970,9 +987,9 @@ braces@^1.8.2:
preserve "^0.2.0"
repeat-element "^1.1.2"
-browser-stdout@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
browserslist@^2.1.2:
version "2.5.1"
@@ -1264,9 +1281,9 @@ detect-indent@^4.0.0:
dependencies:
repeating "^2.0.0"
-diff@3.3.1:
- version "3.3.1"
- resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+diff@3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
doctrine@1.5.0:
version "1.5.0"
@@ -1288,6 +1305,12 @@ doctrine@^2.0.2:
dependencies:
esutils "^2.0.2"
+doctrine@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
+ dependencies:
+ esutils "^2.0.2"
+
dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
@@ -1374,7 +1397,7 @@ escodegen@^1.6.1:
optionalDependencies:
source-map "~0.5.6"
-eslint-config-prettier@^2.9.0:
+eslint-config-prettier@2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3"
dependencies:
@@ -1397,16 +1420,16 @@ eslint-index@^1.4.0:
lodash "^4.17.4"
yargs "^8.0.2"
-eslint-module-utils@^2.1.1:
+eslint-module-utils@2.1.1, eslint-module-utils@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449"
dependencies:
debug "^2.6.8"
pkg-dir "^1.0.0"
-eslint-plugin-ava@^4.4.0:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.4.0.tgz#c1866e1f62e70daf2b7b5f60cfbc53bfe267a717"
+eslint-plugin-ava@4.5.1:
+ version "4.5.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.5.1.tgz#a51b89a306dfd5b2f91185e283837aeade6f9e5c"
dependencies:
arrify "^1.0.1"
deep-strict-equal "^0.2.0"
@@ -1417,23 +1440,23 @@ eslint-plugin-ava@^4.4.0:
multimatch "^2.1.0"
pkg-up "^2.0.0"
-eslint-plugin-babel@^4.1.2:
+eslint-plugin-babel@4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.1.2.tgz#79202a0e35757dd92780919b2336f1fa2fe53c1e"
-eslint-plugin-chai-expect@^1.1.1:
+eslint-plugin-chai-expect@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-1.1.1.tgz#cd640b8b38cf6c3abcc378673b7b173b99ddc70a"
-eslint-plugin-flowtype@^2.41.0:
+eslint-plugin-flowtype@2.41.0:
version "2.41.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.41.0.tgz#fd5221c60ba917c059d7ef69686a99cca09fd871"
dependencies:
lodash "^4.15.0"
-eslint-plugin-import@^2.8.0:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894"
+eslint-plugin-import@2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz#26002efbfca5989b7288ac047508bd24f217b169"
dependencies:
builtin-modules "^1.1.1"
contains-path "^0.1.0"
@@ -1442,15 +1465,15 @@ eslint-plugin-import@^2.8.0:
eslint-import-resolver-node "^0.3.1"
eslint-module-utils "^2.1.1"
has "^1.0.1"
- lodash.cond "^4.3.0"
+ lodash "^4.17.4"
minimatch "^3.0.3"
read-pkg-up "^2.0.0"
-eslint-plugin-jest@^21.5.0:
- version "21.5.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.5.0.tgz#c7a3bd2ee9d1c832b4e31dec89f6ad93e08d4853"
+eslint-plugin-jest@21.14.0:
+ version "21.14.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.14.0.tgz#ae1c2f9f8cc4ba389c824a5ba9414036b6d5ea5a"
-eslint-plugin-jsx-a11y@^6.0.3:
+eslint-plugin-jsx-a11y@6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.3.tgz#54583d1ae442483162e040e13cc31865465100e5"
dependencies:
@@ -1462,81 +1485,81 @@ eslint-plugin-jsx-a11y@^6.0.3:
emoji-regex "^6.1.0"
jsx-ast-utils "^2.0.0"
-eslint-plugin-lodash@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.5.0.tgz#be23eb0c0b7b15c1fc3a46bf702b4be757446b45"
+eslint-plugin-lodash@2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.6.1.tgz#a56f41d318fecf1ec69aae9851df0d37242ab168"
dependencies:
lodash "~4.17.0"
-eslint-plugin-mocha@^4.11.0:
+eslint-plugin-mocha@4.11.0:
version "4.11.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.11.0.tgz#91193a2f55e20a5e35974054a0089d30198ee578"
dependencies:
ramda "^0.24.1"
-eslint-plugin-node@^5.2.1:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz#80df3253c4d7901045ec87fa660a284e32bdca29"
+eslint-plugin-node@6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz#bf19642298064379315d7a4b2a75937376fa05e4"
dependencies:
ignore "^3.3.6"
minimatch "^3.0.4"
resolve "^1.3.3"
- semver "5.3.0"
+ semver "^5.4.1"
-eslint-plugin-prettier@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae"
+eslint-plugin-prettier@2.6.0:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7"
dependencies:
fast-diff "^1.1.1"
jest-docblock "^21.0.0"
-eslint-plugin-promise@^3.6.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75"
+eslint-plugin-promise@3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz#f4bde5c2c77cdd69557a8f69a24d1ad3cfc9e67e"
-eslint-plugin-react@^7.5.1:
- version "7.5.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b"
+eslint-plugin-react@7.7.0:
+ version "7.7.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160"
dependencies:
- doctrine "^2.0.0"
+ doctrine "^2.0.2"
has "^1.0.1"
- jsx-ast-utils "^2.0.0"
+ jsx-ast-utils "^2.0.1"
prop-types "^15.6.0"
"eslint-plugin-shopify@file:./.":
- version "18.3.1"
- dependencies:
- babel-eslint "^8.2.1"
- eslint-config-prettier "^2.9.0"
- eslint-module-utils "^2.1.1"
- eslint-plugin-ava "^4.4.0"
- eslint-plugin-babel "^4.1.2"
- eslint-plugin-chai-expect "^1.1.1"
- eslint-plugin-flowtype "^2.41.0"
- eslint-plugin-import "^2.8.0"
- eslint-plugin-jest "^21.5.0"
- eslint-plugin-jsx-a11y "^6.0.3"
- eslint-plugin-lodash "^2.5.0"
- eslint-plugin-mocha "^4.11.0"
- eslint-plugin-node "^5.2.1"
- eslint-plugin-prettier "^2.4.0"
- eslint-plugin-promise "^3.6.0"
- eslint-plugin-react "^7.5.1"
- eslint-plugin-sort-class-members "^1.3.0"
- eslint-plugin-typescript "^0.8.1"
+ version "19.0.1"
+ dependencies:
+ babel-eslint "^8.2.2"
+ eslint-config-prettier "2.9.0"
+ eslint-module-utils "2.1.1"
+ eslint-plugin-ava "4.5.1"
+ eslint-plugin-babel "4.1.2"
+ eslint-plugin-chai-expect "1.1.1"
+ eslint-plugin-flowtype "2.41.0"
+ eslint-plugin-import "2.9.0"
+ eslint-plugin-jest "21.14.0"
+ eslint-plugin-jsx-a11y "6.0.3"
+ eslint-plugin-lodash "2.6.1"
+ eslint-plugin-mocha "4.11.0"
+ eslint-plugin-node "6.0.1"
+ eslint-plugin-prettier "2.6.0"
+ eslint-plugin-promise "3.7.0"
+ eslint-plugin-react "7.7.0"
+ eslint-plugin-sort-class-members "1.3.0"
+ eslint-plugin-typescript "0.10.0"
merge "^1.2.0"
pkg-dir "^2.0.0"
- typescript-eslint-parser "^11.0.0"
+ typescript-eslint-parser "14.0.0"
optionalDependencies:
- prettier "<2.0 >= 1.9.2"
+ prettier "^1.11.1"
-eslint-plugin-sort-class-members@^1.3.0:
+eslint-plugin-sort-class-members@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.3.0.tgz#8a3db9afb84351f06fe3d1622abcafa1e5781694"
-eslint-plugin-typescript@^0.8.1:
- version "0.8.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-typescript/-/eslint-plugin-typescript-0.8.1.tgz#e5b2d18e744a04528eac58b099fe1032c4d744ff"
+eslint-plugin-typescript@0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-typescript/-/eslint-plugin-typescript-0.10.0.tgz#009a8fcaf0ec7bf68f6fb71576df0d84ebd0b114"
dependencies:
requireindex "~1.1.0"
@@ -1551,9 +1574,9 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
-eslint@^4.15.0:
- version "4.15.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.15.0.tgz#89ab38c12713eec3d13afac14e4a89e75ef08145"
+eslint@^4.18.2:
+ version "4.18.2"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
@@ -1561,7 +1584,7 @@ eslint@^4.15.0:
concat-stream "^1.6.0"
cross-spawn "^5.1.0"
debug "^3.1.0"
- doctrine "^2.0.2"
+ doctrine "^2.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.2"
@@ -1590,7 +1613,7 @@ eslint@^4.15.0:
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
- table "^4.0.1"
+ table "4.0.2"
text-table "~0.2.0"
eslint@^4.2.0:
@@ -2346,6 +2369,10 @@ jsesc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+jsesc@^2.5.1:
+ version "2.5.1"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe"
+
jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
@@ -2389,7 +2416,7 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
-jsx-ast-utils@^2.0.0:
+jsx-ast-utils@^2.0.0, jsx-ast-utils@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f"
dependencies:
@@ -2440,10 +2467,6 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"
-lodash.cond@^4.3.0:
- version "4.5.2"
- resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
-
lodash.unescape@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
@@ -2545,14 +2568,14 @@ mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"
-mocha@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
+mocha@^5.0.4:
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.0.4.tgz#6b7aa328472da1088e69d47e75925fd3a3bb63c6"
dependencies:
- browser-stdout "1.3.0"
+ browser-stdout "1.3.1"
commander "2.11.0"
debug "3.1.0"
- diff "3.3.1"
+ diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
growl "1.10.3"
@@ -2850,9 +2873,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-"prettier@<2.0 >= 1.9.2":
- version "1.9.2"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
+prettier@^1.11.1:
+ version "1.11.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
private@^0.1.6, private@^0.1.7:
version "0.1.8"
@@ -3161,13 +3184,13 @@ safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
-"semver@2 || 3 || 4 || 5", semver@5.4.1, semver@^5.3.0:
+"semver@2 || 3 || 4 || 5", semver@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
-semver@5.3.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+semver@5.5.0, semver@^5.4.1:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
set-blocking@^2.0.0, set-blocking@~2.0.0:
version "2.0.0"
@@ -3354,7 +3377,7 @@ supports-color@^4.0.0:
dependencies:
has-flag "^2.0.0"
-table@^4.0.1:
+table@4.0.2, table@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
dependencies:
@@ -3442,16 +3465,16 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-typescript-eslint-parser@^11.0.0:
- version "11.0.0"
- resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-11.0.0.tgz#37dba6a0130dd307504aa4b4b21b0d3dc7d4e9f2"
+typescript-eslint-parser@14.0.0:
+ version "14.0.0"
+ resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-14.0.0.tgz#c90a8f541c1d96e5c55e2807c61d154e788520f9"
dependencies:
lodash.unescape "4.0.1"
- semver "5.4.1"
+ semver "5.5.0"
-typescript@^2.6.2:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
+typescript@^2.7.2:
+ version "2.7.2"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
ua-parser-js@^0.7.9:
version "0.7.17"