@ -4,6 +4,7 @@ module.exports = {
extends : [
'eslint:recommended' ,
'plugin:react/recommended' ,
'plugin:react-hooks/recommended' ,
'plugin:jsx-a11y/recommended' ,
'plugin:import/recommended' ,
'plugin:promise/recommended' ,
@ -102,6 +103,7 @@ module.exports = {
{
vars : 'all' ,
args : 'after-used' ,
destructuredArrayIgnorePattern : '^_' ,
ignoreRestSiblings : true ,
} ,
] ,
@ -208,6 +210,9 @@ module.exports = {
] ,
} ,
] ,
'import/no-amd' : 'error' ,
'import/no-commonjs' : 'error' ,
'import/no-import-module-exports' : 'error' ,
'import/no-webpack-loader-syntax' : 'error' ,
'promise/always-return' : 'off' ,
@ -255,6 +260,7 @@ module.exports = {
'*.config.js' ,
'.*rc.js' ,
'ide-helper.js' ,
'config/webpack/**/*' ,
] ,
env : {
@ -264,6 +270,10 @@ module.exports = {
parserOptions : {
sourceType : 'script' ,
} ,
rules : {
'import/no-commonjs' : 'off' ,
} ,
} ,
{
files : [
@ -275,6 +285,7 @@ module.exports = {
'eslint:recommended' ,
'plugin:@typescript-eslint/recommended' ,
'plugin:react/recommended' ,
'plugin:react-hooks/recommended' ,
'plugin:jsx-a11y/recommended' ,
'plugin:import/recommended' ,
'plugin:import/typescript' ,
@ -286,6 +297,12 @@ module.exports = {
'@typescript-eslint/no-explicit-any' : 'off' ,
'jsdoc/require-jsdoc' : 'off' ,
// Those rules set stricter rules for TS files
// to enforce better practices when converting from JS
'import/no-default-export' : 'warn' ,
'react/prefer-stateless-function' : 'warn' ,
'react/function-component-definition' : [ 'error' , { namedComponents : 'arrow-function' } ] ,
} ,
} ,
{
@ -298,5 +315,13 @@ module.exports = {
jest : true ,
} ,
} ,
{
files : [
'streaming/**/*' ,
] ,
rules : {
'import/no-commonjs' : 'off' ,
} ,
} ,
] ,
} ;