Skip to content

Commit 4252609

Browse files
authored
Improve eslint config (#1671)
* Consolidate and organize .eslintrc Moves all deeply-nested `.eslintrc` override files into project root `.eslintrc`, as `"override"` entries. Also sorts the top-level keys in `.eslintrc`. I like using `"overrides"` rather than putting override files in directories for a couple of reasons: * In some cases overrides don't map neatly to the directory structure * It keeps everything in one place This also introduces overrides for config files and scripts that are run in Node rather than compiled by babel / run in the browser, which allows us to remove the eslint configuration comments from those files. * Don't array-wrap eslint rules with no options Makes the configuration more readable
1 parent 6dfd4ba commit 4252609

File tree

10 files changed

+264
-631
lines changed

10 files changed

+264
-631
lines changed

.eslintrc

Lines changed: 263 additions & 587 deletions
Large diffs are not rendered by default.

babel.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* eslint-env node */
2-
/* eslint-disable import/no-commonjs */
3-
41
const fs = require('fs');
52
const path = require('path');
63

gulpfile.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env node */
2-
/* eslint-disable import/no-commonjs */
3-
/* eslint-disable import/no-nodejs-modules */
4-
51
const fs = require('fs');
62
const path = require('path');
73
const https = require('https');

karma.conf.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* eslint-env node */
2-
/* eslint-disable import/no-commonjs */
3-
41
const isDocker = require('is-docker');
52

63
const webpackConfiguration = require('./webpack.config.js');

src/.eslintrc

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

src/sagas/.eslintrc

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

test/unit/.eslintrc

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

test/unit/sagas/.eslintrc

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

webpack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* eslint-env node */
2-
/* eslint-disable import/no-commonjs */
3-
41
const path = require('path');
52

63
const OfflinePlugin = require('offline-plugin');

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
semver "^5.4.1"
4747
source-map "^0.5.0"
4848

49-
"@babel/generator@^7.0.0", "@babel/generator@^7.2.2", "@babel/generator@^7.3.4":
49+
"@babel/generator@^7.0.0", "@babel/generator@^7.3.4":
5050
version "7.3.4"
5151
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.4.tgz#9aa48c1989257877a9d971296e5b73bfe72e446e"
5252
integrity sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==

0 commit comments

Comments
 (0)