setting file for eslint(includes react and flowtype)
npm install eslint-config-sky

$ npm install --save-dev eslint-config-sky
`Usage
Add "extends": "sky" to your .eslintrc.
This includes base + react + flow rules.$3
"extends": "sky/base"$3
"extends": "sky/react"$3
"extends": "sky/flow"Sample
`javascript
import fs from 'fs';
import hoge from 'hoge';
import { fuga } from 'fuga';
import fuga from '../';
import piyo from './';const fuga = require('fuga');
const test1 = 1;
const test2 = '2';
const obj = {
test1 : 1,
test2 : 2,
test13: 13
};
if (test1 == null) {
alert('nope');
}
if (test2 === '2') {
alert('yep');
}
/**
* @description check:)
*/
function check() {
return 'check';
}
export default class Piyo extends Fuga {
constructor() {
super();
this.name = 'name';
}
get myName() {
return this.name;
}
}
``javascript
// reactimport React from 'react';
class View extends React.Component {
constructor() {
super();
this.state = {
opened: false
};
}
render() {
return (
);
}
}function postmyname() {
}
const Label = () => (
Label
);
``javascript
// flowconst name: string = 'name';
type User = {
name: string
};
/**
* @description fetchUserNames
*/
function fetchUserNames(): Promise> {
return new Promise((resolve, reject) => {
resolve([
'hoge',
'fuga'
]);
});
``