This repository collects ESLint configurations that enforce the code style used by the DevExtreme development team. These configurations are based on the Airbnb JavaScript Style Guide and cover most frequently encountered cases.
Note: Adding new configurations is possible but discouraged. Double-check that none of the existing configurations fits for your case before you add a new configuration.
Legacy Airbnb presets are vendored inside this package (
airbnb-config-legacy), so you no longer need to installeslint-config-airbnb-baseoreslint-config-airbnb-typescript.
Each configuration has its own entry point, such as eslint-config-devextreme/typescript. Import only the configurations you use: an entry point loads only the plugins of its configuration.
- TypeScript
- JavaScript
- Spell Check
- Jest Tests
- QUnit Tests
- TestCafe Tests
- React
- Angular
- Vue
- jQuery
- Stylelint
-
Usage Add the following lines to your eslint.config.mjs file:
import typescript from 'eslint-config-devextreme/typescript'; export default [ ...typescript, ];
The configuration applies to .ts and .tsx files and includes rules that need type information. It reads tsconfig.json from the folder where you run ESLint.
-
Required packages
-
Extended plugins and configurations
-
Usage Add the following lines to your eslint.config.mjs file:
import javascript from 'eslint-config-devextreme/javascript'; export default [ ...javascript, ];
-
Required packages
Lists words that the spell check should ignore.
-
Usage Add the following lines to your eslint.config.mjs file:
import spellCheck from 'eslint-config-devextreme/spell-check'; export default [ ...spellCheck, ];
-
Required packages
-
Usage Add the following lines to your eslint.config.mjs file:
import jest from 'eslint-config-devextreme/jest'; export default [ ...jest, { settings: { jest: { version: 29, // your Jest version }, }, }, ];
-
Required packages
-
Extended plugins
-
Usage Add the following lines to your eslint.config.mjs file:
import qunit from 'eslint-config-devextreme/qunit'; export default [ ...qunit, ];
-
Required packages
-
Extended plugins
-
Usage Add the following lines to your eslint.config.mjs file:
import testcafe from 'eslint-config-devextreme/testcafe'; export default [ ...testcafe, ];
-
Required packages
-
Usage Add the following lines to your eslint.config.mjs file:
import react from 'eslint-config-devextreme/react'; export default [ ...react, { settings: { react: { version: '18.2', // your React version }, }, }, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { parserOptions: { project: './tsconfig.json', tsconfigRootDir: import.meta.dirname, }, }, }, ];
The rules for .ts and .tsx files need type information, so point
projectto your tsconfig.json. ESLint skips .jsx files that no configuration lists: if your project has them, add{ files: ['**/*.jsx'] }to the array. -
Required packages
-
Usage Add the following lines to your eslint.config.mjs file:
import angular from 'eslint-config-devextreme/angular'; export default [ ...angular, ];
The configuration includes the TypeScript configuration for .ts and .tsx files.
-
Required packages
-
Usage Add the following lines to your eslint.config.mjs file:
import vue from 'eslint-config-devextreme/vue'; export default [ ...vue, ];
-
Required packages
-
Usage Add the following lines to your eslint.config.mjs file:
import jquery from 'eslint-config-devextreme/jquery'; export default [ ...jquery, ];
The configuration includes the JavaScript configuration.
-
Required packages
A Stylelint configuration for CSS files.
-
Usage Add the following lines to your stylelint.config.mjs file:
import stylelintConfig from 'eslint-config-devextreme/stylelintrc'; export default stylelintConfig;
-
Required packages