Repository: styleguidist/react-styleguidist (ts)

Issue:
New editorConfig option doesn't seem to work or maybe missing themes?
In the new minor update release (`v6.2.0`) notes it mentions moving from `highlightTheme` to use the `editorConfig` option, but it doesn't seem to work. Or maybe themes were removed?

I used to have `highlightTheme: 'material',`, and then I switched it to: 

```
  editorConfig: {
    theme: 'material',
  },
```

It would look like http://bluetide.pro/FKiiDg when I used the `highlightTheme` option, but now when I use the `editorConfig` it looks like http://bluetide.pro/SBR33b

Have themes been removed apart of this update? 

Pull request:
Use editorConfig.theme for CodeMirror theme
This fixes #788 by firstly testing for `editorConfig.theme` in the config and using that if present.  This falls back to using `highlightTheme` (deprecated) so backwards compatibility is assured.

Patch:
diff --git a/loaders/styleguide-loader.js b/loaders/styleguide-loader.js
index 7ce57f36..4e7a24de 100644
--- a/loaders/styleguide-loader.js
+++ b/loaders/styleguide-loader.js
@@ -16,7 +16,6 @@ const slugger = require('./utils/slugger');
 // Config options that should be passed to the client
 const CLIENT_CONFIG_OPTIONS = [
 	'title',
-	'highlightTheme',
 	'showCode',
 	'showUsage',
 	'showSidebar',
diff --git a/scripts/make-webpack-config.js b/scripts/make-webpack-config.js
index a5b54a2d..e387cfa9 100644
--- a/scripts/make-webpack-config.js
+++ b/scripts/make-webpack-config.js
@@ -31,7 +31,7 @@ module.exports = function(config, env) {
 		resolve: {
 			extensions: ['.js', '.jsx', '.json'],
 			alias: {
-				'rsg-codemirror-theme.css': `codemirror/theme/${config.highlightTheme}.css`,
+				'rsg-codemirror-theme.css': `codemirror/theme/${config.editorConfig.theme}.css`,
 			},
 		},
 		plugins: [


Test patch:
diff --git a/scripts/__tests__/__snapshots__/make-webpack-config.spec.js.snap b/scripts/__tests__/__snapshots__/make-webpack-config.spec.js.snap
index 9ead1dc4..3a9b6ab1 100644
--- a/scripts/__tests__/__snapshots__/make-webpack-config.spec.js.snap
+++ b/scripts/__tests__/__snapshots__/make-webpack-config.spec.js.snap
@@ -66,7 +66,9 @@ Object {
   "plugins": Array [
     StyleguidistOptionsPlugin {
       "options": Object {
-        "highlightTheme": "hl-theme",
+        "editorConfig": Object {
+          "theme": "hl-theme",
+        },
         "require": Array [],
         "styleguideDir": "~/scripts/__tests__",
         "template": "template.html",
@@ -133,7 +135,9 @@ Object {
   "plugins": Array [
     StyleguidistOptionsPlugin {
       "options": Object {
-        "highlightTheme": "hl-theme",
+        "editorConfig": Object {
+          "theme": "hl-theme",
+        },
         "require": Array [],
         "styleguideDir": "~/scripts/__tests__",
         "template": "template.html",
@@ -217,3 +221,10 @@ Object {
   },
 }
 `;
+
+exports[`should use editorConfig theme over highlightTheme 1`] = `
+Object {
+  "rsg-codemirror-theme.css": "codemirror/theme/hl-theme.css",
+  "rsg-components": "~/lib/rsg-components",
+}
+`;
diff --git a/scripts/__tests__/make-webpack-config.spec.js b/scripts/__tests__/make-webpack-config.spec.js
index d9605f8f..2f41c056 100644
--- a/scripts/__tests__/make-webpack-config.spec.js
+++ b/scripts/__tests__/make-webpack-config.spec.js
@@ -4,7 +4,9 @@ import makeWebpackConfig from '../make-webpack-config';
 const styleguideConfig = {
 	styleguideDir: __dirname,
 	require: [],
-	highlightTheme: 'hl-theme',
+	editorConfig: {
+		theme: 'hl-theme',
+	},
 	title: 'Style Guide',
 	template: 'template.html',
 };
@@ -33,6 +35,14 @@ it('should prepend requires as webpack entries', () => {
 	expect(result.entry).toMatchSnapshot();
 });
 
+it('should use editorConfig theme over highlightTheme', () => {
+	const result = makeWebpackConfig(
+		{ ...styleguideConfig, highlightTheme: 'deprecated' },
+		'development'
+	);
+	expect(result.resolve.alias).toMatchSnapshot();
+});
+
 it('should enable verbose mode in CleanWebpackPlugin', () => {
 	const result = makeWebpackConfig({ ...styleguideConfig, verbose: true }, 'production');
 	expect(result.plugins.filter(x => x.constructor.name === 'CleanWebpackPlugin')).toMatchSnapshot();