Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] updated dependencies; removed the deprecated `eslint-plugin-f…
Browse files Browse the repository at this point in the history
…low-vars` in favor of `eslint-plugin-flowtype`; removed the deprecated babel presets made unnecessary by `[email protected]`; added interface definitions for all of the `lodash` functions (including aliases)
  • Loading branch information
thealjey committed Aug 19, 2016
1 parent 377c5ef commit bf56b08
Show file tree
Hide file tree
Showing 29 changed files with 1,251 additions and 142 deletions.
6 changes: 5 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"presets": [ "es2015-loose", "stage-2", "react" ],
"presets": [
["es2015", {"loose": true}],
"stage-2",
"react"
],
"plugins": [
"transform-class-properties",
"transform-react-display-name",
Expand Down
18 changes: 14 additions & 4 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
extends: [ eslint:recommended, plugin:react/recommended, plugin:lodash/recommended ]
parser: babel-eslint
plugins: [ flow-vars, react, babel, lodash ]
plugins: [ flowtype, react, babel, lodash ]
parserOptions:
ecmaVersion: 6
sourceType: module
Expand All @@ -17,10 +17,17 @@ env:
mocha: true
rules:
# flow
flow-vars/define-flow-type: 2
flow-vars/use-flow-type: 2
flowtype/define-flow-type: 2
flowtype/require-parameter-type: [ 2, { excludeArrowFunctions: true } ]
flowtype/require-return-type: [ 2, { excludeArrowFunctions: true } ]
flowtype/require-valid-file-annotation: 2
flowtype/space-after-type-colon: 2
flowtype/space-before-type-colon: 2
flowtype/use-flow-type: 2
flowtype/valid-syntax: 2

# react
react/display-name: 0
react/jsx-boolean-value: 2
react/jsx-curly-spacing: 2
react/jsx-equals-spacing: 2
Expand Down Expand Up @@ -71,6 +78,7 @@ rules:
dot-notation: 2
eol-last: 2
eqeqeq: 2
func-call-spacing: 2
global-require: 2
guard-for-in: 2
handle-callback-err: [ 2, "^err(or)?$" ]
Expand Down Expand Up @@ -110,6 +118,7 @@ rules:
no-extend-native: 2
no-extra-bind: 2
no-extra-parens: 2
no-global-assign: 2
no-implicit-coercion: 2
no-implied-eval: 2
no-inline-comments: 2
Expand Down Expand Up @@ -140,14 +149,15 @@ rules:
no-self-compare: 2
no-sequences: 2
no-shadow-restricted-names: 2
no-spaced-func: 2
no-sync: 2
no-tabs: 2
no-template-curly-in-string: 2
no-throw-literal: 2
no-trailing-spaces: 2
no-undef-init: 2
no-unmodified-loop-condition: 2
no-unneeded-ternary: [ 2, { defaultAssignment: false } ]
no-unsafe-negation: 2
no-unused-expressions: 2
no-use-before-define: [ 2, { functions: false } ]
no-useless-call: 2
Expand Down
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
interfaces/

[options]
esproposal.class_instance_fields=enable
suppress_comment=.*@flowignore.*
10 changes: 5 additions & 5 deletions docs/Compiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-50">line 50</a>
<a href="Compiler.js.html#sunlight-1-line-49">line 49</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -686,7 +686,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-86">line 86</a>
<a href="Compiler.js.html#sunlight-1-line-85">line 85</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -874,7 +874,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-141">line 141</a>
<a href="Compiler.js.html#sunlight-1-line-140">line 140</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1062,7 +1062,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-121">line 121</a>
<a href="Compiler.js.html#sunlight-1-line-120">line 120</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1282,7 +1282,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-198">line 198</a>
<a href="Compiler.js.html#sunlight-1-line-197">line 197</a>
</li>
</ul>
</dd>
Expand Down
5 changes: 2 additions & 3 deletions docs/Compiler.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ <h1 class="page-title">Source: Compiler.js</h1>
*
* @member {boolean} isProduction
* @memberof Compiler
* @readOnly
* @readonly
* @instance
*/
isProduction: boolean;
isProduction: boolean = 'production' === process.env.NODE_ENV;

/**
* if true `Compiler#save` will gzip compress the data
Expand All @@ -134,7 +134,6 @@ <h1 class="page-title">Source: Compiler.js</h1>
/* eslint-disable require-jsdoc */
constructor(compress: boolean = true) {
/* eslint-enable require-jsdoc */
this.isProduction = 'production' === process.env.NODE_ENV;
this.compress = this.isProduction &amp;&amp; compress;
}

Expand Down
8 changes: 4 additions & 4 deletions docs/JS.html
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JS.js.html">JS.js</a>,
<a href="JS.js.html#sunlight-1-line-134">line 134</a>
<a href="JS.js.html#sunlight-1-line-133">line 133</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -990,7 +990,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JS.js.html">JS.js</a>,
<a href="JS.js.html#sunlight-1-line-156">line 156</a>
<a href="JS.js.html#sunlight-1-line-155">line 155</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1180,7 +1180,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JS.js.html">JS.js</a>,
<a href="JS.js.html#sunlight-1-line-86">line 86</a>
<a href="JS.js.html#sunlight-1-line-85">line 85</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1326,7 +1326,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JS.js.html">JS.js</a>,
<a href="JS.js.html#sunlight-1-line-62">line 62</a>
<a href="JS.js.html#sunlight-1-line-61">line 61</a>
</li>
</ul>
</dd>
Expand Down
3 changes: 1 addition & 2 deletions docs/JS.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1 class="page-title">Source: JS.js</h1>
* @private
* @instance
*/
flow: NativeProcess;
flow: NativeProcess = new NativeProcess('flow');

/**
* JavaScript linter
Expand All @@ -146,7 +146,6 @@ <h1 class="page-title">Source: JS.js</h1>
constructor(compress: boolean = true, babelOptions: Object = {}, lintRules: Object = {}) {
/* eslint-enable require-jsdoc */
this.compiler = new JSCompiler(compress, babelOptions);
this.flow = new NativeProcess('flow');
this.linter = new JSLint(lintRules);
}

