Dont use CommonJS (require
, module.exports
) anywhere (#24913)
This commit is contained in:
parent
89269e4b71
commit
955179fc55
17 changed files with 79 additions and 41 deletions
17
.eslintrc.js
17
.eslintrc.js
|
@ -102,6 +102,7 @@ module.exports = {
|
|||
{
|
||||
vars: 'all',
|
||||
args: 'after-used',
|
||||
destructuredArrayIgnorePattern: '^_',
|
||||
ignoreRestSiblings: true,
|
||||
},
|
||||
],
|
||||
|
@ -208,6 +209,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 +259,7 @@ module.exports = {
|
|||
'*.config.js',
|
||||
'.*rc.js',
|
||||
'ide-helper.js',
|
||||
'config/webpack/**/*',
|
||||
],
|
||||
|
||||
env: {
|
||||
|
@ -264,6 +269,10 @@ module.exports = {
|
|||
parserOptions: {
|
||||
sourceType: 'script',
|
||||
},
|
||||
|
||||
rules: {
|
||||
'import/no-commonjs': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
|
@ -298,5 +307,13 @@ module.exports = {
|
|||
jest: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
'streaming/**/*',
|
||||
],
|
||||
rules: {
|
||||
'import/no-commonjs': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue