Skip to content

Commit d9f8634

Browse files
author
James Portelli
committed
catchup to master
2 parents b09c735 + ad7a859 commit d9f8634

File tree

295 files changed

+34674
-13976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+34674
-13976
lines changed

.babelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*.log

.eslintrc

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,8 @@
1010
},
1111
"globals" : {
1212
"adz": true,
13-
jQuery: true,
14-
translate: true,
15-
pluralTranslate: true
16-
},
17-
"ecmaFeatures": {
18-
"arrowFunctions": true,
19-
"blockBindings": true,
20-
"classes": true,
21-
"defaultParams": true,
22-
"destructuring": true,
23-
"forOf": true,
24-
"generators": false,
25-
"modules": true,
26-
"objectLiteralComputedProperties": true,
27-
"objectLiteralDuplicateProperties": false,
28-
"objectLiteralShorthandMethods": true,
29-
"objectLiteralShorthandProperties": true,
30-
"spread": true,
31-
"superInFunctions": true,
32-
"templateStrings": true,
33-
"jsx": true
13+
"jQuery": true,
14+
"Immutable": true
3415
},
3516
"rules": {
3617
/**
@@ -45,6 +26,15 @@
4526
*/
4627
"no-var": 2, // http://eslint.org/docs/rules/no-var
4728
"jsx-quotes": [2, "prefer-double"], //http://eslint.org/docs/rules/jsx-quotes
29+
"constructor-super": 2,
30+
"no-useless-constructor": 2,
31+
"no-useless-computed-key": 2,
32+
"no-const-assign": 2,
33+
"no-dupe-class-members": 2,
34+
"no-new-symbol": 2,
35+
"no-this-before-super": 2,
36+
"arrow-spacing": 1,
37+
"no-class-assign": 2,
4838
/**
4939
* Variables
5040
*/
@@ -54,7 +44,10 @@
5444
"vars": "local",
5545
"args": "after-used"
5646
}],
57-
"no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define
47+
"no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define,
48+
"no-undef": 2,
49+
"no-delete-var": 2,
50+
"no-label-var": 2,
5851

5952
/**
6053
* Possible errors
@@ -80,6 +73,10 @@
8073
"no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable
8174
"use-isnan": 2, // http://eslint.org/docs/rules/use-isnan
8275
"block-scoped-var": 2, // http://eslint.org/docs/rules/block-scoped-var
76+
"no-dupe-args": 2,
77+
"no-template-curly-in-string": 2,
78+
"valid-typeof": [2, { "requireStringLiterals": true }],
79+
8380
/**
8481
* Best practices
8582
*/
@@ -121,7 +118,15 @@
121118
"radix": 2, // http://eslint.org/docs/rules/radix
122119
"vars-on-top": 2, // http://eslint.org/docs/rules/vars-on-top
123120
"wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife
124-
"yoda": 2, // http://eslint.org/docs/rules/yoda
121+
"yoda": 2, // http://eslint.org/docs/rules/yoda,
122+
"prefer-const": 2,
123+
"no-empty-pattern": 2,
124+
"no-extra-label": 2,
125+
"no-global-assign": 2,
126+
"no-self-assign": 2,
127+
"no-unmodified-loop-condition": 2,
128+
"no-unused-expressions": [2, { "allowShortCircuit": true }],
129+
"no-useless-call": 2,
125130

