Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 49b472f

Browse files
committed
lint and format cms
1 parent 8ca57bb commit 49b472f

27 files changed

+350
-335
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"scripts": {
1111
"build": "turbo run build",
1212
"test": "turbo run test",
13-
"lint": "turbo run lint",
1413
"dev": "turbo run dev",
1514
"run-frontend": "yarn --cwd packages/frontend start",
1615
"run-cms": "yarn --cwd packages/cms start",

packages/cms/.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"rules": {
2828
"indent": ["error", 2, { "SwitchCase": 1 }],
2929
"linebreak-style": ["off", "unix"],
30-
"no-console": "error",
3130
"quotes": ["error", "single"],
3231
"semi": ["error", "always"],
3332
"no-var": "error",

packages/cms/.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.cache
2+
.tmp
3+
.turbo
4+
build
5+
node_modules

packages/cms/.prettierrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"semi": true,
33
"trailingComma": "es5",
44
"singleQuote": true,
5-
"printWidth": 100
6-
}
5+
"printWidth": 100,
6+
"tabWidth": 2
7+
}

packages/cms/config/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
rest: {
3-
defaultLimit: 20,
3+
defaultLimit: 25,
44
maxLimit: 100,
55
withCount: true,
66
},

packages/cms/config/database.js

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
const path = require("path");
1+
const path = require('path');
22

33
module.exports = ({ env }) =>
4-
process.env.NODE_ENV === "development"
4+
process.env.NODE_ENV === 'development'
55
? {
66
connection: {
7-
client: "sqlite",
7+
client: 'sqlite',
88
connection: {
9-
filename: path.join(
10-
__dirname,
11-
"..",
12-
env("DATABASE_FILENAME", ".tmp/data.db")
13-
),
9+
filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')),
1410
},
1511
useNullAsDefault: true,
1612
},
1713
}
1814
: {
1915
connection: {
20-
client: "postgres",
16+
client: 'postgres',
2117
connection: {
22-
host: env("DATABASE_HOST"),
23-
port: env.int("DATABASE_PORT"),
24-
database: env("DATABASE_NAME"),
25-
user: env("DATABASE_USERNAME"),
26-
password: env("DATABASE_PASSWORD"),
18+
host: env('DATABASE_HOST'),
19+
port: env.int('DATABASE_PORT'),
20+
database: env('DATABASE_NAME'),
21+
user: env('DATABASE_USERNAME'),
22+
password: env('DATABASE_PASSWORD'),
2723
pool: 10,
2824
ssl: {
29-
rejectUnauthorized: env.bool("DATABASE_SSL_SELF", false),
25+
rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false),
3026
},
3127
},
3228
debug: false,

packages/cms/config/middlewares.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
module.exports = [
2-
"strapi::errors",
3-
"strapi::security",
4-
"strapi::cors",
5-
"strapi::poweredBy",
6-
"strapi::logger",
7-
"strapi::query",
8-
"strapi::body",
9-
"strapi::session",
10-
"strapi::favicon",
11-
"strapi::public",
2+
'strapi::errors',
3+
'strapi::security',
4+
'strapi::cors',
5+
'strapi::poweredBy',
6+
'strapi::logger',
7+
'strapi::query',
8+
'strapi::body',
9+
'strapi::session',
10+
'strapi::favicon',
11+
'strapi::public',
1212
{
13-
name: "strapi::security",
13+
name: 'strapi::security',
1414
config: {
1515
contentSecurityPolicy: {
1616
useDefaults: true,
1717
directives: {
18-
"connect-src": ["'self'", "https:"],
19-
"img-src": [
18+
'connect-src': ["'self'", 'https:'],
19+
'img-src': [
2020
"'self'",
21-
"data:",
22-
"blob:",
23-
"dl.airtable.com",
24-
"sitemedia.ams3.digitaloceanspaces.com",
21+
'data:',
22+
'blob:',
23+
'dl.airtable.com',
24+
'sitemedia.ams3.digitaloceanspaces.com',
2525
],
26-
"media-src": [
26+
'media-src': [
2727
"'self'",
28-
"data:",
29-
"blob:",
30-
"dl.airtable.com",
31-
"sitemedia.ams3.digitaloceanspaces.com",
28+
'data:',
29+
'blob:',
30+
'dl.airtable.com',
31+
'sitemedia.ams3.digitaloceanspaces.com',
3232
],
3333
upgradeInsecureRequests: null,
3434
},

packages/cms/config/plugins.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
const { isDevelopment } = require('../src/helpers');
22

3-
const getDevPlugins = (env) => ({})
3+
const getDevPlugins = () => ({});
44
const getProductionPlugins = (env) => ({
55
upload: {
66
config: {
7-
provider: "aws-s3",
7+
provider: 'aws-s3',
88
providerOptions: {
9-
accessKeyId: env("STORAGE_ACCESS_KEY_ID"), // env("SCALEWAY_ACCESS_KEY_ID"),
10-
secretAccessKey: env("STORAGE_SECRET_KEY"), // env("SCALEWAY_ACCESS_SECRET"),
11-
endpoint: "ams3.digitaloceanspaces.com", // env("SCALEWAY_ENDPOINT"), // e.g. "s3.fr-par.scw.cloud"
9+
accessKeyId: env('STORAGE_ACCESS_KEY_ID'), // env("SCALEWAY_ACCESS_KEY_ID"),
10+
secretAccessKey: env('STORAGE_SECRET_KEY'), // env("SCALEWAY_ACCESS_SECRET"),
11+
endpoint: 'ams3.digitaloceanspaces.com', // env("SCALEWAY_ENDPOINT"), // e.g. "s3.fr-par.scw.cloud"
1212
params: {
13-
Bucket: "sitemedia", //env("SCALEWAY_BUCKET"),
13+
Bucket: 'sitemedia', //env("SCALEWAY_BUCKET"),
1414
},
1515
},
1616
},
1717
},
18-
})
18+
});
1919

2020
module.exports = ({ env }) => ({
21-
...(isDevelopment() ? getDevPlugins(env) : getProductionPlugins(env))
21+
...(isDevelopment() ? getDevPlugins(env) : getProductionPlugins(env)),
2222
});

packages/cms/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@faker-js/faker": "^7.3.0",
1919
"babel-eslint": "^10.1.0",
2020
"eslint": "^8.21.0",
21-
"lodash.merge": "^4.6.2"
21+
"lodash.merge": "^4.6.2",
22+
"prettier": "^2.7.1"
2223
},
2324
"dependencies": {
2425
"@strapi/plugin-graphql": "4.2.2",
@@ -31,7 +32,7 @@
3132
},
3233
"lint-staged": {
3334
"*.{js,jsx,ts,tsx,md,html,graphql}": [
34-
"eslint",
35+
"eslint --fix",
3536
"prettier --write"
3637
]
3738
},

packages/cms/src/_seed/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ module.exports = {
66
'api::partner.partner',
77
'api::project.project',
88
],
9-
}
9+
};

0 commit comments

Comments
 (0)