Skip to content

Commit 165532a

Browse files
zaistetypeofweb
andauthored
A new beginning (saleor#888)
Co-authored-by: Michal Miszczyszyn <[email protected]>
1 parent 639fc2d commit 165532a

File tree

1,272 files changed

+45633
-557918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,272 files changed

+45633
-557918
lines changed

.dockerignore

-23
This file was deleted.

.env

-13
This file was deleted.

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SALEOR_API_URL=

.eslintrc.json

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
3+
"plugins": ["@typescript-eslint", "import", "formatjs"],
4+
"parserOptions": {
5+
"project": "tsconfig.json"
6+
},
7+
"extends": [
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
10+
"plugin:import/recommended",
11+
"plugin:import/typescript",
12+
"prettier",
13+
"next/core-web-vitals"
14+
],
15+
"rules": {
16+
// sort imports
17+
"import/order": "error",
18+
19+
// no let exports
20+
"import/no-mutable-exports": "error",
21+
22+
"import/no-cycle": "error",
23+
"import/no-default-export": "error",
24+
25+
"import/no-unresolved": "off",
26+
27+
// allow {} even though it's unsafe but comes handy
28+
"@typescript-eslint/ban-types": [
29+
"error",
30+
{
31+
"types": {
32+
"{}": false
33+
}
34+
}
35+
],
36+
37+
"@typescript-eslint/consistent-type-imports": [
38+
"error",
39+
{
40+
"prefer": "type-imports",
41+
"fixStyle": "inline-type-imports",
42+
"disallowTypeAnnotations": false
43+
}
44+
],
45+
46+
"import/no-duplicates": ["error", { "prefer-inline": true }],
47+
48+
// false negatives
49+
"import/namespace": ["off"],
50+
51+
// we allow empty interfaces
52+
"no-empty-pattern": "off",
53+
"@typescript-eslint/no-empty-interface": "off",
54+
55+
// we allow empty functions
56+
"@typescript-eslint/no-empty-function": "off",
57+
58+
// we sometimes use async functions that don't await anything
59+
"@typescript-eslint/require-await": "off",
60+
61+
// make sure to `await` inside try…catch
62+
"@typescript-eslint/return-await": ["error", "in-try-catch"],
63+
64+
// allow unused vars prefixed with `_`
65+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
66+
67+
// numbers and booleans are fine in template strings
68+
"@typescript-eslint/restrict-template-expressions": [
69+
"error",
70+
{ "allowNumber": true, "allowBoolean": true }
71+
],
72+
73+
// @todo
74+
"@typescript-eslint/no-explicit-any": "off",
75+
76+
"@typescript-eslint/no-misused-promises": [
77+
"error",
78+
{
79+
"checksVoidReturn": false
80+
}
81+
]
82+
},
83+
"overrides": [
84+
{
85+
"files": ["src/app/**/{page,layout,error,loading,not-found}.tsx", "*.ts"],
86+
"rules": {
87+
"import/no-default-export": "off"
88+
}
89+
},
90+
{
91+
"files": ["src/checkout/**/*.*"],
92+
"rules": {
93+
"@next/next/no-img-element": "off",
94+
"formatjs/enforce-id": [
95+
"error",
96+
{
97+
"idInterpolationPattern": "[folder]/[name]/[sha512:contenthash:base64:6]"
98+
}
99+
]
100+
}
101+
}
102+
],
103+
"ignorePatterns": ["*.js", "*.jsx", "*.cjs", "src/checkout/src/graphql"]
104+
}

.github/workflows/addCommentToReleasePR.js

-201
This file was deleted.

0 commit comments

Comments
 (0)