Skip to content

Commit bfa30b4

Browse files
committed
Update eslint config to use es5 modules
1 parent 31de655 commit bfa30b4

3 files changed

Lines changed: 343 additions & 190 deletions

File tree

packages/devextreme/eslint.config.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import simpleImportSort from 'eslint-plugin-simple-import-sort';
1414
import { changeRulesToStylistic } from 'eslint-migration-utils';
1515
import unicorn from 'eslint-plugin-unicorn';
1616
import customRules from './eslint_plugins/index.js';
17+
import spellCheckConfig from 'eslint-config-devextreme/spell-check';
18+
import typescriptConfig from 'eslint-config-devextreme/typescript';
19+
import qunitConfig from 'eslint-config-devextreme/qunit';
1720

1821
const __filename = fileURLToPath(import.meta.url);
1922
const __dirname = path.dirname(__filename);
@@ -43,7 +46,7 @@ export default [
4346
'js/common/core/localization/default_messages.js',
4447
],
4548
},
46-
...compat.extends('devextreme/spell-check'),
49+
...spellCheckConfig,
4750
{
4851
plugins: {
4952
'no-only-tests': noOnlyTests,
@@ -174,7 +177,7 @@ export default [
174177
'import': importPlugin,
175178
}
176179
},
177-
...compat.extends('devextreme/typescript').map(config => {
180+
...typescriptConfig.map(config => {
178181
const newConfig = {
179182
...config,
180183
files: ['**/*.ts?(x)'],
@@ -221,7 +224,7 @@ export default [
221224
'devextreme-custom/no-direct-preact-signals-core-import': 'error',
222225
},
223226
},
224-
...compat.extends('devextreme/typescript').map(config => {
227+
...typescriptConfig.map(config => {
225228
const newConfig = {
226229
...config,
227230
files: ['**/*.d.ts'],
@@ -261,7 +264,7 @@ export default [
261264
}
262265
},
263266
// Rules for QUnit tests
264-
...compat.extends('devextreme/qunit').map(config => ({
267+
...qunitConfig.map(config => ({
265268
...config,
266269
files: ['testing/tests/**/*.js', 'testing/helpers/**/*.js'],
267270
})),

0 commit comments

Comments
 (0)