Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internal linting setup #1741

Merged
merged 1 commit into from
Mar 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build
my-app*
packages/react-scripts/template
packages/react-scripts/fixtures
File renamed without changes.
11 changes: 11 additions & 0 deletions packages/react-scripts/bin/react-scripts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

'use strict';

var spawn = require('cross-spawn');
var script = process.argv[2];
var args = process.argv.slice(3);
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
// injected into the application via DefinePlugin in Webpack configuration.
Expand Down
2 changes: 2 additions & 0 deletions packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

'use strict';

const babelJest = require('babel-jest');

module.exports = babelJest.createTransformer({
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/config/jest/cssTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

// This is a custom Jest transformer turning style imports into empty objects.
// http://facebook.github.io/jest/docs/tutorial-webpack.html
Expand All @@ -15,7 +16,7 @@ module.exports = {
process() {
return 'module.exports = {};';
},
getCacheKey(fileData, filename) {
getCacheKey() {
// The output is always the same.
return 'cssTransform';
},
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/config/jest/fileTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

const path = require('path');

Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

var path = require('path');
var fs = require('fs');
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/config/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

if (typeof Promise === 'undefined') {
// Rejection tracking prevents a common issue where React gets into an
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
Expand Down Expand Up @@ -117,7 +118,7 @@ module.exports = {
// @remove-on-eject-begin
// Point ESLint to our predefined config.
options: {
configFile: path.join(__dirname, '../.eslintrc'),
configFile: path.join(__dirname, '../eslintrc'),
useEslintrc: false
},
// @remove-on-eject-end
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
Expand Down Expand Up @@ -123,7 +124,7 @@ module.exports = {
options: {
// TODO: consider separate config for production,
// e.g. to enable no-console and no-debugger only in production.
configFile: path.join(__dirname, '../.eslintrc'),
configFile: path.join(__dirname, '../eslintrc'),
useEslintrc: false
},
// @remove-on-eject-end
Expand Down
12 changes: 12 additions & 0 deletions packages/react-scripts/config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// @remove-on-eject-begin
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
// @remove-on-eject-end
'use strict';

var config = require('./webpack.config.dev');
var paths = require('./paths');

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

import { expect } from 'chai'
import initDOM from './initDOM'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

const fs = require('fs')
const http = require('http')
const jsdom = require('jsdom')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

import { expect } from 'chai'
import initDOM from './initDOM'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

import { expect } from 'chai'
import initDOM from './initDOM'

Expand Down
9 changes: 9 additions & 0 deletions packages/react-scripts/fixtures/kitchensink/src/App.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

import React, { Component, PropTypes, createElement } from 'react';

class BuiltEmitter extends Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React from 'react'

export default () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React, { Component, PropTypes } from 'react'
import load from 'absoluteLoad'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React from 'react'

export default () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React from 'react'

export default () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React, { Component, PropTypes } from 'react'

function load() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React, { Component, PropTypes } from 'react'

function load(users) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

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

import React, { Component, PropTypes } from 'react'

async function load() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

import React from 'react';
import ReactDOM from 'react-dom';
import AsyncAwait from './AsyncAwait';
Expand Down
Loading