126131
/**
127132
* Style
@@ -172,7 +177,10 @@
172177
"space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren
173178
"space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops
174179
"keyword-spacing": 0, // http://eslint.org/docs/rules/space-return-throw-case
175-
"spaced-comment": 2, // http://eslint.org/docs/rules/spaced-comment
180+
"spaced-comment": 2, // http://eslint.org/docs/rules/spaced-comment,
181+
"no-whitespace-before-property": 2,
182+
"no-array-constructor": 2,
183+
"object-curly-spacing": [1, "always"],
176184

177185
/**
178186
* JSX style

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ npm-debug.log
1010
lerna-debug.log
1111
**.orig
1212
.vscode
13-
package-lock.json

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:8.11.4
2+
3+
WORKDIR /app/website
4+
5+
EXPOSE 3000 35729
6+
COPY ./docs /app/docs
7+
COPY ./website /app/website
8+
RUN yarn install
9+
10+
CMD ["yarn", "start"]

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# React Data Grid
2-
[![Build status](https://ci.appveyor.com/api/projects/status/smciktvlkvp6r8w7/branch/master?svg=true)](https://ci.appveyor.com/project/adazzle/react-data-grid/branch/master)[![Coverage Status](https://coveralls.io/repos/adazzle/react-data-grid/badge.svg?branch=master)](https://coveralls.io/r/adazzle/react-data-grid?branch=master) [![npm version](https://badge.fury.io/js/react-data-grid.svg)](http://badge.fury.io/js/react-data-grid)
2+
3+
[logo]: https://user-images.githubusercontent.com/1432798/48616964-077b9400-e98d-11e8-9b56-f70e0722b83d.png "ReactDataGrid"
4+
5+
[![Build status](https://ci.appveyor.com/api/projects/status/smciktvlkvp6r8w7/branch/master?svg=true)](https://ci.appveyor.com/project/adazzle/react-data-grid/branch/master)
6+
[![Coverage Status](https://coveralls.io/repos/adazzle/react-data-grid/badge.svg?branch=master)](https://coveralls.io/r/adazzle/react-data-grid?branch=master)
7+
[![npm version](https://badge.fury.io/js/react-data-grid.svg)](http://badge.fury.io/js/react-data-grid)
38
![npm dependencies](https://david-dm.org/adazzle/react-data-grid.svg)
49
[![CDNJS](https://img.shields.io/cdnjs/v/react-data-grid.svg)](https://cdnjs.com/libraries/react-data-grid)
5-
[![React Data Grid chat](https://react-data-grid.herokuapp.com/badge.svg)](https://react-data-grid.herokuapp.com/)
610

7-
Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like http://adazzle.github.io/react-data-grid/
11+
Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like
12+
13+
14+
http://adazzle.github.io/react-data-grid/
815
![react-data-grid](https://cloud.githubusercontent.com/assets/1432798/7348812/78063bd6-ecec-11e4-89d5-ffd327721cd7.PNG)
916

17+
1018
Overview
1119
--------
1220
ReactDataGrid is an advanced JavaScript spreadsheet-like grid component built using React

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/env', {
4+
useBuiltIns: 'entry'}],
5+
'@babel/react'],
6+
plugins: [
7+
'@babel/plugin-proposal-class-properties',
8+
'@babel/plugin-transform-property-literals',
9+
'@babel/plugin-transform-member-expression-literals',
10+
'@babel/plugin-transform-runtime'
11+
]
12+
};

browserslist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ie 11
2+
last 2 chrome versions
3+
last 2 edge versions
4+
last 2 firefox versions
5+
last 2 safari versions
6+
Firefox ESR

ci/publish/publish-web.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$input = Read-Host "Enter your authorised github username"
2+
Set-Item -Path Env:GIT_USER -Value ($input)
3+
Set-Location .\website
4+
npm run publish-gh-pages

ci/publish/publish.ps1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ if($?)
5454
$versionBumpMessage = "Version bump to $nextVersion [ci skip]"
5555
npm run beforepublish
5656
./node_modules/.bin/lerna publish --repo-version $nextVersion --skip-git --yes
57-
if($?) {
58-
Write-Host "Regenerating public site and examples"
59-
node ./ci/publish/publishExamples.js
60-
}
6157
git add .
6258
git commit -m $versionBumpMessage
6359
git push

config/karma.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (argv.file) {
3636
const webpackCfg = Object.keys(defaultWebpack).reduce((res, key) => {
3737
let value = defaultWebpack[key];
3838
if (key === 'module') {
39-
value = Object.assign({}, value, { postLoaders: null});
39+
value = Object.assign({}, value);
4040
} else if (key === 'plugins') {
4141
value = [...value, new webpack.SourceMapDevToolPlugin({
4242
filename: null,
@@ -47,6 +47,7 @@ const webpackCfg = Object.keys(defaultWebpack).reduce((res, key) => {
4747
return res;
4848
}, {});
4949
webpackCfg.devtool = argv.file ? 'inline-source-map' : undefined;
50+
webpackCfg.mode = 'development';
5051

5152
module.exports = function(config) {
5253
config.set({

config/karma.js

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
/*
2-
* In local config, only run tests using phantom js. No code coverage reports applied
3-
*/
41
var webpack = require('webpack');
52
require('airbnb-browser-shims');
63
var webpackConfig = require('./webpack.common.config.js');
7-
var RewirePlugin = require("rewire-webpack");
84
var path = require('path');
95
var argv = require('minimist')(process.argv.slice(2));
106
var RELEASE = !!argv.release;
@@ -23,7 +19,7 @@ module.exports = function (config) {
2319
};
2420

