Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2ae07ac

Browse files
Merge pull request #7 from page-source/feature/app-revamp-2024
Upgrading Quiz to React 18
2 parents 181910b + 912cfb2 commit 2ae07ac

File tree

18 files changed

+17229
-11398
lines changed

18 files changed

+17229
-11398
lines changed

‎.eslintrc.js

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
amd: true,
6+
node: true,
7+
},
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:react-hooks/recommended',
12+
'prettier',
13+
],
14+
parserOptions: {
15+
ecmaVersion: 'latest',
16+
sourceType: 'module',
17+
},
18+
plugins: ['react', 'prettier'],
19+
rules: {
20+
'prettier/prettier': 0,
21+
semi: 'error',
22+
'object-curly-spacing': ['error', 'always'],
23+
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
24+
'comma-dangle': 'off',
25+
'no-multi-spaces': 'error',
26+
'no-trailing-spaces': 'error',
27+
'no-whitespace-before-property': 'error',
28+
'newline-per-chained-call': 'error',
29+
'lines-between-class-members': ['error', 'always'],
30+
quotes: 'off',
31+
'no-multi-str': 'error',
32+
'padding-line-between-statements': [
33+
'error',
34+
{
35+
blankLine: 'always',
36+
prev: [
37+
'multiline-block-like',
38+
'multiline-const',
39+
'multiline-expression',
40+
'multiline-let',
41+
],
42+
next: '*',
43+
},
44+
{
45+
blankLine: 'always',
46+
prev: '*',
47+
next: [
48+
'multiline-block-like',
49+
'multiline-const',
50+
'multiline-expression',
51+
'multiline-let',
52+
],
53+
},
54+
],
55+
'space-before-function-paren': [
56+
'error',
57+
{
58+
anonymous: 'always',
59+
named: 'never',
60+
asyncArrow: 'ignore',
61+
},
62+
],
63+
'comma-style': ['error', 'last'],
64+
'max-len': [
65+
'error',
66+
{
67+
code: 120,
68+
ignoreStrings: true,
69+
},
70+
],
71+
'react/no-unescaped-entities': 'off',
72+
'multiline-comment-style': 'off',
73+
'operator-linebreak': 'off',
74+
'rest-spread-spacing': ['error', 'never'],
75+
'array-bracket-spacing': ['error', 'never'],
76+
'space-in-parens': ['error', 'never'],
77+
'keyword-spacing': 'error',
78+
curly: 'error',
79+
'no-multiple-empty-lines': [
80+
'error',
81+
{
82+
max: 1,
83+
maxEOF: 0,
84+
},
85+
],
86+
'no-nested-ternary': 'error',
87+
'space-infix-ops': [
88+
'error',
89+
{
90+
int32Hint: false,
91+
},
92+
],
93+
'max-depth': ['error', 3],
94+
'brace-style': [
95+
'error',
96+
'1tbs',
97+
{
98+
allowSingleLine: false,
99+
},
100+
],
101+
'arrow-spacing': 'error',
102+
'no-template-curly-in-string': 'error',
103+
'block-scoped-var': 'error',
104+
eqeqeq: 'error',
105+
'no-implicit-globals': 'error',
106+
'no-script-url': 'error',
107+
'no-self-compare': 'error',
108+
'no-sequences': 'error',
109+
yoda: 'error',
110+
'computed-property-spacing': ['error', 'never'],
111+
'func-call-spacing': ['error', 'never'],
112+
'jsx-quotes': ['error', 'prefer-single'],
113+
'max-statements-per-line': [
114+
'error',
115+
{
116+
max: 1,
117+
},
118+
],
119+
'no-multi-assign': 'error',
120+
'padded-blocks': ['error', 'never'],
121+
'no-duplicate-imports': 'error',
122+
'no-var': 'error',
123+
'prefer-const': 'error',
124+
'prefer-rest-params': 'error',
125+
'prefer-spread': 'error',
126+
'prefer-template': 'error',
127+
'react/display-name': 'off',
128+
'lines-around-comment': [
129+
'error',
130+
{
131+
beforeLineComment: true,
132+
allowBlockStart: true,
133+
},
134+
],
135+
'no-else-return': [
136+
'error',
137+
{
138+
allowElseIf: false,
139+
},
140+
],
141+
'key-spacing': [
142+
'error',
143+
{
144+
beforeColon: false,
145+
afterColon: true,
146+
},
147+
],
148+
'comma-spacing': [
149+
'error',
150+
{
151+
before: false,
152+
after: true,
153+
},
154+
],
155+
'react/jsx-boolean-value': 'error',
156+
'react/jsx-tag-spacing': ['error', { beforeSelfClosing: 'always' }],
157+
'react/jsx-pascal-case': 'error',
158+
'react/jsx-no-useless-fragment': 'error',
159+
'react/jsx-no-duplicate-props': 'error',
160+
'react/jsx-no-constructed-context-values': 'error',
161+
'react/jsx-newline': 'off',
162+
'react/jsx-max-props-per-line': [
163+
'error',
164+
{
165+
maximum: 2,
166+
when: 'always',
167+
},
168+
],
169+
'react/jsx-wrap-multilines': [
170+
'error',
171+
{
172+
return: 'parens-new-line',
173+
assignment: 'parens-new-line',
174+
arrow: 'parens-new-line',
175+
condition: 'parens-new-line',
176+
declaration: 'parens-new-line',
177+
logical: 'parens-new-line',
178+
prop: 'parens-new-line',
179+
},
180+
],
181+
'react/jsx-one-expression-per-line': [
182+
'off',
183+
{
184+
allow: 'single-child',
185+
},
186+
],
187+
'react/jsx-props-no-multi-spaces': 'error',
188+
'react/jsx-props-no-spreading': 'off',
189+
'jsx-curly-spacing': 'off',
190+
'react/jsx-indent': 'off',
191+
'react/jsx-indent-props': 'off',
192+
'react/jsx-fragments': ['error', 'element'],
193+
'react/jsx-curly-newline': [
194+
'error',
195+
{
196+
multiline: 'consistent',
197+
singleline: 'consistent',
198+
},
199+
],
200+
'react/jsx-curly-brace-presence': [
201+
'error',
202+
{
203+
props: 'never',
204+
},
205+
],
206+
'react/jsx-closing-tag-location': 'error',
207+
'react/jsx-closing-bracket-location': ['error', 'tag-aligned'],
208+
'react/function-component-definition': [
209+
'error',
210+
{
211+
namedComponents: 'arrow-function',
212+
unnamedComponents: 'arrow-function',
213+
},
214+
],
215+
},
216+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /