Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit ceb561d

Browse files
committed
style(cms): run prettier
1 parent 6a23ead commit ceb561d

File tree

12 files changed

+228
-266
lines changed

12 files changed

+228
-266
lines changed

cms/.eslintrc.json

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
{
2-
"parser": "@babel/eslint-parser",
3-
"plugins": ["prettier", "unused-imports"],
4-
"ignorePatterns": ["node_modules/", "build/", "dist/", "public/"],
5-
"parserOptions": {
6-
"requireConfigFile": false,
7-
"babelOptions": {
8-
"presets": [
9-
"@babel/preset-react"
10-
]
11-
},
12-
"ecmaFeatures": {
13-
"experimentalObjectRestSpread": true,
14-
"jsx": false
15-
},
16-
"sourceType": "module"
17-
},
18-
"extends": ["eslint:recommended", "prettier"],
19-
"env": {
20-
"commonjs": true,
21-
"es6": true,
22-
"node": true,
23-
"browser": false
24-
},
25-
"globals": {
26-
"strapi": true
27-
},
28-
"rules": {
29-
"prettier/prettier": "error",
30-
"no-console": 0
31-
}
2+
"parser": "@babel/eslint-parser",
3+
"plugins": ["prettier", "unused-imports"],
4+
"ignorePatterns": ["node_modules/", "build/", "dist/", "public/"],
5+
"parserOptions": {
6+
"requireConfigFile": false,
7+
"babelOptions": {
8+
"presets": ["@babel/preset-react"]
9+
},
10+
"ecmaFeatures": {
11+
"experimentalObjectRestSpread": true,
12+
"jsx": false
13+
},
14+
"sourceType": "module"
15+
},
16+
"extends": ["eslint:recommended", "prettier"],
17+
"env": {
18+
"commonjs": true,
19+
"es6": true,
20+
"node": true,
21+
"browser": false
22+
},
23+
"globals": {
24+
"strapi": true
25+
},
26+
"rules": {
27+
"prettier/prettier": "error",
28+
"no-console": 0
29+
}
3230
}

cms/.prettierrc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"useTabs": true,
3-
"tabWidth": 2,
4-
"singleQuote": false,
5-
"printWidth": 160,
6-
"bracketSpacing": true,
7-
"arrowParens": "avoid",
8-
"trailingComma": "es5",
9-
"semi": true
2+
"useTabs": true,
3+
"tabWidth": 2,
4+
"singleQuote": false,
5+
"printWidth": 160,
6+
"bracketSpacing": true,
7+
"arrowParens": "avoid",
8+
"trailingComma": "es5",
9+
"semi": true
1010
}

cms/src/admin/app.example.tsx

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
export default {
2-
config: {
3-
locales: [
4-
// 'ar',
5-
// 'fr',
6-
// 'cs',
7-
// 'de',
8-
// 'dk',
9-
// 'es',
10-
// 'he',
11-
// 'id',
12-
// 'it',
13-
// 'ja',
14-
// 'ko',
15-
// 'ms',
16-
// 'nl',
17-
// 'no',
18-
// 'pl',
19-
// 'pt-BR',
20-
// 'pt',
21-
// 'ru',
22-
// 'sk',
23-
// 'sv',
24-
// 'th',
25-
// 'tr',
26-
// 'uk',
27-
// 'vi',
28-
// 'zh-Hans',
29-
// 'zh',
30-
],
31-
},
32-
bootstrap(app) {
33-
console.log(app);
34-
},
2+
config: {
3+
locales: [
4+
// 'ar',
5+
// 'fr',
6+
// 'cs',
7+
// 'de',
8+
// 'dk',
9+
// 'es',
10+
// 'he',
11+
// 'id',
12+
// 'it',
13+
// 'ja',
14+
// 'ko',
15+
// 'ms',
16+
// 'nl',
17+
// 'no',
18+
// 'pl',
19+
// 'pt-BR',
20+
// 'pt',
21+
// 'ru',
22+
// 'sk',
23+
// 'sv',
24+
// 'th',
25+
// 'tr',
26+
// 'uk',
27+
// 'vi',
28+
// 'zh-Hans',
29+
// 'zh',
30+
],
31+
},
32+
bootstrap(app) {
33+
console.log(app);
34+
},
3535
};

