ESLint Configurations for the DevExtreme Source Code
npm install eslint-config-devextremeThis 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 install eslint-config-airbnb-base or eslint-config-airbnb-typescript.
1. TypeScript
2. JavaScript
3. Spell Check
4. Jest Tests
5. QUnit Tests
6. TestCafe Tests
7. React
8. Angular
9. Vue
- Usage
Add the following line to your eslint.config.mjs file:
``javascript`
import { typescript } from 'eslint-config-devextreme';
export default [
...typescript,
]
- Required packages
- @typescript-eslint
- @stylistic/eslint-plugin
- eslint-plugin-import
- Extended plugins and configurations
- plugin:@typescript-eslint/recommended
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { javascript } from 'eslint-config-devextreme';
export default [
...javascript,
]
- Required packages
- eslint-plugin-import
Spell Check
Lists words that the spell check should ignore.
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { spellCheck } from 'eslint-config-devextreme';
export default [
...spellCheck,
]
- Required packages
- spellcheck
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { jest } from 'eslint-config-devextreme';
export default [
...jest.map(config => ({
...config,
settings: {
jest: {
version: 'your jest version'
}
}
})),
]
jestPlugin.configs['flat/recommended']
- Required packages
- jest
- jest-formatting
- Extended plugins
- [](https://github.com/jest-community/eslint-plugin-jest#recommended)jestFormatting.configs['flat/recommended']
-
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { qunit } from 'eslint-config-devextreme';
export default [
...qunit,
]
- Required packages
- qunit
- Extended plugins
- eslintPluginQunitRecommended.plugins.qunit
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { testcafe } from 'eslint-config-devextreme';
export default [
...testcafe,
]
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import { react } from 'eslint-config-devextreme';
export default [
...react,
settings: {
react: {
version: 'detect',
},
},
]
- Required packages
- eslint-plugin-react
- eslint-plugin-react-perf
- @typescript-eslint
- @stylistic/eslint-plugin
- Usage
Add the following line to your eslint.config.mjs file:
`javascript`
import angular from 'eslint-config-devextreme';
export default [
...angular,
]
- Required packages
- eslint-plugin-no-only-tests
- Usage
Add the following line to your eslint.config.mjs file:
`javascript``
import vue from 'eslint-config-devextreme';
export default [
...vue,
]
- Required packages
- eslint-plugin-vue