Comments (11)
this? #2107
mmm, this might be different .
But it wil be eager later. Because scope is passes directly, right?
from eslint-plugin-ember.
mmm, this might be different .
yeah, that PR adds rules to a config, which I don't think we should do.
I imagine the TS config should end up looking like this:
{
// this is the exact same as what's in the README
files: ['**/*.gts'],
parser: 'ember-eslint-parser',
plugins: ['ember'],
extends: [
'eslint:recommended',
// hopefully this either adds the rules to the config (so that 2107 isn't needed)
// or we give up on legacy configs and only recommend flat config
'plugin:@typescript-eslint/recommended',
'plugin:ember/recommended',
// this would detect if @typescript-eslint is present,
// and make sure no-use-before-define is turned off
'plugin:ember/recommended-gts',
],
},
from eslint-plugin-ember.
I think the error is correct though.
it will be compiled to something like
Foo = precompileTemplate(`...`, {
scope: [Bar]
})
from eslint-plugin-ember.
I think it was pretty clear that they will not change plugin:@typescript-eslint/recommended
behaviour. (Lets discuss this part in #2107)
from eslint-plugin-ember.
it wilz be compiled to something like
nay, it's
scope: () => ({ Bar })
from eslint-plugin-ember.
it wilz be compiled to something like
nay, it's
scope: () => ({ Bar })
hmm, i took another look, you are right:)
But it looks like the rule isn't looking that exactly anyway:
eslint playground
from eslint-plugin-ember.
ah! so the eslint rule is wrong!
from eslint-plugin-ember.
I looks like that's actually the behaviour it intended to do:
This rule will warn when it encounters a reference to an identifier that has not yet been declared.
https://eslint.org/docs/latest/rules/no-use-before-define#rule-details
from eslint-plugin-ember.
yeah -- but .. it's safe!
from eslint-plugin-ember.
i think this can be closed then? as the rule does work correctly as per its own definition
from eslint-plugin-ember.
It works incorrectly for how we need it to tho 🤔
from eslint-plugin-ember.
Related Issues (20)
- config files in readme should not encourage top level config. overrides only.
- ESLint couldn't find the config "plugin:ember/gts-recommended" to extend from HOT 4
- false positives for `no-unused-vars` in `gjs` files, when using `<Component as |something|>` HOT 3
- gjs/gts Incorrect token mapping after handlebars HOT 1
- Support "Type aware" linting for gts files HOT 13
- "service" import not treated the same as "inject as service" HOT 1
- no-unused-expressions HOT 4
- Plan v13 Release HOT 4
- new "flat" configs contain invalid parser key HOT 19
- `@typescript-eslint` breaks after update to `eslint-plugin-ember` v12 HOT 19
- ember/template-no-let-reference HOT 4
- ember/no-runloop HOT 4
- New rule: prevent assignment of existing properties on a service (important for tests)
- @typescript-eslint/eslint-recommended not applicable to `*.gts` files HOT 1
- no-unused-vars firing incorrectly on args inside template-tag HOT 7
- Lint against shadowed keywords
- eslint v9 support
- `no-pause-test` rule doesn't work for test files with `.gts` or `.gjs` extension HOT 5
- `ember/no-runloop` brings false positive error with function name `hasOwnProperty` 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 eslint-plugin-ember.