cms/src/admin/tsconfig.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
{
2-
"extends": "@strapi/typescript-utils/tsconfigs/admin",
3-
"include": [
4-
"../plugins/**/admin/src/**/*",
5-
"./"
6-
],
7-
"exclude": [
8-
"node_modules/",
9-
"build/",
10-
"dist/",
11-
"**/*.test.ts"
12-
]
2+
"extends": "@strapi/typescript-utils/tsconfigs/admin",
3+
"include": ["../plugins/**/admin/src/**/*", "./"],
4+
"exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"]
135
}
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"kind": "collectionType",
3-
"collectionName": "newsposts",
4-
"info": {
5-
"singularName": "newspost",
6-
"pluralName": "newsposts",
7-
"displayName": "Newspost",
8-
"description": ""
9-
},
10-
"options": {
11-
"draftAndPublish": true
12-
},
13-
"pluginOptions": {},
14-
"attributes": {
15-
"title": {
16-
"type": "string"
17-
},
18-
"text": {
19-
"type": "text"
20-
}
21-
}
2+
"kind": "collectionType",
3+
"collectionName": "newsposts",
4+
"info": {
5+
"singularName": "newspost",
6+
"pluralName": "newsposts",
7+
"displayName": "Newspost",
8+
"description": ""
9+
},
10+
"options": {
11+
"draftAndPublish": true
12+
},
13+
"pluginOptions": {},
14+
"attributes": {
15+
"title": {
16+
"type": "string"
17+
},
18+
"text": {
19+
"type": "text"
20+
}
21+
}
2222
}
Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
{
2-
"kind": "collectionType",
3-
"collectionName": "pages",
4-
"info": {
5-
"singularName": "page",
6-
"pluralName": "pages",
7-
"displayName": "Page",
8-
"description": ""
9-
},
10-
"options": {
11-
"draftAndPublish": true
12-
},
13-
"pluginOptions": {},
14-
"attributes": {
15-
"pageTitle": {
16-
"pluginOptions": {},
17-
"type": "string"
18-
},
19-
"heroSection": {
20-
"pluginOptions": {},
21-
"type": "dynamiczone",
22-
"components": [
23-
"general.button",
24-
"general.card"
25-
],
26-
"min": 0,
27-
"max": 1
28-
},
29-
"contentSection": {
30-
"pluginOptions": {},
31-
"type": "dynamiczone",
32-
"components": [
33-
"general.button",
34-
"general.card"
35-
],
36-
"required": true
37-
}
38-
}
2+
"kind": "collectionType",
3+
"collectionName": "pages",
4+
"info": {
5+
"singularName": "page",
6+
"pluralName": "pages",
7+
"displayName": "Page",
8+
"description": ""
9+
},
10+
"options": {
11+
"draftAndPublish": true
12+
},
13+
"pluginOptions": {},
14+
"attributes": {
15+
"pageTitle": {
16+
"pluginOptions": {},
17+
"type": "string"
18+
},
19+
"heroSection": {
20+
"pluginOptions": {},
21+
"type": "dynamiczone",
22+
"components": ["general.button", "general.card"],
23+
"min": 0,
24+
"max": 1
25+
},
26+
"contentSection": {
27+
"pluginOptions": {},
28+
"type": "dynamiczone",
29+
"components": ["general.button", "general.card"],
30+
"required": true
31+
}
32+
}
3933
}
Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
{
2-
"collectionName": "components_general_buttons",
3-
"info": {
4-
"displayName": "Button",
5-
"icon": "cursor",
6-
"description": ""
7-
},
8-
"options": {},
9-
"attributes": {
10-
"text": {
11-
"type": "string"
12-
},
13-
"type": {
14-
"type": "enumeration",
15-
"enum": [
16-
"CTA",
17-
"Primary",
18-
"Secondary"
19-
],
20-
"default": "Primary"
21-
},
22-
"url": {
23-
"type": "string"
24-
}
25-
}
2+
"collectionName": "components_general_buttons",
3+
"info": {
4+
"displayName": "Button",
5+
"icon": "cursor",
6+
"description": ""
7+
},
8+
"options": {},
9+
"attributes": {
10+
"text": {
11+
"type": "string"
12+
},
13+
"type": {
14+
"type": "enumeration",
15+
"enum": ["CTA", "Primary", "Secondary"],
16+
"default": "Primary"
17+
},
18+
"url": {
19+
"type": "string"
20+
}
21+
}
2622
}

cms/src/components/general/card.json

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
2-
"collectionName": "components_general_cards",
3-
"info": {
4-
"displayName": "Section",
5-
"icon": "layer",
6-
"description": ""
7-
},
8-
"options": {},
9-
"attributes": {
10-
"headline": {
11-
"type": "string",
12-
"required": true
13-
},
14-
"description": {
15-
"type": "richtext"
16-
},
17-
"button": {
18-
"type": "component",
19-
"repeatable": false,
20-
"component": "general.button"
21-
},
22-
"type": {
23-
"type": "enumeration",
24-
"enum": [
25-
"Plain",
26-
"Card",
27-
"Accordion"
28-
],
29-
"default": "Plain",
30-
"required": true
31-
}
32-
}
2+
"collectionName": "components_general_cards",
3+
"info": {
4+
"displayName": "Section",
5+
"icon": "layer",
6+
"description": ""
7+
},
8+
"options": {},
9+
"attributes": {
10+
"headline": {
11+
"type": "string",
12+
"required": true
13+
},
14+
"description": {
15+
"type": "richtext"
16+
},
17+
"button": {
18+
"type": "component",
19+
"repeatable": false,
20+
"component": "general.button"
21+
},
22+
"type": {
23+
"type": "enumeration",
24+
"enum": ["Plain", "Card", "Accordion"],
25+
"default": "Plain",
26+
"required": true
27+
}
28+
}
3329
}

0 commit comments

Comments
 (0)