Comments (1)
This may be a little counter-intuitive but it is working as intended.
The rule looks for "selectors" in a pre-defined order and it uses the specificity of the selector to determine what matches first.
For a public readonly field that is not static, the most specific selector for it is public-instance-readonly-field
and the least specific is readonly-field
.
In your example you have the least specific selector readonly-field
and a more specific selector public-instance-field
. So the member matches the latter selector before it matches the former. Meaning that both members match the same selector. Meaning the rule then uses your order
config (alphabetical).
Given that you have granularly defined very specific selectors of *-instance-field
et al - you also need to granularly define selectors for *-readonly-field
so that the rule correctly matches. For example if you define public-instance-readonly-field
instead of readonly-field
then the rule works as intended playground
from typescript-eslint.
Related Issues (20)
- Bug: Unconsistence behavior between cli and api call with vue-plugin HOT 1
- Bug: [strict-boolean-expressions] unsupported branded booleans HOT 1
- Bug: Return type of `tseslint.config()` is not compatible with eslint `Linter.FlatConfig[]`
- Docs: Add note of also trying major versions out on downstream ESLint plugins
- Rule proposal: functions should not be `async` unless they `await` HOT 15
- Enhancement: Add v8 projectService name to withoutProjectParserOptions HOT 1
- Enhancement: Remove getTokenAtPosition from type-utils
- Rule proposal: check that function is not returning promise and non-promise HOT 4
- Docs: Add generated documentation on packages exports to the site HOT 3
- Bug: TypeOrValueSpecifier should allow intersection types (no-floating-promises allowForKnownSafePromises)
- Bug: [prefer-optional-chain] conflict with [strict-boolean-expressions] HOT 3
- Document rationale for allowNumber: false in restrict-template-expressions HOT 3
- Bug: Vue + TypeScript project slowdown with v8 alpha HOT 2
- projectService / EXPERIMENTAL_useProjectService gives TS error if not boolean on v8 alpha / v7 HOT 1
- Docs: add an FAQ section about eslint TIMING/`--stats` and type-aware rules being misleading HOT 1
- Bug: `disabled-type-checked` config does not disable project service
- Enhancement: `no-misused-promises` should not flag functions whose contents are wrapped in `try`/`catch` HOT 2
- Base rule extension: nonblock-statement-body-position HOT 1
- Enhancement(typescript-estree): expose ProjectService logs through plugin HOT 1
- Website: Playground is currently broken HOT 2
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 typescript-eslint.