Package detail

@stylistic/eslint-plugin

eslint-stylistic6.7mMIT4.4.1

Stylistic rules for ESLint, works for both JavaScript and TypeScript.

readme

ESLint Stylistic

Documentation | Discord | Why | Migration | Project Progress

npm version npm downloads Codecov

Community-maintained stylistic/formatting ESLint rules for JavaScript and TypeScript.

This project was initiated as ESLint and typescript-eslint teams decided to deprecate formatting/stylistic-related rules from their core due to the maintenance cost. This repo ports those rules and distributes them as separate packages and will keep them maintained by the community.

License

MIT License

© OpenJS Foundation and other contributors, <www.openjsf.org>
© 2023-PRESENT ESLint Stylistic contributors

changelog

Changelog

5.0.0-beta.3 (2025-06-06)

Chores

6.0.0-beta.1 (2025-06-05)

⚠ BREAKING CHANGES

  • object-property-newline: remove deprecated option (#809)

Features

  • object-property-newline: remove deprecated option (#809) (30614af)
  • operator-linebreak: support TS Nodes (#805) (d7ab8d2)

Bug Fixes

  • jsx-sort-props: correct option schema (#801) (f80f38a)

Documentation

5.0.0-beta.1 (2025-06-04)

⚠ BREAKING CHANGES

  • v5: remove sub packages (#794)

Features

Chores

4.4.1 (2025-06-02)

Bug Fixes

  • keyword-spacing: check spaces around the type keyword in export declarations (#797) (6854a3c)

Chores

  • indent-binary-ops: use unified testing tool (#806) (3a8fc53)
  • type-generic-spacing: unify spacing checks (#800) (6f8b01c)

4.4.0 (2025-05-24)

Features

  • deprecate sub packages and emit warnings (#793) (48503aa)

4.3.0 (2025-05-24)

Features

  • configs: add new severity option for all rules (#733) (#736) (c553a9c)
  • jsx-sort-props: support custom reservedFirst and reservedLast (#744) (fb17e96)

Bug Fixes

  • eslint-plugin: only export interfaces in index (#763) (93a4eb1)
  • handle new AST change on TSImportType (8f31461)
  • indent: handle ChainExpression and AwaitExpression when offsetTernaryExpressionsOffsetCallExpressions (#751) (a1af663)
  • indent: wrong PropertyDefinition value offset when ts type have multiple line (#774) (140e18f)
  • no-extra-parens: do not break specific ReturnStatement (#738) (a375a92)

Documentation

Chores

4.2.0 (2025-03-03)

Features

  • config: update yield-star-spacing and generator-star-spacing config to align with Prettier (86d17c8)

Documentation

4.1.0 (2025-02-26)

Features

  • add module.exports named export for require(esm) compatibility (#700) (668c955)

Documentation

Chores

4.0.1 (2025-02-19)

Bug Fixes

  • indent-binary-ops: handle { for left token check (#693) (7f2740e)

Chores

4.0.0 (2025-02-18)

Features

  • semi-spacing: support handling typescript (#687) (8b76c93)
  • space-infix-ops: allow to ignore types in ts variant (#684) (c83ce20)

Chores

4.0.0-beta.1 (2025-02-10)

⚠ BREAKING CHANGES

  • migrate to ESM-only, requires ESLint v9+ (#670)

Features

  • migrate to ESM-only, requires ESLint v9+ (#670) (3145d50)

Chores

3.1.0 (2025-02-08)

Features

  • generic-spacing: remove spaces in type param instantiation (#677) (2a29e28)

3.0.1 (2025-01-29)

Bug Fixes

3.0.0 (2025-01-25)

⚠ BREAKING CHANGES

  • indent-binary-ops: remove unnecessary logic (#645)
  • cross test function-call-spacing (#565)
  • comma-style: turn off all exceptions option by default (#602)

Features

  • comma-style: turn off all exceptions option by default (#602) (c424d63)
  • cross test function-call-spacing (#565) (80ec2e4)
  • quotes: Option to allow template literals only to avoid escape (#643) (5558bdb)
  • type-generic-spacing: remove whitespaces in generic types (#667) (8dd68e2)

Bug Fixes

  • jsx-wrap-multilines: prevent crash when using tabs (#653) (8cbc9f8)
  • plus: dependencies bundle (ba9ed81)

Documentation

Chores

2.13.0 (2025-01-13)

Features

  • key-spacing: add ignoredNodes option (#640) (33ae1f6)
  • no-extra-parens: introduce nestedConditionalExpressions option (#657) (bf63800)
  • padded-blocks: add start and end options (#655) (cf49939)

Bug Fixes

  • indent-binary-ops: correctly handle TypeAliasDeclaration (#647) (ca2aabc)
  • indent-binary-ops: indent on multiline assignment (#644) (d708587)

Documentation

Chores

  • replace deprecated isSpaceBetweenTokens with isSpaceBetween (#646) (6da7c42)

2.12.1 (2024-12-11)

Features

  • indent: introduce offsetTernaryExpressionsOffsetCallExpressions options (#636) (c14a3ee)

Documentation

  • correct eslint flat config in migration guide (#634) (16a0ae0)

Chores

2.12.0 (2024-12-08)

Bug Fixes

  • comma-style: handles comma after default import and trailing comma (#600) (2d8d8ce)
  • function-call-spacing: remove invalid defaults from schema (#617) (0714754)
  • indent: consider CallExpression when offsetTernaryExpressions is true (#625) (55d3529)
  • jsx-wrap-multilines: text between replacement texts included in parentheses (#618) (0764252)

Documentation

Chores

2.11.0 (2024-11-19)

Features

  • comma-dangle: add support for Import Attributes (#586) (4c177c3)
  • comma-style: add support for more syntax (#597) (922151c)
  • function-call-argument-newline: add support for Import Attributes (#603) (8ee0c24)
  • function-call-spacing: add optionalChain to control the space around the optional chain (#605) (f732798)
  • function-paren-newline: add support for Import Attributes (#585) (4ede153)

Bug Fixes

Build Related

  • deps: bump codecov/codecov-action from 4 to 5 (#612) (047a384)

2.10.1 (2024-11-01)

Features

  • indent-binary-ops: disabled to lower indent when starts closing bracket (#591) (25fe554)

Bug Fixes

  • key-spacing: crash for import without attributes when using align: "colon" (#594) (6000f43)

Chores

2.10.0 (2024-10-30)

Features

  • cross test comma-spacing (#562) (ea72317)
  • function-call-spacing: auto-fix optional chain when option is never (#589) (7a2b47f)
  • function-call-spacing: support ImportExpression in ts version (#570) (19d1f8c)
  • indent-binary-ops: logical expression indent (#576) (cbf800d)
  • indent: add support for Import Attributes (#579) (4f944d8)
  • key-spacing: add support for Import Attributes (#583) (789d893)
  • max-statements-per-line: new option to allow specific statements (#558) (2ed4054)
  • no-multi-spaces: add support for Import Attributes (#584) (0da0713)
  • padding-line-between-statements: add support for multiline-export and singleline-export (#582) (2690a30)
  • quote-props: add support for Import Attributes (#581) (4edfee2)

Bug Fixes

  • correct the type of quotes in customize (#590) (b86c2df)
  • function-call-spacing: don't remove comments while auto-fixing (#588) (53b4a55)
  • jsx-closing-bracket-location: should not remove comment in jsx (#566) (e2ba8d5)

Documentation

  • func-call-spacing: fixing broken links (#587) (d3dbc22)

Chores

2.9.0 (2024-10-05)

Features

  • add indent option tabLength to customize config (#538) (91a18e7)
  • curly-newline: add new rule (#548) (049c20e)
  • Improve indent in template literals (#553) (9130c94)
  • jsx/jsx-closing-tag-location: add location option to customize indentation (#550) (ae09edd)

Bug Fixes

  • quotes: only when allowTemplateLiterals set, allow template literals to avoid escape sequences (#544) (7e3a0d3)

Documentation

Chores

2.8.0 (2024-09-09)

Features

  • indent: indention inside TemplateLiteral always start at level one (#528) (d2f92c0)
  • remove @types/eslint (5ea3d6a)

Bug Fixes

  • indent-binary-ops: improve nested handling, close #530 (af1c21a)
  • move spacing rules about as and satisfies from type-annontation-spacing to keyword-spacing (#535) (b89ae5e)

Documentation

2.7.2 (2024-08-30)

Bug Fixes

  • types: add missing type reference, close #526 (47fddb0)

2.7.1 (2024-08-29)

Chores

2.7.0 (2024-08-29)

Chores

2.7.0-beta.1 (2024-08-29)

Build Related

  • improve bundling (bb187a8)
  • standalone build for main package (971b534)

Chores

2.7.0-beta.0 (2024-08-29)

Chores

2.6.5 (2024-08-28)

Bug Fixes

  • type-annotation-spacing: consider spacing around as and satisfies operator (#517) (cf254a9)

Documentation

  • use new vscode codeActionsOnSave syntax (#511) (086b7f3)

2.6.4 (2024-08-15)

Bug Fixes

  • configs: should not ignore templateLiteral for indent (3154799)

Chores

2.6.3 (2024-08-15)

Bug Fixes

  • add explicit "type": "commonjs" (9d37124)
  • arrow-parens: wrong parens removal with optional parameter (#499) (71896ce)
  • lines-between-class-members: properly infer exceptAfterOverload from enforce (#239) (3dfa159)
  • ts/padding-line-between-statements: removing blank line between functions in interface (#71) (#468) (91eb636)

Chores

2.6.2 (2024-08-08)

Bug Fixes

  • indent: indentation for argument with decorators (#487) (aefb3be)
  • quotes: ignore backtick in ts import types (#493) (a7f7c2a)

Chores

  • consistent createRule argument order (83e22f2)
  • indent: simplify the code related to PropertyDefinition with decorators (#489) (53d731f)

2.6.1 (2024-08-01)

Bug Fixes

2.6.0 (2024-07-31)

⚠ BREAKING CHANGES

  • requires Node ^18.18.0 || ^20.9.0 || >=21.1.0, bump deps (#337)
  • remove unused @stylistic/eslint-config package
  • update migration rules list
  • rework migrate package to support custom from from and to

Features

  • add quotes, semi and comma-dangle rules (55ebf44)
  • add auto fix indicator on rule list (#180) (b37a8a6)
  • add doc comment for rule options (#44) (ecfb109)
  • basic ts rules migration script (8cc6daf)
  • bump [@typescript-eslint](https://github.com/typescript-eslint) to v8 (#452) (27d6b00)
  • configs: add new options to customize config to assist with migrating from Prettier (#224) (d6b4167)
  • configs: enable extra rules in the configs factory (#205) (58f224f)
  • define-config-support files (#20) (f9d0829)
  • dts for jsx (a24f856)
  • eslint-plugin-jsx: add jsx-self-closing-comp (#22) (93c5b52)
  • eslint-plugin: bundle types (e4b2677)
  • expose rule options (6b4063b)
  • expose sub entries for each rule (74748cb)
  • further reduce deps size (c0f887b)
  • improve type completeness (43ff0bc)
  • indent-binary-ops: new rule (#202) (971662b)
  • indent: support for JSXText indentation (#413) (a5b62a0)
  • introduce @stylistic/eslint-plugin-plus (#203) (02b7384)
  • introduce @stylistic/eslint-plugin (#11) (d91f29f)
  • introduce all-flat and all-extend config option (#168) (ff2d865)
  • introduce builtin config (#149) (2c9e61a)
  • introduce migrate rule (a2dea27)
  • js/array-element-newline: options multiline and consistent combination (#445) (cfd3327)
  • js/no-multi-spaces: new includeTabs option (#195) (be417a9)
  • js: add option ignoreStringLiterals (#401) (1b6d563), closes #400
  • js: port multiline-comment-style and line-comment-position (#389) (e3212fe)
  • jsx-function-call-newline: add jsx-function-call-newline rule (#376) (110aa4c)
  • jsx-one-expression-per-line: allow non-jsx (#393) (431d564)
  • jsx-one-expression-per-line: allow single line (#377) (f8825f2)
  • jsx-wrap-multilines: supports adding parentheses and line breaks for object properties (#372) (c72d043)
  • jsx/pascal-case: new rule port from eslint-plugin-react (#271) (7a5b9ef)
  • migrate eslint rules (4673a27)
  • migrate jsx rules (#17) (ecca1b7)
  • migrate more rules (ca8429d)
  • migrate more rules, improve consistency (753ee3e)
  • migrate to @types/eslint v9.6.0 (#479) (ea72aae)
  • migrate ts rules (ca938b3)
  • migrate: add more targets (3eabad8)
  • multiline-ternary: add ignoreJSX option (#280) (c6b14ea)
  • new ts/quote-props rule (#275) (a56b798)
  • partial migrate to ts (#66) (a88038e)
  • provide disable-legacy config preset (#69) (d795225)
  • publish @eslint-stylistic/metadata (20b91be)
  • rename func-call-spacing to function-call-spacing, provide back alias (#63) (95b6001)
  • replace graphemer with Intl.Segmenter (#220) (e09f2aa)
  • requires Node ^18.18.0 || ^20.9.0 || &gt;=21.1.0, bump deps (#337) (300ce2c)
  • rework migrate package to support custom from from and to (f3a9013)
  • spaced-comment: ignore typescript triple-slash directive (#294) (9d1b285)
  • support eslint-define-config rules (#14) (9d5ef1f)
  • ts/lines-around-comment: add missing afterHashbangComment in schema, fix #75 (#161) (391335b)
  • ts: add object-curly-newline and object-property-newline (#444) (036d3de)
  • ts: slim dependencies (af4098a)
  • type-generic-spacing: new rule (#200) (1a8719f)
  • type-named-tuple-spacing: new rule (#201) (8a66aaa)
  • update migration rules list (e3de97f)
  • update types generation script (0e368ba)

Bug Fixes

  • add @types/eslint as dependencies explicitly, fix #276 (94097c9)
  • comma-dangle: only add comma when it's in brackets, fix #158 (#160) (b346087)
  • configs: improve fixture testing, update all config to improve compatibility (#204) (5fb1826)
  • configs: member-delimiter-style should use semi delimiters when semi is true, fix #266 (#267) (7701a2a)
  • docs link (#21) (b06bf8f)
  • eslint-plugin: dts path typo, close #181 (67a716b)
  • eslint-plugin: rename config recommended-legacy to recommended-extends (#166) (303d65b)
  • eslint-plugin: type declaration path (3b17090)
  • exports meta (c1d4d7a)
  • Graphemer CJS interop, close #216 (9ca6cb0)
  • indent-binary-ops: do not increase indent on typeof and instanceof, fix #222 (#246) (8f34543)
  • indent-binary-ops: should not increase indent with this, close #268 (5d2c1d7)
  • indent: correct class property initialization (#431) (09ea5b0)
  • indent: correct indentation for PropertyDefinition with decorators (#416) (4b4d27c)
  • indent: correct indentation in chained methods calls with generics (#424) (4ba8b08)
  • indent: correctly identify opening brace on enum declaration (#261) (3c79437)
  • indent: handle mixed spaces and tabs (#465) (d5ae88d)
  • indent: handle undefined node.decorators when tsParser is not configured (#422) (3d63054)
  • js/function-paren-newline: prevent newline error in type parameter (#207) (c37f3fe)
  • js: rules import, close #9 (59110cf)
  • jsx-indent: conflict between indent and jsx-indent (#368) (7313184)
  • jsx-indent: deprecate jsx-indent rule in favor of indent (#447) (57dd2e8)
  • jsx-one-expression-per-line: only one line break has not been processed (#384) (a297f84)
  • jsx: remove deprecated jsx-space-before-closing, close #18 (c6961ed)
  • keep the plugin reference, close #281 (68b2c8b)
  • keyword-spacing: fix regression, close #156 (4523ce0)
  • make plugin assignable to ESLint.Plugin (#418) (9887ead)
  • padding-line-between-statements: recognize ExportAllDeclaration nodes (#257) (52f0506)
  • plus/indent-binary-ops: considring || and && (#430) (9627a10)
  • quotes: allow template literals to avoid escape sequences (#410) (1891c5f)
  • remove ts/comma-dangle rule (f14d8cc)
  • remove duplicate rule in all configs (#199) (01eee11)
  • remove unused @stylistic/eslint-config package (4590100)
  • revert espree version bump, fix #278 (470bcb2)
  • single schema dts generation (#29) (66bcc4a)
  • ts/comma-dangle: allow tailing comma in generic in TSX (#167) (6fb4a9a)
  • ts/indent: indentation of multiline type parameter instantiations (#256) (0ef56c7)
  • ts/no-extra-parens: cover more unnecessary parens case (#217) (1a7fdaa)
  • ts/padding-line-between-statements: add new function-overload statement type, close #190 (#213) (3229635)
  • ts/padding-line-between-statements: support cjs-import and cjs-export statement type (#162) (58aace6)
  • ts/quotes: allow backtick literals, but forbid backtick import assertions (#191) (59ff2a2)
  • ts: add migrate missing no-extra-parens and no-extra-semi, close #34 (62846d2)
  • ts: chunk bundling (a278468)
  • type error on UnprefixedRuleOptions (#284) (f7bc3a9)
  • type-generic-spacing: consider parentheses (#467) (fd08dd8)
  • types dist (1567174)
  • types strictness, enable typecheck in ci, close #64 (#65) (2e44cab)
  • update metadata (d5e9507)
  • update metadata, close #31 (a04b0f0)

Documentation

Build Related

  • introduce metadata (d468154)
  • try using a single package for release-please (b3bf006)

Chores

Performance

  • no longer rely on jsx-ast-utils, reduce install size (#49) (7c698b6)

2.6.0-beta.1 (2024-07-27)

Features

  • migrate to @types/eslint v9.6.0 (#479) (ea72aae)
  • ts/padding-line-between-statements: support for enum (#453) (7126f21)

Bug Fixes

  • indent: handle mixed spaces and tabs (#465) (d5ae88d)
  • type-generic-spacing: consider parentheses (#467) (fd08dd8)

Documentation

Chores