Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into a11y-chart-type
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Apr 6, 2021
2 parents 36cacf7 + 88d71ff commit d091a14
Show file tree
Hide file tree
Showing 216 changed files with 1,183 additions and 402 deletions.
60 changes: 42 additions & 18 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,19 @@ module.exports = {
'react-hooks',
'jsx-a11y',
'prettier',
'elastic-charts',
],
rules: {
/**
/*
* deprecated to be deleted
*/
// https://github.com/typescript-eslint/typescript-eslint/issues/2077
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/camelcase': 0, // https://github.com/typescript-eslint/typescript-eslint/issues/2077

/**
/*
*****************************************
* Rules with high processing demand
*****************************************
*/
'import/no-restricted-paths':
process.env.NODE_ENV === 'production'
? [
'error',
{
zones: [
{ target: './src', from: './src/index.ts' },
{ target: './src', from: './', except: ['./src', './node_modules/'] },
],
},
]
: 0,
'import/namespace': process.env.NODE_ENV === 'production' ? 2 : 0,

/**
Expand Down Expand Up @@ -102,7 +90,7 @@ module.exports = {
'@typescript-eslint/member-ordering': 1,
eqeqeq: 1,

/**
/*
* Standard rules
*/
'no-restricted-syntax': 0, // this is a good rule, for-of is good
Expand Down Expand Up @@ -308,6 +296,7 @@ module.exports = {
' * under the License.',
' ',
],
2,
],
},
env: {
Expand Down Expand Up @@ -340,6 +329,38 @@ module.exports = {
{
files: ['src/**/*.{ts?(x),js}'],
rules: {
/*
* Custom elastic-charts rules
*/
'elastic-charts/no-different-release-tag': 2,
'elastic-charts/require-release-tag': 2,
'elastic-charts/require-tsdocs': 2,
'elastic-charts/require-documentation': 1,

/*
*****************************************
* Rules with high processing demand
*****************************************
*/
'import/no-restricted-paths':
process.env.NODE_ENV === 'production'
? [
'error',
{
zones: [
{ target: './src', from: './src/index.ts' },
{ target: './src', from: './', except: ['./src', './node_modules/'] },
],
},
]
: 0,

'import/no-internal-modules': [
'error',
{
allow: ['**/src/**'],
},
],
'no-underscore-dangle': 2,
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': [
Expand Down Expand Up @@ -408,8 +429,11 @@ module.exports = {
},
},
{
files: ['*.test.ts?(x)'],
files: ['*.test.ts?(x)', '**/__mocks__/**/*.ts?(x)'],
rules: {
'elastic-charts/require-release-tag': 0,
'elastic-charts/require-tsdocs': 0,
'elastic-charts/require-documentation': 0,
'unicorn/error-message': 0,
},
},
Expand Down
1 change: 1 addition & 0 deletions .storybook-docs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

// @ts-ignore
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks';
import { withInfo } from '@storybook/addon-info';
Expand Down
Loading

0 comments on commit d091a14

Please sign in to comment.