Files
formipay/node_modules/resolve/eslint.config.mjs
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

81 lines
1.5 KiB
JavaScript

import ljharb from '@ljharb/eslint-config/flat';
export default [
...ljharb,
{
ignores: [
'test/resolver/malformed_package_json/package.json',
'test/list-exports/**',
],
},
{
rules: {
'array-bracket-newline': 'off',
complexity: 'off',
'consistent-return': 'off',
curly: 'off',
'dot-notation': ['error', { allowKeywords: true }],
'func-name-matching': 'off',
'func-style': 'off',
'global-require': 'warn',
'id-length': ['error', { min: 1, max: 40 }],
'max-depth': 'off',
'max-lines-per-function': 'off',
'max-lines': 'off',
'max-nested-callbacks': 'off',
'max-params': 'off',
'max-statements-per-line': ['error', { max: 2 }],
'max-statements': 'off',
'multiline-comment-style': 'off',
'no-magic-numbers': 'off',
'no-shadow': 'off',
'no-use-before-define': 'off',
'sort-keys': 'off',
strict: 'off',
},
},
{
files: ['**/*.js'],
rules: {
indent: ['error', 4],
},
},
{
files: ['bin/**'],
rules: {
'no-process-exit': 'off',
},
},
{
files: ['example/**'],
rules: {
'no-console': 'off',
},
},
{
files: ['test/resolver/nested_symlinks/mylib/*.js'],
rules: {
'no-throw-literal': 'off',
},
},
{
files: ['test/**'],
languageOptions: {
ecmaVersion: 5,
parserOptions: {
allowReserved: false,
},
},
rules: {
'dot-notation': ['error', { allowPattern: 'throws' }],
'max-lines': 'off',
'max-lines-per-function': 'off',
'no-unused-vars': ['error', {
vars: 'all',
args: 'none',
caughtErrors: 'none',
}],
},
},
];