Comments (10)
/cc @giogonzo @FrancescoCioria @francescogior @ascariandrea
from eslint-config.
/cc @gcanti
from eslint-config.
no-unchecked-enums
Description
every check involving a string (=== string
) should be wrapped by an enum
Example
// bad
if (myvar === 'myenum') {
...
}
// good
if (myvar === MyEnum('myenum')) {
...
}
from eslint-config.
Nice!
=== 'string'
this check could be too broad, we probably have legit cases when you want to be able to === 'string'.. do we?
from eslint-config.
no-unchecked-enums
I would love this, but I have the same concern
every check involving a string (=== string)
I fear this will have counter-examples, can we think of one?
from eslint-config.
In the meanwhile... https://github.com/buildo/eslint-plugin-tcomb
from eslint-config.
@gabro awesome, I'll add a link to tcomb
's README
from eslint-config.
other ideas: no-any
from eslint-config.
We should open an issue (issues) on the new repo, I guess
from eslint-config.
Ok, closing this and let's track stuff on the repo
from eslint-config.
Related Issues (20)
- curly HOT 6
- rule proposal: method names HOT 2
- max-len should ignore URLs, strings and imports HOT 4
- update eslint peer dep
- rule proposal: promise plugin HOT 8
- Empty lines HOT 15
- upgrade eslint-plugin-react HOT 1
- upgrade eslint-plugin-no-loops
- Create test project to test our rules against
- Find a way to document code HOT 1
- Evaluate eslint-plugin-compat HOT 6
- Add array-bracket-spacing
- Add spaced-comment and no-multi-spaces HOT 4
- Add gdsm to linto config
- Add consistent-return HOT 4
- add eslint-plugin-import/first
- pin eslint-plugin-react to <6.10.1 HOT 2
- Disallow Use of `undefined` Variable (no-undefined) HOT 2
- Enfore space before '/>' in self-closing tags HOT 14
- add smooth release
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-config.