Skip to content

Commit 199388e

Browse files
committed
Fix internal linting setup and add missing headers
1 parent 03d15f4 commit 199388e

File tree

81 files changed

+606
-11
lines changed

Some content is hidden

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

81 files changed

+606
-11
lines changed

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
build
3+
my-app*
4+
packages/react-scripts/template
5+
packages/react-scripts/fixtures
File renamed without changes.

packages/react-scripts/bin/react-scripts.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
#!/usr/bin/env node
2+
/**
3+
* Copyright (c) 2015-present, Facebook, Inc.
4+
* All rights reserved.
5+
*
6+
* This source code is licensed under the BSD-style license found in the
7+
* LICENSE file in the root directory of this source tree. An additional grant
8+
* of patent rights can be found in the PATENTS file in the same directory.
9+
*/
10+
11+
'use strict';
12+
213
var spawn = require('cross-spawn');
314
var script = process.argv[2];
415
var args = process.argv.slice(3);

packages/react-scripts/config/env.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010
// @remove-on-eject-end
11+
'use strict';
1112

1213
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
1314
// injected into the application via DefinePlugin in Webpack configuration.

packages/react-scripts/config/jest/babelTransform.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10+
'use strict';
11+
1012
const babelJest = require('babel-jest');
1113

1214
module.exports = babelJest.createTransformer({

packages/react-scripts/config/jest/cssTransform.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99
// @remove-on-eject-end
10+
'use strict';
1011

1112
// This is a custom Jest transformer turning style imports into empty objects.
1213
// http://facebook.github.io/jest/docs/tutorial-webpack.html
@@ -15,7 +16,7 @@ module.exports = {
1516
process() {
1617
return 'module.exports = {};';
1718
},
18-
getCacheKey(fileData, filename) {
19+
getCacheKey() {
1920
// The output is always the same.
2021
return 'cssTransform';
2122
},

packages/react-scripts/config/jest/fileTransform.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99
// @remove-on-eject-end
10+
'use strict';
1011

1112
const path = require('path');
1213

packages/react-scripts/config/paths.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010
// @remove-on-eject-end
11+
'use strict';
1112

1213
var path = require('path');
1314
var fs = require('fs');

packages/react-scripts/config/polyfills.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010
// @remove-on-eject-end
11+
'use strict';
1112

1213
if (typeof Promise === 'undefined') {
1314
// Rejection tracking prevents a common issue where React gets into an

packages/react-scripts/config/webpack.config.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010
// @remove-on-eject-end
11+
'use strict';
1112

1213
var autoprefixer = require('autoprefixer');
1314
var webpack = require('webpack');
@@ -117,7 +118,7 @@ module.exports = {
117118
// @remove-on-eject-begin
118119
// Point ESLint to our predefined config.
119120
options: {
120-
configFile: path.join(__dirname, '../.eslintrc'),
121+
configFile: path.join(__dirname, '../eslintrc'),
121122
useEslintrc: false
122123
},
123124
// @remove-on-eject-end

packages/react-scripts/config/webpack.config.prod.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* of patent rights can be found in the PATENTS file in the same directory.
99
*/
1010
// @remove-on-eject-end
11+
'use strict';
1112

1213
var autoprefixer = require('autoprefixer');
1314
var webpack = require('webpack');
@@ -123,7 +124,7 @@ module.exports = {
123124
options: {
124125
// TODO: consider separate config for production,
125126
// e.g. to enable no-console and no-debugger only in production.
126-
configFile: path.join(__dirname, '../.eslintrc'),
127+
configFile: path.join(__dirname, '../eslintrc'),
127128
useEslintrc: false
128129
},
129130
// @remove-on-eject-end

packages/react-scripts/config/webpackDevServer.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
// @remove-on-eject-begin
2+
/**
3+
* Copyright (c) 2015-present, Facebook, Inc.
4+
* All rights reserved.
5+
*
6+
* This source code is licensed under the BSD-style license found in the
7+
* LICENSE file in the root directory of this source tree. An additional grant
8+
* of patent rights can be found in the PATENTS file in the same directory.
9+
*/
10+
// @remove-on-eject-end
11+
'use strict';
12+
113
var config = require('./webpack.config.dev');
214
var paths = require('./paths');
315

File renamed without changes.

packages/react-scripts/fixtures/kitchensink/integration/env.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import { expect } from 'chai'
211
import initDOM from './initDOM'
312

packages/react-scripts/fixtures/kitchensink/integration/initDOM.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
const fs = require('fs')
211
const http = require('http')
312
const jsdom = require('jsdom')

packages/react-scripts/fixtures/kitchensink/integration/syntax.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import { expect } from 'chai'
211
import initDOM from './initDOM'
312

packages/react-scripts/fixtures/kitchensink/integration/webpack.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import { expect } from 'chai'
211
import initDOM from './initDOM'
312

packages/react-scripts/fixtures/kitchensink/src/App.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React, { Component, PropTypes, createElement } from 'react';
211

312
class BuiltEmitter extends Component {

packages/react-scripts/fixtures/kitchensink/src/absoluteLoad.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
export default () => [
211
{ id: 1, name: '1' },
312
{ id: 2, name: '2' },

packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react'
211

312
export default () => (

packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import FileEnvVariables from './FileEnvVariables';

packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React, { Component, PropTypes } from 'react'
211
import load from 'absoluteLoad'
312

packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import NodePath from './NodePath';

packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react'
211

312
export default () => (

packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import PublicUrl from './PublicUrl';

packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react'
211

312
export default () => (

packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import ShellEnvVariables from './ShellEnvVariables';

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React, { Component, PropTypes } from 'react'
211

312
function load() {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import ArrayDestructuring from './ArrayDestructuring';

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React, { Component, PropTypes } from 'react'
211

312
function load(users) {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import ArraySpread from './ArraySpread';

packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React, { Component, PropTypes } from 'react'
211

312
async function load() {

packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
110
import React from 'react';
211
import ReactDOM from 'react-dom';
312
import AsyncAwait from './AsyncAwait';

0 commit comments

Comments
 (0)