Expand Down
6 changes: 3 additions & 3 deletions docs/JSCompiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JSCompiler.js.html">JSCompiler.js</a>,
<a href="JSCompiler.js.html#sunlight-1-line-199">line 199</a>
<a href="JSCompiler.js.html#sunlight-1-line-198">line 198</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -889,7 +889,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="JSCompiler.js.html">JSCompiler.js</a>,
<a href="JSCompiler.js.html#sunlight-1-line-224">line 224</a>
<a href="JSCompiler.js.html#sunlight-1-line-223">line 223</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -1118,7 +1118,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-198">line 198</a>
<a href="Compiler.js.html#sunlight-1-line-197">line 197</a>
</li>
</ul>
</dd>
Expand Down
9 changes: 4 additions & 5 deletions docs/JSCompiler.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,13 @@ <h1 class="page-title">Source: JSCompiler.js</h1>
* @private
* @instance
*/
processing: number;
processing: number = 0;

/* eslint-disable require-jsdoc */
constructor(compress: boolean = true, options: Object = {}) {
/* eslint-enable require-jsdoc */
super(compress);
this.configure(options);
this.processing = 0;
}

/**
Expand Down Expand Up @@ -348,10 +347,10 @@ <h1 class="page-title">Source: JSCompiler.js</h1>
cacheDirectory: true,
presets: map(presets, preset => {
if ('es2015' === preset) {
return 'es2015-native-modules';
return ['es2015', {modules: false}];
}
if ('es2015-loose' === preset) {
return 'es2015-loose-native-modules';
if (isArray(preset) &amp;&amp; 'es2015' === preset[0]) {
return ['es2015', {...preset[1], modules: false}];
}

return preset;
Expand Down
2 changes: 1 addition & 1 deletion docs/SASSCompiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="Compiler.js.html">Compiler.js</a>,
<a href="Compiler.js.html#sunlight-1-line-198">line 198</a>
<a href="Compiler.js.html#sunlight-1-line-197">line 197</a>
</li>
</ul>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion docs/SASSLint.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="SASSLint.js.html">SASSLint.js</a>,
<a href="SASSLint.js.html#sunlight-1-line-49">line 49</a>
<a href="SASSLint.js.html#sunlight-1-line-48">line 48</a>
</li>
</ul>
</dd>
Expand Down
3 changes: 1 addition & 2 deletions docs/SASSLint.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,11 @@ <h1 class="page-title">Source: SASSLint.js</h1>
* @private
* @instance
*/
proc: NativeProcess;
proc: NativeProcess = new NativeProcess('scss-lint');

/** @constructs */
constructor(...excludeLinter: Array&lt;string>) {
this.excludeLinter = excludeLinter.join(',');
this.proc = new NativeProcess('scss-lint');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion docs/quicksearch.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions interfaces/babel-polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* @flow */

/* eslint-disable no-empty */

declare module 'babel-polyfill' {}
Loading

0 comments on commit bf56b08

Please sign in to comment.