Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit 8c7434c

Browse files
authored
Fix the eslint config when using the CLI (#82)
1 parent b93a7d9 commit 8c7434c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trunkclub/build",
3-
"version": "6.1.0",
3+
"version": "6.1.1",
44
"upstream-version": "0.8.4",
55
"description": "Configuration and scripts for Create React App. Fork maintained by Trunk Club",
66
"repository": "trunkclub/create-react-app",

packages/react-scripts/scripts/lint.js

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ var config = require('@trunkclub/eslint-config');
77
config.fix = true;
88
config.extensions = ['.js', '.jsx', '.es6'];
99

10+
// CLIEngine env config differs from .eslintrc
11+
// http://eslint.org/docs/developer-guide/nodejs-api#cliengine
12+
config.envs = Object
13+
.keys(config.env)
14+
.filter(envKey => config.env[envKey])
15+
1016
var eslint = new CLIEngine(config);
1117

1218
var report = eslint.executeOnFiles([paths.appSrc]);

0 commit comments

Comments
 (0)