-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into 146-checkout-depth-warning
- Loading branch information
Showing
95 changed files
with
3,719 additions
and
3,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,164 +1,8 @@ | ||
const error = 2; | ||
const warn = 1; | ||
const ignore = 0; | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'airbnb', | ||
'plugin:jest/recommended', | ||
'plugin:import/react-native', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/react', | ||
'prettier/@typescript-eslint', | ||
], | ||
plugins: [ | ||
'@typescript-eslint', | ||
'prettier', | ||
'jest', | ||
'import', | ||
'react', | ||
'jsx-a11y', | ||
'json', | ||
'simple-import-sort', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 8, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { es6: true, node: true, 'jest/globals': true }, | ||
settings: { | ||
'import/core-modules': ['enzyme'], | ||
'import/ignore': ['node_modules\\/(?!@storybook)'], | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts', '.tsx', '.mjs', '.d.ts'], | ||
paths: ['node_modules/', 'node_modules/@types/'], | ||
}, | ||
}, | ||
}, | ||
extends: ['@storybook/eslint-config-storybook'], | ||
rules: { | ||
'simple-import-sort/sort': 'error', | ||
'sort-imports': 'off', | ||
'import/order': 'off', | ||
'no-useless-constructor': ignore, | ||
'@typescript-eslint/no-useless-constructor': error, | ||
'no-restricted-imports': [ | ||
error, | ||
{ | ||
paths: [ | ||
{ | ||
name: 'lodash.isequal', | ||
message: | ||
'Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead', | ||
}, | ||
{ | ||
name: 'lodash.mergewith', | ||
message: | ||
'Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead', | ||
}, | ||
{ | ||
name: 'lodash.pick', | ||
message: | ||
'Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead', | ||
}, | ||
], | ||
// catch-all for any lodash modularised. The CVE is listed against the entire family for lodash < 4.17.11 | ||
patterns: ['lodash.*'], | ||
}, | ||
], | ||
'prettier/prettier': [warn], | ||
'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore, | ||
'class-methods-use-this': ignore, | ||
'import/extensions': [ | ||
error, | ||
'always', | ||
{ | ||
js: 'never', | ||
ts: 'never', | ||
tsx: 'never', | ||
mjs: 'never', | ||
}, | ||
], | ||
'import/no-extraneous-dependencies': [ | ||
error, | ||
{ | ||
devDependencies: [ | ||
'examples/**', | ||
'examples-native/**', | ||
'**/example/**', | ||
'*.js', | ||
'**/*.test.js', | ||
'**/*.stories.*', | ||
'**/scripts/*.js', | ||
'**/stories/**/*.js', | ||
'**/__tests__/**/*.js', | ||
'**/.storybook/**/*.*', | ||
], | ||
peerDependencies: true, | ||
}, | ||
], | ||
'import/prefer-default-export': ignore, | ||
'import/default': error, | ||
'import/named': error, | ||
'import/namespace': error, | ||
'react/jsx-filename-extension': [ | ||
warn, | ||
{ | ||
extensions: ['.js', '.jsx', '.tsx'], | ||
}, | ||
], | ||
'react/jsx-no-bind': [ | ||
error, | ||
{ | ||
ignoreDOMComponents: true, | ||
ignoreRefs: true, | ||
allowArrowFunctions: true, | ||
allowFunctions: true, | ||
allowBind: true, | ||
}, | ||
], | ||
'jsx-a11y/accessible-emoji': ignore, | ||
'jsx-a11y/label-has-associated-control': [ | ||
warn, | ||
{ | ||
labelComponents: ['CustomInputLabel'], | ||
labelAttributes: ['label'], | ||
controlComponents: ['CustomInput'], | ||
depth: 3, | ||
}, | ||
], | ||
'react/no-unescaped-entities': ignore, | ||
'jsx-a11y/label-has-for': [error, { required: { some: ['nesting', 'id'] } }], | ||
'jsx-a11y/anchor-is-valid': [ | ||
error, | ||
{ | ||
components: ['A', 'LinkTo', 'Link'], | ||
specialLink: ['overrideParams', 'kind', 'story', 'to'], | ||
}, | ||
], | ||
'no-underscore-dangle': [ | ||
error, | ||
{ | ||
allow: [ | ||
'__STORYBOOK_CLIENT_API__', | ||
'__STORYBOOK_ADDONS_CHANNEL__', | ||
'__STORYBOOK_STORY_STORE__', | ||
], | ||
}, | ||
], | ||
'@typescript-eslint/no-var-requires': ignore, | ||
'@typescript-eslint/camelcase': ignore, | ||
'@typescript-eslint/no-unused-vars': ignore, | ||
'@typescript-eslint/explicit-member-accessibility': ignore, | ||
'@typescript-eslint/explicit-function-return-type': ignore, | ||
'@typescript-eslint/no-explicit-any': ignore, // would prefer to enable this | ||
'@typescript-eslint/no-use-before-define': ignore, // this is duplicated | ||
'@typescript-eslint/interface-name-prefix': ignore, // I don't agree | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* eslint-disable max-classes-per-file */ | ||
import retry from 'async-retry'; | ||
import fetch from 'node-fetch'; | ||
|
||
|
Oops, something went wrong.