Comments (3)
But no-labels
does ban labels like that, and xo does report no-labels
violations as errors with default setup.
I just checked it like this:
echo 'const foo = value => { foo: value };' | yarn xo --stdin
from eslint-plugin-unicorn.
ESLint already has a built-in rule to prevent labels in general: no-labels
. Would be natural to add an option there to also include labels in arrow functions. What do you think?
PS: I think we should have a GitHub label for rule proposals yet to be accepted. Sounds good?
👍 Label name suggestion?
from eslint-plugin-unicorn.
no-labels. Would be natural to add an option there to also include labels in arrow functions. What do you think?
Sounds good. I'm pretty amazed that it doesn't forbid it altogether with such a name. Putting it in my todo list.
Label name suggestion?
I like evaluating
, which ESLint uses.
from eslint-plugin-unicorn.
Related Issues (20)
- `no-array-callback-reference` false positive when using ternary
- `prefer-string-slice` bad autofix from `.substr()`
- `prevent-abbreviations` - non-ASCII characters ignored in filenames HOT 1
- `prefer-node-protocol` should not flag non-node imports HOT 2
- `unicorn/no-array-callback-reference` does not report when optional chaining HOT 1
- Rule change proposal: `no-useless-undefined` add option to skip checking function body
- `prefer-spread` should not report on optional chaining HOT 1
- Override dont work when change only configuration HOT 2
- Reconsider `no-document-cookie` enabled by default HOT 7
- Missing rules in plugin HOT 1
- `multipleFileExtensions` in `unicorn/filename-case` is not working correctly with eslint flat config
- prefer-dom-node-dataset: bad fix for playwright
- Rule proposal: `.replace` or `.replaceAll` with non-literal replacement HOT 3
- filename-case: pascalCase should allow stuff like FAQPage.js
- Don't prefer number properties for Infinity by default HOT 5
- Fix for '/|/g can be optimized to //g' in the better-regex rule breaks regular expression syntax
- `prefer-number-properties` changes HOT 1
- Rule proposal: `require-css-escape` HOT 1
- support calver in package.json error HOT 1
- Check `throw Object.assign(Error('...'), ...)` in `throw-new-error`
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-unicorn.