Releases: xojs/xo
Releases · xojs/xo
Release list
v4.0.0
Improvements
- Lint
node:testfiles with the neweslint-node-testplugin - Recognize any tool's
*-ignore/*:ignorecomment (likesvelte-ignore), not just a hardcoded list, forcapitalized-comments
New rules
unicorn/consistent-conditional-object-spreadunicorn/consistent-tuple-labelsunicorn/default-export-styleunicorn/no-accidental-bitwise-operatorunicorn/no-array-concat-in-loopunicorn/no-array-front-mutationunicorn/no-array-sort-for-min-maxunicorn/no-async-promise-finallyunicorn/no-boolean-sort-comparatorunicorn/no-chained-comparisonunicorn/no-collection-bracket-accessunicorn/no-constant-zero-expressionunicorn/no-double-comparisonunicorn/no-duplicate-if-branchesunicorn/no-duplicate-logical-operandsunicorn/no-impossible-length-comparisonunicorn/no-invalid-character-comparisonunicorn/no-invalid-well-known-symbol-methodsunicorn/no-late-event-controlunicorn/no-loop-iterable-mutationunicorn/no-misrefactored-assignmentunicorn/no-nonstandard-builtin-propertiesunicorn/no-selector-as-dom-nameunicorn/no-unnecessary-boolean-comparisonunicorn/no-unnecessary-fetch-optionsunicorn/no-unsafe-promise-all-settled-valuesunicorn/no-useless-compound-assignmentunicorn/no-useless-delete-checkunicorn/no-useless-logical-operandunicorn/no-xor-as-exponentiationunicorn/prefer-abort-signal-anyunicorn/prefer-abort-signal-timeoutunicorn/prefer-aggregate-errorunicorn/prefer-array-flat-mapunicorn/prefer-array-from-asyncunicorn/prefer-array-from-rangeunicorn/prefer-array-iterable-methodsunicorn/prefer-block-statement-over-iifeunicorn/prefer-boolean-returnunicorn/prefer-continueunicorn/prefer-dom-node-replace-childrenunicorn/prefer-error-is-errorunicorn/prefer-flat-math-min-maxunicorn/prefer-group-byunicorn/prefer-hoisting-branch-codeunicorn/prefer-iterator-helpersunicorn/prefer-math-constantsunicorn/prefer-observer-apisunicorn/prefer-promise-tryunicorn/prefer-promise-with-resolversunicorn/prefer-regexp-escapeunicorn/prefer-set-methodsunicorn/prefer-simplified-conditionsunicorn/prefer-single-replaceunicorn/prefer-toggle-attributeunicorn/prefer-unary-minusunicorn/prefer-url-can-parseunicorn/prefer-url-search-parametersunicorn/prefer-while-loop-condition
v3.0.2
v3.0.1
v3.0.0
Breaking
- Requires Node.js 22
- Removed built-in React support.
- Add
eslint-config-xo-reactto your config instead. Learn more - 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-override- [
unicorn/no-useless-recursion...
v2.0.2
- Fix
reactandprettier: 'compat'configs failing whenfilesis not specified bde9854
v2.0.1
v2.0.0
Breaking
- Requires Node.js 20.19
- Requires ESLint 10
- Removed CommonJS config file support (use
.js/.mjs/.ts/.mtsinstead) - Temporarily removed
eslint-plugin-promiserules (pending ESLint 10 compatibility)
Improvements
- Default to content-based cache strategy for faster re-linting
- Show warning when explicitly specified files are ignored
- Accept ESLint-native
filesformat in config - Simplified TypeScript handling by using in-memory programs
- Fix linting of files starting with a dot
- Fix
cwdfor case-sensitive filesystems
New rules
@typescript-eslint/no-unsafe-type-assertion@typescript-eslint/related-getter-setter-pairsunicorn/prefer-class-fieldsunicorn/no-array-reverseunicorn/require-module-specifiersunicorn/no-useless-error-capture-stack-traceunicorn/prefer-bigint-literalsunicorn/prefer-classlist-toggleunicorn/require-module-attributesunicorn/no-array-sortunicorn/no-immediate-mutationunicorn/no-useless-collection-argumentunicorn/prefer-response-static-jsonunicorn/isolated-functionsava/no-conditional-assertionava/no-duplicate-hooksava/require-assertionava/no-invalid-modifier-chainava/no-negated-assertionava/no-ava-in-dependenciesava/failing-test-urlava/no-useless-t-passava/no-nested-assertionsava/prefer-t-throwsava/no-commented-tests