andyet / eslint-config-andyet Goto Github PK
View Code? Open in Web Editor NEWour eslint config(s)
our eslint config(s)
In npm3 there is a flatter dependency tree which means when eslint-plugin-hapi
is installed as a dependency of eslint-config-andyet
it gets installed at the top level, and is therefore requireable by eslint
...most of the time.
But if we already have eslint-plugin-hapi@1
installed and then install eslint-config-andyet
, then eslint
will use v1 of the plugin.
Eslint is aware of this issue and it looks like v2 might solve it next month.
package.json
"devDependencies": {
"eslint": "^1.10.3",
"eslint-config-andyet": "^1.0.0",
"eslint-plugin-hapi": "^1.2.2"
}
.eslintrc
{
"extends": "andyet"
}
Running eslint .
on some otherwise error free code then produces this output:
> eslint .
/Users/lukekarrys/Desktop/test/index.js
1:1 error Definition for rule 'hapi/no-arrowception' was not found hapi/no-arrowception
โ 1 problem (1 error, 0 warnings)
peerDependencies
. This would be annoying if we use this repo as a source for multiple configs (frontend, backend, es6, es5, etc). If you only want to lint frontend on a project you will still need to install all the peer dependency plugins for the other config types.peerDependencies
and split up the configs to separate repos/packages. This would solve the above issue, but may be be more difficult to maintain.## For backend
npm install eslint-config-andyet eslint-config-hapi ... --save-dev
# For frontend
npm install eslint-config-andyet babel-eslint eslint-plugin-react ... --save-dev
So hapi uses stroustrup (http://eslint.org/docs/rules/brace-style.html), and apparently nodesecurity does too (but only warns).
How do people feel about sticking with 1tbs, e.g.:
if (foo) {
//
} else {
//
}
That feels most consistent with how we've done things?
1:1 error Rule 'space-after-keywords' was removed and replaced by: keyword-spacing space-after-keywords
1:1 error Rule 'space-return-throw-case' was removed and replaced by: keyword-spacing space-return-throw-case
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.