0
0
Fork 0

Dont use CommonJS (require, module.exports) anywhere (#24913)

This commit is contained in:
Renaud Chaput 2023-05-09 03:08:47 +02:00 committed by GitHub
parent 89269e4b71
commit 955179fc55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 79 additions and 41 deletions

View file

@ -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',
},
},
],
};