2521
function getBrowsers(){
26-
var browsers = ['PhantomJS'];
22+
var browsers = [];
2723
if(BROWSERS) {
2824
return BROWSERS.split(',');
2925
}
@@ -63,14 +59,6 @@ module.exports = function (config) {
6359
return preprocessors;
6460
}
6561

66-
function lookupPhantomJS() {
67-
try {
68-
return require('phantomjs').path;
69-
} catch(e){
70-
return;
71-
}
72-
}
73-
7462
config.set({
7563

7664
basePath: path.join(__dirname, '../'),
@@ -80,19 +68,32 @@ module.exports = function (config) {
8068
preprocessors: getPreprocessors(),
8169

8270
webpack: {
71+
mode: RELEASE ? 'production' : 'development',
8372
devtool: 'inline-source-map',
8473
module: {
85-
loaders: webpackConfig.module.loaders
74+
rules: [
75+
{
76+
test: /\.(js|jsx)$/,
77+
exclude: /node_modules/,
78+
use: [
79+
{ loader: 'babel-loader', options: { envName: 'test' } }
80+
]
81+
},
82+
{
83+
test: /\.css$/,
84+
use: [
85+
{ loader: 'style-loader' },
86+
{ loader: 'css-loader' }
87+
]
88+
}
89+
]
8690
},
8791
resolve: {
88-
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx'],
92+
extensions: ['.webpack.js', '.web.js', '.js', '.jsx'],
8993
alias: {
9094
common: path.resolve('packages/common/')
9195
}
9296
},
93-
plugins: [
94-
new RewirePlugin()
95-
],
9697
externals: {
9798
'cheerio': 'window',
9899
'react/lib/ExecutionEnvironment': true,
@@ -152,7 +153,6 @@ module.exports = function (config) {
152153
plugins: [
153154
'karma-chrome-launcher',
154155
'karma-firefox-launcher',
155-
'karma-phantomjs-launcher-nonet',
156156
'karma-ie-launcher',
157157
'karma-jasmine',
158158
'karma-jasmine-matchers',
@@ -175,15 +175,6 @@ module.exports = function (config) {
175175
flags: [ '--remote-debugging-port=9333' ],
176176
debug: true
177177
}
178-
},
179-
180-
phantomjsLauncher: {
181-
// configure PhantomJS executable for each platform
182-
cmd: {
183-
linux: lookupPhantomJS(),
184-
darwin: lookupPhantomJS(),
185-
win32: path.join(__dirname, '../test/browser/phantomjs.exe')
186-
}
187178
}
188179
});
189180
};

config/webpack.common.config.js

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
1-
const webpack = require('webpack');
1+
const path = require('path');
22
const argv = require('minimist')(process.argv.slice(2));
33
const RELEASE = argv.release;
4-
const path = require('path');
5-
6-
function getPlugins() {
7-
const nodeEnv = RELEASE ? '"production"' : '"development"';
8-
var pluginsBase = [
9-
new webpack.DefinePlugin({'process.env.NODE_ENV': nodeEnv, 'global': 'window'})
10-
];
11-
12-
if (RELEASE) {
13-
pluginsBase.push(new webpack.optimize.DedupePlugin());
14-
pluginsBase.push(new webpack.optimize.OccurenceOrderPlugin());
15-
pluginsBase.push(new webpack.optimize.AggressiveMergingPlugin());
16-
pluginsBase.push(new webpack.optimize.UglifyJsPlugin({
17-
include: /\.min\.js$/,
18-
compress: { warnings: false }
19-
}));
20-
}
21-
return pluginsBase;
22-
}
234

245
const config = {
25-
debug: !RELEASE,
6+
mode: RELEASE ? 'production' : 'development',
267
externals: {
278
react: {
289
root: 'React',
@@ -36,7 +17,7 @@ const config = {
3617
commonjs2: 'react-dom',
3718
amd: 'react-dom'
3819
},
39-
'react/addons': 'React',
20+
'react/addons': 'React',
4021
moment: 'moment',
4122
immutable: {
4223
root: 'Immutable',
@@ -45,23 +26,26 @@ const config = {
4526
}
4627
},
4728
module: {
48-
loaders: [
49-
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
50-
{ test: /\.css$/, loader: 'style-loader!css-loader' }
29+
rules: [
30+
{
31+
test: /\.(js|jsx)$/,
32+
exclude: /node_modules/,
33+
use: ['babel-loader']
34+
},
35+
{
36+
test: /\.css$/,
37+
use: [
38+
{ loader: 'style-loader' },
39+
{ loader: 'css-loader' }
40+
]
41+
}
5142
]
5243
},
53-
plugins: getPlugins(),
5444
resolve: {
5545
alias: {
5646
common: path.resolve('packages/common/')
5747
}
58-
},
59-
postLoaders: [
60-
{
61-
test: /\.js$/,
62-
exclude: /node_modules|testData/,
63-
loader: 'jshint'
64-
}]
48+
}
6549
};
6650

6751

0 commit comments

Comments
 (0)