Skip to content

Commit 2ccbe41

Browse files
author
hugur
committed
use cms{config/options} in example (not theme)
1 parent 16008ff commit 2ccbe41

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

example/.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const config = require("@w3f/gatsby-theme-w3f/.eslintrc")
2+
module.exports = config
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import CMS from 'netlify-cms-app';
1+
import CMS from "netlify-cms-app";
22

3-
import { LinkCTA } from './editor-components';
4-
import options from './options';
3+
import { LinkCTA } from "@w3f/gatsby-theme-w3f/src/cms/editor-components";
54

6-
const netlifyCmsGitLocal = process.env.GATSBY_NETLIFY_CMS_GIT_LOCAL === 'true';
5+
import options from "./options";
6+
7+
const netlifyCmsGitLocal = process.env.GATSBY_NETLIFY_CMS_GIT_LOCAL === "true";
78

89
if (netlifyCmsGitLocal) {
910
options.config.local_backend = true;
1011
options.config.backend = {
11-
name: 'git-gateway',
12+
name: "git-gateway",
1213
};
1314
}
1415

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import collections from './collections/index';
1+
/* theme collections */
2+
import strings from '@w3f/gatsby-theme-w3f/src/cms/collections/strings';
23

3-
const {strings} = collections
4+
const collections = [strings]
45

56
const cmsOptions = {
67
config: {
7-
collections: [strings],
8+
collections: collections,
89
display_url: window.location.origin,
910
publish_mode: 'editorial_workflow',
1011

gatsby-theme-w3f/.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ module.exports = {
2929
sourceType: 'module',
3030
},
3131
rules: {
32-
'simple-import-sort/imports': 'error',
32+
'simple-import-sort/imports': 'off',
3333
// Disable prop-types
3434
'react/prop-types': 'off',
3535
// Enable prettier rules
36-
'prettier/prettier': 'error',
36+
'prettier/prettier': 'off',
3737
},
3838
};

0 commit comments

Comments
 (0)