Skip to content

Commit c549213

Browse files
committed
style: Reformat
1 parent b8984c7 commit c549213

Some content is hidden

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

66 files changed

+1691
-1689
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ root = true
44
[*]
55
charset = utf-8
66
indent_style = space
7-
indent_size = 4
7+
indent_size = 2
88
end_of_line = lf
99
trim_trailing_whitespace = true
1010
insert_final_newline = true

.eslintrc.js

+146-146
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,154 @@
11
module.exports = {
2-
root: true,
3-
env: {
4-
node: true,
5-
browser: true,
2+
root: true,
3+
env: {
4+
node: true,
5+
browser: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:react/recommended',
10+
'plugin:react-hooks/recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
13+
'plugin:unicorn/recommended',
14+
'plugin:promise/recommended',
15+
'plugin:sonarjs/recommended',
16+
'plugin:import/warnings',
17+
'plugin:regexp/recommended',
18+
'plugin:total-functions/recommended',
19+
'plugin:etc/recommended',
20+
'plugin:testing-library/dom',
21+
'plugin:testing-library/react',
22+
'plugin:prettier/recommended',
23+
'prettier',
24+
],
25+
parser: '@typescript-eslint/parser',
26+
parserOptions: {
27+
ecmaVersion: 2020,
28+
project: 'tsconfig.json',
29+
sourceType: 'module',
30+
ecmaFeatures: {
31+
jsx: true,
632
},
7-
extends: [
8-
'eslint:recommended',
9-
'plugin:react/recommended',
10-
'plugin:react-hooks/recommended',
11-
'plugin:@typescript-eslint/recommended',
12-
'plugin:@typescript-eslint/recommended-requiring-type-checking',
13-
'plugin:unicorn/recommended',
14-
'plugin:promise/recommended',
15-
'plugin:sonarjs/recommended',
16-
'plugin:import/warnings',
17-
'plugin:regexp/recommended',
18-
'plugin:total-functions/recommended',
19-
'plugin:etc/recommended',
20-
'plugin:testing-library/dom',
21-
'plugin:testing-library/react',
22-
'plugin:prettier/recommended',
23-
'prettier',
24-
],
25-
parser: '@typescript-eslint/parser',
26-
parserOptions: {
27-
ecmaVersion: 2020,
28-
project: 'tsconfig.json',
29-
sourceType: 'module',
30-
ecmaFeatures: {
31-
jsx: true,
32-
},
33-
warnOnUnsupportedTypeScriptVersion: false,
33+
warnOnUnsupportedTypeScriptVersion: false,
34+
},
35+
plugins: [
36+
'react',
37+
'react-hooks',
38+
'unicorn',
39+
'import',
40+
'wix-editor',
41+
'@typescript-eslint',
42+
'prettier',
43+
'simple-import-sort',
44+
'sort-class-members',
45+
'total-functions',
46+
'promise',
47+
'sonarjs',
48+
'etc',
49+
'testing-library',
50+
'@kyleshevlin',
51+
'only-warn',
52+
],
53+
ignorePatterns: ['@generated/**', '*.config.js', '.*rc.js'],
54+
settings: {
55+
react: {
56+
createClass: 'createReactClass', // Regex for Component Factory to use,
57+
// default to "createReactClass"
58+
pragma: 'React', // Pragma to use, default to "React"
59+
fragment: 'Fragment', // Fragment to use (may be a property of <pragma>), default to "Fragment"
60+
version: 'detect', // React version. "detect" automatically picks the version you have installed.
3461
},
35-
plugins: [
36-
'react',
37-
'react-hooks',
38-
'unicorn',
39-
'import',
40-
'wix-editor',
41-
'@typescript-eslint',
42-
'prettier',
43-
'simple-import-sort',
44-
'sort-class-members',
45-
'total-functions',
46-
'promise',
47-
'sonarjs',
48-
'etc',
49-
'testing-library',
50-
'@kyleshevlin',
51-
'only-warn',
62+
},
63+
rules: {
64+
// core
65+
'consistent-return': [1, { treatUndefinedAsUnspecified: true }],
66+
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
67+
semi: [1, 'always'],
68+
'max-lines': [1, { max: 300 }],
69+
'max-params': [1, { max: 5 }],
70+
'no-unneeded-ternary': [1],
71+
// wix-editor
72+
'wix-editor/no-instanceof-array': 1,
73+
'wix-editor/no-not-not': 1,
74+
'wix-editor/no-unneeded-match': 1,
75+
'wix-editor/prefer-filter': 1,
76+
'wix-editor/prefer-ternary': 1,
77+
'wix-editor/return-boolean': 1,
78+
'wix-editor/simplify-boolean-expression': 1,
79+
// unicorn
80+
'unicorn/no-useless-undefined': 0,
81+
'unicorn/prefer-spread': 0,
82+
'unicorn/catch-error-name': 0,
83+
'unicorn/prevent-abbreviations': [
84+
1,
85+
{
86+
replacements: {
87+
args: false,
88+
err: false,
89+
prod: false,
90+
ref: false,
91+
params: false,
92+
props: false,
93+
},
94+
},
5295
],
53-
ignorePatterns: ['@generated/**', '*.config.js', '.*rc.js'],
54-
settings: {
55-
react: {
56-
createClass: 'createReactClass', // Regex for Component Factory to use,
57-
// default to "createReactClass"
58-
pragma: 'React', // Pragma to use, default to "React"
59-
fragment: 'Fragment', // Fragment to use (may be a property of <pragma>), default to "Fragment"
60-
version: 'detect', // React version. "detect" automatically picks the version you have installed.
96+
'unicorn/filename-case': [
97+
1,
98+
{
99+
cases: {
100+
kebabCase: true,
101+
pascalCase: true,
61102
},
62-
},
63-
rules: {
64-
// core
65-
'consistent-return': [1, { treatUndefinedAsUnspecified: true }],
66-
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
67-
semi: [1, 'always'],
68-
'max-lines': [1, { max: 300 }],
69-
'max-params': [1, { max: 5 }],
70-
'no-unneeded-ternary': [1],
71-
// wix-editor
72-
'wix-editor/no-instanceof-array': 1,
73-
'wix-editor/no-not-not': 1,
74-
'wix-editor/no-unneeded-match': 1,
75-
'wix-editor/prefer-filter': 1,
76-
'wix-editor/prefer-ternary': 1,
77-
'wix-editor/return-boolean': 1,
78-
'wix-editor/simplify-boolean-expression': 1,
79-
// unicorn
80-
'unicorn/no-useless-undefined': 0,
81-
'unicorn/prefer-spread': 0,
82-
'unicorn/catch-error-name': 0,
83-
'unicorn/prevent-abbreviations': [
84-
1,
85-
{
86-
replacements: {
87-
args: false,
88-
err: false,
89-
prod: false,
90-
ref: false,
91-
params: false,
92-
props: false,
93-
},
94-
},
95-
],
96-
'unicorn/filename-case': [
97-
1,
98-
{
99-
cases: {
100-
kebabCase: true,
101-
pascalCase: true,
102-
},
103-
},
104-
],
105-
// import
106-
'import/max-dependencies': [1, { max: 15 }],
107-
// simple-import-sort with recomended settings
108-
'simple-import-sort/imports': 1,
109-
'simple-import-sort/exports': 1,
110-
'sort-imports': 0,
111-
'import/first': 1,
112-
'import/newline-after-import': 1,
113-
'import/no-duplicates': 1,
114-
// typescript-eslint
115-
'@typescript-eslint/no-floating-promises': 1,
116-
'@typescript-eslint/no-unnecessary-condition': 1,
117-
'@typescript-eslint/explicit-module-boundary-types': 0,
118-
// sort-class-members
119-
'sort-class-members/sort-class-members': [
120-
1,
121-
{
122-
order: [
123-
'[static-properties]',
124-
'[static-methods]',
125-
'[properties]',
126-
'[conventional-private-properties]',
127-
'constructor',
128-
'[methods]',
129-
'[conventional-private-methods]',
130-
],
131-
accessorPairPositioning: 'getThenSet',
132-
},
103+
},
104+
],
105+
// import
106+
'import/max-dependencies': [1, { max: 15 }],
107+
// simple-import-sort with recomended settings
108+
'simple-import-sort/imports': 1,
109+
'simple-import-sort/exports': 1,
110+
'sort-imports': 0,
111+
'import/first': 1,
112+
'import/newline-after-import': 1,
113+
'import/no-duplicates': 1,
114+
// typescript-eslint
115+
'@typescript-eslint/no-floating-promises': 1,
116+
'@typescript-eslint/no-unnecessary-condition': 1,
117+
'@typescript-eslint/explicit-module-boundary-types': 0,
118+
// sort-class-members
119+
'sort-class-members/sort-class-members': [
120+
1,
121+
{
122+
order: [
123+
'[static-properties]',
124+
'[static-methods]',
125+
'[properties]',
126+
'[conventional-private-properties]',
127+
'constructor',
128+
'[methods]',
129+
'[conventional-private-methods]',
133130
],
134-
// @kyleshevlin
135-
'@kyleshevlin/prefer-custom-hooks': 1,
136-
// testing-library
137-
'testing-library/render-result-naming-convention': 0,
138-
},
139-
overrides: [
140-
{
141-
files: ['*.spec.ts', '**/testing/**/*.ts'],
142-
rules: {
143-
'consistent-return': 0,
144-
'max-lines': 0,
145-
'@typescript-eslint/no-explicit-any': 0,
146-
'@typescript-eslint/no-floating-promises': 0,
147-
'@typescript-eslint/no-non-null-assertion': 0,
148-
'@typescript-eslint/camelcase': 0,
149-
'import/max-dependencies': 0,
150-
'sonarjs/no-duplicate-string': 0,
151-
},
152-
},
131+
accessorPairPositioning: 'getThenSet',
132+
},
153133
],
134+
// @kyleshevlin
135+
'@kyleshevlin/prefer-custom-hooks': 1,
136+
// testing-library
137+
'testing-library/render-result-naming-convention': 0,
138+
},
139+
overrides: [
140+
{
141+
files: ['*.spec.ts', '**/testing/**/*.ts'],
142+
rules: {
143+
'consistent-return': 0,
144+
'max-lines': 0,
145+
'@typescript-eslint/no-explicit-any': 0,
146+
'@typescript-eslint/no-floating-promises': 0,
147+
'@typescript-eslint/no-non-null-assertion': 0,
148+
'@typescript-eslint/camelcase': 0,
149+
'import/max-dependencies': 0,
150+
'sonarjs/no-duplicate-string': 0,
151+
},
152+
},
153+
],
154154
};

.prettierrc.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module.exports = {
2-
printWidth: 88,
3-
trailingComma: 'all',
4-
tabWidth: 4,
5-
semi: true,
6-
singleQuote: true,
7-
arrowParens: 'avoid',
8-
overrides: [
9-
{
10-
files: '*.{json,yml}',
11-
options: {
12-
tabWidth: 2,
13-
},
14-
},
15-
],
2+
printWidth: 88,
3+
trailingComma: 'all',
4+
tabWidth: 2,
5+
semi: true,
6+
singleQuote: true,
7+
arrowParens: 'avoid',
8+
overrides: [
9+
{
10+
files: '*.{json,yml}',
11+
options: {
12+
tabWidth: 2,
13+
},
14+
},
15+
],
1616
};

0 commit comments

Comments
 (0)