Comments (10)
I purposely did not include any of our rules in the list because I wanted to keep the core issue focused on core.
There's defs a few of our rules that can come over too!
from eslint-stylistic.
If they want they could publish it as a separate package within this project - up to them. But as a 3rd party plugin I don't know if it really needs to be split out.
We as the typescript-eslint maintainers have long wanted to remove these formatting rules from our project as we have not maintained them for many years. If this project is happy to get behind the ownership of stylistic then it's probably a great home for them!
from eslint-stylistic.
Do you have a rule in mind that is:
- Stylistic
- Type-aware
- Works also for JS
So that we could discuss more specifically.
For type-annotation-spacing
, such "TS-only" + "AST-only" rules look ok to have in this repo, as:
- The name indicates it's type-specific, which doesn't exist in JS. The scope is clear
- It listens to TS AST Nodes, so the rule will only functionally on a TS file and bypass in JS: https://github.com/typescript-eslint/typescript-eslint/blob/066ccf75d126df22a1792d3de3d1e3dd28904db1/packages/eslint-plugin/src/rules/type-annotation-spacing.ts#L274-L281
from eslint-stylistic.
I'm not sure how much it makes sense to have type-aware rules in this more general plugin/org. Has that been decided already?
from eslint-stylistic.
We probably won't be migrating over any type-aware rules. Rules like this are purely-syntactic checkers.
The thinking is that this rule should support both JS and TS syntaxes. So it'll be the one-stop-shop for stylistic rules rather than us forking them in typescript-eslint to support TS.
from eslint-stylistic.
I think that when a rule can be extended to support TS syntax, that makes perfect sense - but if there's a rule that's only useful for a TS user, then that seems better left to a TS-specific plugin.
from eslint-stylistic.
For type-annotation-spacing
itself, it's already been included, as I see you put a warning for it on the docs (as type: layout
). I am happy to have it maintained here.
For type-aware rules, I think it would be indeed out-of-scope of ESLint Stylistic.
from eslint-stylistic.
(i should clarify; a type-aware rule that works for regular JS seems fine to me; it's a rule that only applies to TS that i'm questioning)
from eslint-stylistic.
#25 is TS-only, for example.
from eslint-stylistic.
Closing as type-annotation-spacing
is included. For more discussions about what rules to include, please refer to #26
from eslint-stylistic.
Related Issues (20)
- `comma-dangle`: should not insert comma in arrow function return expressions
- `jsx/jsx-props-no-multi-spaces`: no rule enforcement between last prop and self-closing tag
- `jsx-quotes`: should be in jsx package, not js HOT 3
- `plugins` key issue in Flat Config when combining ESLint + TS ESLint + Stylistic HOT 1
- `function-call-argument-newline`: does not work HOT 2
- `padded-blocks`: Add "start" & "end" options HOT 3
- `no-extra-parens`: nested ternaries and `ternaryOperandBinaryExpressions`
- `padding-line-between-statements`: reassignment STATEMENT_TYPE
- @stylistic/jsx-indent conflicts with @stylistic/indent
- `ts/lines-between-class-members`: does not apply to interface members
- `arrow-spacing`: Doesn't work for interfaces HOT 1
- `@stylistic/space-infix-ops`: error in TypeScript generic
- `@stylistic/migrate/migrate-js`: Definition for rule '@stylistic/js/no-multi-spaces' was not found.
- newline-per-chained-call prop ignoreChainWithDepth not working as expected
- `paren-newline`: consistent parenthesis new lines
- `indent`: Support JSXText indent HOT 3
- doc error 404 page for new rule HOT 4
- Link to Contribution on Github HOT 1
- Unmet peer dependency HOT 1
- Port `multiline-comment-style` `line-comment-position` from ESLint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-stylistic.