metalabdesign / eslint-config-metalab Goto Github PK
View Code? Open in Web Editor NEWLint JavaScript MetaLab style.
Lint JavaScript MetaLab style.
I failed several Travis builds today for karma-adana-reporter because I forgot to install a peer dependency.
I was unable to add a codeclimate badge because apparently there's a security concern with plugins in general and codeclimate doesn't support the ones required by this config. Scratch that, it seems that they have issues in general.
The eslint-plugin-react must be installed even if the repo doesn't use React at all. There are currently 8 repositories in the adana-coverage group, but only one of them actually has jsx in two fixture files that don't need to be linted at all.
So far these plugins provided me with virtually no benefit. I don't deny their usefulness, but I suppose that they can be added to the project when there is a real need for them.
I have noticed that in v2.0.0-beta the rule for named functions have been replaced with the one for function expressions. Can this be reverted?
I understand that you want to ensure that the function is declared before it is used, but there's already a no-use-before-define rule which covers this issue.
Also, take a look at the semantics:
function foo() {} // I declare a function named "foo"
const foo = function() {}; // I declare a constant named "foo",
// to which I assign an anonymous function
A common scenario is to export a function from a module. With named functions I could do it like this:
export default function foo() {
// ...
}
However function expressions force me to do this:
const foo = function() {
// ...
};
export default foo;
If the exported function is sufficiently long, then I have to scroll all the way to the bottom of the file to figure out what is actually exported.
P.S. And it's just too long to write...
Placing an assignment inside a conditional can be useful. Setting "no-cond-assign": [ 2, "except-parens" ]
will require the assignment to be wrapped in additional parens. This would still catch unintentional assignment.
"env": { "browser": true }
needs to be set manually in your local eslint
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.