Breaking
- Requires Node.js 22
- Removed built-in React support.
- Add
eslint-config-xo-reactto your config instead. - It was removed to keep XO's core lean and framework-agnostic. Bundling
eslint-plugin-reactfor everyone held XO back by its slow ESLint-major support, and there's now a competing plugin,@eslint-react, so picking one for all users no longer makes sense.
- Add
- The bundled rules now live in a single
eslint-config-xopackage. The separateeslint-config-xo-typescriptpackage is merged into it.- If you prefer using ESLint directly, you can get all the rules there now.
- Replaced the
xoToEslintConfigexport with thexo/eslint-adapterimport for editor/ESLint integration. For example,xoToEslintConfig([{space: true, prettier: true}])becomeseslintConfigXo({space: true, prettier: true})fromeslint-config-xo, or simplyexport {default} from 'xo/eslint-adapter';.
Improvements
- Lint CSS, Markdown, HTML, JSDoc comments, and regular expressions out of the box
- Add
--max-warningsflag to treat warnings as errors (#724) - Add ESLint bulk suppression support (#826)
- Hide warnings when there are errors, so you can focus on what matters (#507)
- Respect the global gitignore (#803)
- Allow overriding default ignores with negation patterns (#65)
- Throw when no files match explicitly provided patterns
New rules
no-shadow@typescript-eslint/strict-boolean-expressions@typescript-eslint/no-unnecessary-type-conversionxo/import-specifier-newlineunicorn/better-dom-traversingunicorn/class-reference-in-static-methodsunicorn/consistent-class-member-orderunicorn/consistent-compound-wordsunicorn/consistent-export-decorator-positionunicorn/consistent-json-file-readunicorn/consistent-optional-chainingunicorn/explicit-timer-delayunicorn/logical-assignment-operatorsunicorn/max-nested-callsunicorn/no-array-fill-with-reference-typeunicorn/no-array-from-fillunicorn/no-array-spliceunicorn/no-blob-to-fileunicorn/no-break-in-nested-loopunicorn/no-canvas-to-imageunicorn/no-computed-property-existence-checkunicorn/no-confusing-array-spliceunicorn/no-confusing-array-withunicorn/no-declarations-before-early-exitunicorn/no-duplicate-loopsunicorn/no-duplicate-set-valuesunicorn/no-error-property-assignmentunicorn/no-exports-in-scriptsunicorn/no-global-object-property-assignmentunicorn/no-incorrect-query-selectorunicorn/no-incorrect-template-string-interpolationunicorn/no-late-current-target-accessunicorn/no-mismatched-map-keyunicorn/no-negated-array-predicateunicorn/no-negated-comparisonunicorn/no-non-function-verb-prefixunicorn/no-object-methods-with-collectionsunicorn/no-optional-chaining-on-undeclared-variableunicorn/no-redundant-comparisonunicorn/no-return-array-pushunicorn/no-subtraction-comparisonunicorn/no-top-level-side-effectsunicorn/no-uncalled-methodunicorn/no-undeclared-class-membersunicorn/no-unnecessary-global-thisunicorn/no-unnecessary-nested-ternaryunicorn/no-unnecessary-spliceunicorn/no-unreadable-object-destructuringunicorn/no-unsafe-buffer-conversionunicorn/no-unsafe-property-keyunicorn/no-unsafe-string-replacementunicorn/no-unused-array-method-returnunicorn/no-useless-boolean-castunicorn/no-useless-coercionunicorn/no-useless-concatunicorn/no-useless-continueunicorn/no-useless-elseunicorn/no-useless-overrideunicorn/no-useless-recursionunicorn/no-useless-template-literalsunicorn/operator-assignmentunicorn/prefer-add-event-listener-optionsunicorn/prefer-array-from-mapunicorn/prefer-array-last-methodsunicorn/prefer-array-sliceunicorn/prefer-direct-iterationunicorn/prefer-early-returnunicorn/prefer-else-ifunicorn/prefer-get-or-insert-computedunicorn/prefer-global-number-constantsunicorn/prefer-has-checkunicorn/prefer-httpsunicorn/prefer-identifier-import-export-specifiersunicorn/prefer-includes-over-repeated-comparisonsunicorn/prefer-iterable-in-constructorunicorn/prefer-iterator-to-arrayunicorn/prefer-iterator-to-array-at-endunicorn/prefer-location-assignunicorn/prefer-map-from-entriesunicorn/prefer-math-absunicorn/prefer-minimal-ternaryunicorn/prefer-number-coercionunicorn/prefer-number-is-safe-integerunicorn/prefer-object-define-propertiesunicorn/prefer-object-destructuring-defaultsunicorn/prefer-object-iterable-methodsunicorn/prefer-path2dunicorn/prefer-private-class-fieldsunicorn/prefer-queue-microtaskunicorn/prefer-scoped-selectorunicorn/prefer-simple-sort-comparatorunicorn/prefer-single-array-predicateunicorn/prefer-single-object-destructuringunicorn/prefer-smaller-scopeunicorn/prefer-split-limitunicorn/prefer-string-match-allunicorn/prefer-string-pad-start-endunicorn/prefer-string-repeatunicorn/prefer-type-literal-lastunicorn/prefer-uint8array-base64unicorn/prefer-unicode-code-point-escapesunicorn/prefer-url-hrefunicorn/require-array-sort-compareunicorn/require-css-escapeunicorn/require-passive-eventsunicorn/require-proxy-trap-boolean-return